diff --git a/src/main/java/net/spy/memcached/v2/AbstractArcusResult.java b/src/main/java/net/spy/memcached/v2/AbstractArcusResult.java index c9c9365a2..4d997d557 100644 --- a/src/main/java/net/spy/memcached/v2/AbstractArcusResult.java +++ b/src/main/java/net/spy/memcached/v2/AbstractArcusResult.java @@ -28,12 +28,12 @@ public class AbstractArcusResult implements ArcusResult { - protected AtomicReference value; - - private final List exceptions = new ArrayList<>(); + private final AtomicReference value; + private final List exceptions; public AbstractArcusResult(AtomicReference value) { this.value = value; + this.exceptions = new ArrayList<>(); } @Override diff --git a/src/main/java/net/spy/memcached/v2/ArcusMultiFuture.java b/src/main/java/net/spy/memcached/v2/ArcusMultiFuture.java index dea4af413..7f96b8ad2 100644 --- a/src/main/java/net/spy/memcached/v2/ArcusMultiFuture.java +++ b/src/main/java/net/spy/memcached/v2/ArcusMultiFuture.java @@ -32,8 +32,6 @@ * also completes exceptionally. If multiple futures completed exceptionally, * This future will throw CompositeException containing all exceptions. * And the combined result can be obtained. - * - * @param */ public final class ArcusMultiFuture extends CompletableFuture implements ArcusFuture { diff --git a/src/main/java/net/spy/memcached/v2/ArcusResult.java b/src/main/java/net/spy/memcached/v2/ArcusResult.java index 3639503a0..3252744d0 100644 --- a/src/main/java/net/spy/memcached/v2/ArcusResult.java +++ b/src/main/java/net/spy/memcached/v2/ArcusResult.java @@ -23,6 +23,7 @@ /** * Class to hold the result and errors occurred during Arcus operation. + * * @param the type of the result */ public interface ArcusResult { diff --git a/src/main/java/net/spy/memcached/v2/vo/BKey.java b/src/main/java/net/spy/memcached/v2/vo/BKey.java index 1e37bae11..db79cdba6 100644 --- a/src/main/java/net/spy/memcached/v2/vo/BKey.java +++ b/src/main/java/net/spy/memcached/v2/vo/BKey.java @@ -7,6 +7,12 @@ import net.spy.memcached.util.BTreeUtil; public final class BKey implements Comparable { + + public enum BKeyType { + BYTE_ARRAY, + LONG + } + private final BKeyType type; private final Object data; @@ -71,11 +77,6 @@ public static BKey of(BKeyObject bkeyObject) { } } - public enum BKeyType { - BYTE_ARRAY, - LONG; - } - public Object getData() { if (type == BKeyType.BYTE_ARRAY) { byte[] bytes = (byte[]) data; diff --git a/src/main/java/net/spy/memcached/v2/vo/GetArgs.java b/src/main/java/net/spy/memcached/v2/vo/GetArgs.java index f5e1f1d52..59529469a 100644 --- a/src/main/java/net/spy/memcached/v2/vo/GetArgs.java +++ b/src/main/java/net/spy/memcached/v2/vo/GetArgs.java @@ -7,6 +7,11 @@ public final class GetArgs { private final boolean withDelete; private final boolean dropIfEmpty; + private GetArgs(boolean withDelete, boolean dropIfEmpty) { + this.withDelete = withDelete; + this.dropIfEmpty = dropIfEmpty; + } + public boolean isWithDelete() { return withDelete; } @@ -15,11 +20,6 @@ public boolean isDropIfEmpty() { return dropIfEmpty; } - private GetArgs(boolean withDelete, boolean dropIfEmpty) { - this.withDelete = withDelete; - this.dropIfEmpty = dropIfEmpty; - } - public static class Builder { private boolean withDelete = false; private boolean dropIfEmpty = false; diff --git a/src/main/java/net/spy/memcached/v2/vo/SMGetElements.java b/src/main/java/net/spy/memcached/v2/vo/SMGetElements.java index 67a742dc3..a5b126248 100644 --- a/src/main/java/net/spy/memcached/v2/vo/SMGetElements.java +++ b/src/main/java/net/spy/memcached/v2/vo/SMGetElements.java @@ -34,7 +34,7 @@ public static SMGetElements mergeSMGetElements(List> smG // 1) Collect elements considering unique, count option. mergeSMGetElements(smGetElementsList, elements, missedKeys, trimmedKeys, - ascending, unique, count); + ascending, unique, count); // 2) Sort missed keys, and trimmed keys Collections.sort(missedKeys); @@ -53,15 +53,15 @@ public static SMGetElements mergeSMGetElements(List> smG } private static void mergeSMGetElements( - List> smGetElementsList, - List> elements, - List missedKeys, - List trimmedKeys, - boolean ascending, boolean unique, int count) { + List> smGetElementsList, + List> elements, + List missedKeys, + List trimmedKeys, + boolean ascending, boolean unique, int count) { // 1) Create Priority queue to hold the current smallest/largest element from each list Comparator> comparator = ascending - ? Comparator.naturalOrder() - : Comparator.reverseOrder(); + ? Comparator.naturalOrder() + : Comparator.reverseOrder(); PriorityQueue> pq = new PriorityQueue<>(comparator); // 2) Initialize the priority queue with the first element from each list @@ -93,7 +93,7 @@ private static void mergeSMGetElements( List> sourceList = smGetElementsList.get(current.listIndex).getElements(); if (nextIndex < sourceList.size()) { pq.offer(new ElementWithIndex<>(sourceList.get(nextIndex), - current.listIndex, nextIndex)); + current.listIndex, nextIndex)); } } }