Skip to content

Commit 56a2adc

Browse files
committed
INTERNAL: remove reverse local variable.
1 parent ae6878e commit 56a2adc

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

src/main/java/net/spy/memcached/ArcusClient.java

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2505,32 +2505,28 @@ public void gotData(String bkey, int flags, byte[] data, byte[] eflag) {
25052505
public CollectionFuture<Map<Integer, Element<Object>>> asyncBopGetByPosition(
25062506
String key, BTreeOrder order, int pos) {
25072507
BTreeGetByPosition get = new BTreeGetByPosition(order, pos);
2508-
boolean reverse = false;
2509-
return asyncBopGetByPosition(key, get, reverse, collectionTranscoder);
2508+
return asyncBopGetByPosition(key, get, collectionTranscoder);
25102509
}
25112510

25122511
@Override
25132512
public <T> CollectionFuture<Map<Integer, Element<T>>> asyncBopGetByPosition(
25142513
String key, BTreeOrder order, int pos, Transcoder<T> tc) {
25152514
BTreeGetByPosition get = new BTreeGetByPosition(order, pos);
2516-
boolean reverse = false;
2517-
return asyncBopGetByPosition(key, get, reverse, tc);
2515+
return asyncBopGetByPosition(key, get, tc);
25182516
}
25192517

25202518
@Override
25212519
public CollectionFuture<Map<Integer, Element<Object>>> asyncBopGetByPosition(
25222520
String key, BTreeOrder order, int from, int to) {
25232521
BTreeGetByPosition get = new BTreeGetByPosition(order, from, to);
2524-
boolean reverse = from > to;
2525-
return asyncBopGetByPosition(key, get, reverse, collectionTranscoder);
2522+
return asyncBopGetByPosition(key, get, collectionTranscoder);
25262523
}
25272524

25282525
@Override
25292526
public <T> CollectionFuture<Map<Integer, Element<T>>> asyncBopGetByPosition(
25302527
String key, BTreeOrder order, int from, int to, Transcoder<T> tc) {
25312528
BTreeGetByPosition get = new BTreeGetByPosition(order, from, to);
2532-
boolean reverse = from > to;
2533-
return asyncBopGetByPosition(key, get, reverse, tc);
2529+
return asyncBopGetByPosition(key, get, tc);
25342530
}
25352531

25362532
/**
@@ -2539,13 +2535,11 @@ public <T> CollectionFuture<Map<Integer, Element<T>>> asyncBopGetByPosition(
25392535
*
25402536
* @param k b+tree item's key
25412537
* @param get operation parameters (element position and so on)
2542-
* @param reverse forward or backward
25432538
* @param tc transcoder to serialize and unserialize value
25442539
* @return future holding the map of the fetched element and its position
25452540
*/
25462541
private <T> CollectionFuture<Map<Integer, Element<T>>> asyncBopGetByPosition(
2547-
final String k, final BTreeGetByPosition get,
2548-
final boolean reverse, final Transcoder<T> tc) {
2542+
final String k, final BTreeGetByPosition get, final Transcoder<T> tc) {
25492543
// Check for invalid arguments (not to get CLIENT_ERROR)
25502544
if (get.getOrder() == null) {
25512545
throw new IllegalArgumentException("BTreeOrder must not be null.");
@@ -2562,7 +2556,7 @@ private <T> CollectionFuture<Map<Integer, Element<T>>> asyncBopGetByPosition(
25622556
private final HashMap<Integer, Entry<BKeyObject, CachedData>> cachedDataMap =
25632557
new HashMap<>();
25642558
private final GetResult<Map<Integer, Element<T>>> result =
2565-
new BopGetByPositionResultImpl<>(cachedDataMap, reverse, tc);
2559+
new BopGetByPositionResultImpl<>(cachedDataMap, get.isReversed(), tc);
25662560

25672561
public void receivedStatus(OperationStatus status) {
25682562
CollectionOperationStatus cstatus;

0 commit comments

Comments
 (0)