diff --git a/src/main/java/net/spy/memcached/ArcusClient.java b/src/main/java/net/spy/memcached/ArcusClient.java index 76454699f..0d729c4c9 100644 --- a/src/main/java/net/spy/memcached/ArcusClient.java +++ b/src/main/java/net/spy/memcached/ArcusClient.java @@ -2505,32 +2505,28 @@ public void gotData(String bkey, int flags, byte[] data, byte[] eflag) { public CollectionFuture>> asyncBopGetByPosition( String key, BTreeOrder order, int pos) { BTreeGetByPosition get = new BTreeGetByPosition(order, pos); - boolean reverse = false; - return asyncBopGetByPosition(key, get, reverse, collectionTranscoder); + return asyncBopGetByPosition(key, get, collectionTranscoder); } @Override public CollectionFuture>> asyncBopGetByPosition( String key, BTreeOrder order, int pos, Transcoder tc) { BTreeGetByPosition get = new BTreeGetByPosition(order, pos); - boolean reverse = false; - return asyncBopGetByPosition(key, get, reverse, tc); + return asyncBopGetByPosition(key, get, tc); } @Override public CollectionFuture>> asyncBopGetByPosition( String key, BTreeOrder order, int from, int to) { BTreeGetByPosition get = new BTreeGetByPosition(order, from, to); - boolean reverse = from > to; - return asyncBopGetByPosition(key, get, reverse, collectionTranscoder); + return asyncBopGetByPosition(key, get, collectionTranscoder); } @Override public CollectionFuture>> asyncBopGetByPosition( String key, BTreeOrder order, int from, int to, Transcoder tc) { BTreeGetByPosition get = new BTreeGetByPosition(order, from, to); - boolean reverse = from > to; - return asyncBopGetByPosition(key, get, reverse, tc); + return asyncBopGetByPosition(key, get, tc); } /** @@ -2539,13 +2535,11 @@ public CollectionFuture>> asyncBopGetByPosition( * * @param k b+tree item's key * @param get operation parameters (element position and so on) - * @param reverse forward or backward * @param tc transcoder to serialize and unserialize value * @return future holding the map of the fetched element and its position */ private CollectionFuture>> asyncBopGetByPosition( - final String k, final BTreeGetByPosition get, - final boolean reverse, final Transcoder tc) { + final String k, final BTreeGetByPosition get, final Transcoder tc) { // Check for invalid arguments (not to get CLIENT_ERROR) if (get.getOrder() == null) { throw new IllegalArgumentException("BTreeOrder must not be null."); @@ -2562,7 +2556,7 @@ private CollectionFuture>> asyncBopGetByPosition( private final HashMap> cachedDataMap = new HashMap<>(); private final GetResult>> result = - new BopGetByPositionResultImpl<>(cachedDataMap, reverse, tc); + new BopGetByPositionResultImpl<>(cachedDataMap, get.isReversed(), tc); public void receivedStatus(OperationStatus status) { CollectionOperationStatus cstatus;