Skip to content

Commit 01134d3

Browse files
committed
FEATURE: Add CompletableFuture BTree insert/get API
1 parent 261bbdc commit 01134d3

12 files changed

Lines changed: 1926 additions & 141 deletions

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

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -195,11 +195,11 @@ public class ArcusClient extends FrontCacheMemcachedClient implements ArcusClien
195195

196196
private final int smgetKeyChunkSize;
197197

198-
private static final int BOPGET_BULK_CHUNK_SIZE = 200;
198+
public static final int BOPGET_BULK_CHUNK_SIZE = 200;
199199
private static final int NON_PIPED_BULK_INSERT_CHUNK_SIZE = 500;
200200

201-
private static final int MAX_GETBULK_ELEMENT_COUNT = 50;
202-
private static final int MAX_SMGET_COUNT = 1000; // server configuration is 2000.
201+
public static final int MAX_GETBULK_ELEMENT_COUNT = 50;
202+
public static final int MAX_SMGET_COUNT = 1000; // server configuration is 2000.
203203
private static final int MAX_MKEY_LENGTH = 250;
204204

205205
private static final int SHUTDOWN_TIMEOUT_MILLISECONDS = 2000;
@@ -3207,7 +3207,7 @@ public void complete() {
32073207
return rv;
32083208
}
32093209

3210-
private void validateKeys(Collection<String> keyList) {
3210+
public void validateKeys(Collection<String> keyList) {
32113211
if (keyList == null) {
32123212
throw new IllegalArgumentException("Key list is null.");
32133213
} else if (keyList.isEmpty()) {
@@ -3219,7 +3219,7 @@ private void validateKeys(Collection<String> keyList) {
32193219
}
32203220
}
32213221

3222-
private void checkDupKey(Collection<String> keyList) {
3222+
public void checkDupKey(Collection<String> keyList) {
32233223
/*
32243224
* Dup Check -> insure elements sequentially added to keyList
32253225
* */
@@ -3243,6 +3243,10 @@ private CollectionOperationStatus toCollectionOperationStatus(OperationStatus st
32433243
}
32443244
}
32453245

3246+
public Transcoder<Object> getCollectionTranscoder() {
3247+
return collectionTranscoder;
3248+
}
3249+
32463250
/**
32473251
* Get the client version.
32483252
*
@@ -3282,4 +3286,8 @@ public static String getVersion() {
32823286
}
32833287
return VERSION;
32843288
}
3289+
3290+
public int getSmgetKeyChunkSize() {
3291+
return this.smgetKeyChunkSize;
3292+
}
32853293
}

src/main/java/net/spy/memcached/collection/BTreeSMGetWithByteTypeBkey.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public BTreeSMGetWithByteTypeBkey(MemcachedNode node, List<String> keyList,
3131
eFlagFilter, count, unique);
3232
}
3333

34-
private BTreeSMGetWithByteTypeBkey(MemcachedNode node, List<String> keyList,
34+
public BTreeSMGetWithByteTypeBkey(MemcachedNode node, List<String> keyList,
3535
String range,
3636
ElementFlagFilter eFlagFilter,
3737
int count, boolean unique) {

src/main/java/net/spy/memcached/collection/BTreeSMGetWithLongTypeBkey.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public BTreeSMGetWithLongTypeBkey(MemcachedNode node, List<String> keyList,
2929
super(node, keyList, from + ".." + to, eFlagFilter, count, unique);
3030
}
3131

32-
private BTreeSMGetWithLongTypeBkey(MemcachedNode node, List<String> keyList,
32+
public BTreeSMGetWithLongTypeBkey(MemcachedNode node, List<String> keyList,
3333
String range,
3434
ElementFlagFilter eFlagFilter,
3535
int count, boolean unique) {

0 commit comments

Comments
 (0)