From a7dc9da2fa69ad27245f5993ab76f25335d581e9 Mon Sep 17 00:00:00 2001 From: brido4125 Date: Fri, 22 Sep 2023 14:59:57 +0900 Subject: [PATCH] INTERNAL: Add comment in collection get apis. --- .../java/net/spy/memcached/ArcusClient.java | 222 ++++---- .../java/net/spy/memcached/ArcusClientIF.java | 528 +++++++++--------- .../net/spy/memcached/ArcusClientPool.java | 223 ++++---- .../btree/BopOverflowActionTest.java | 54 +- .../memcached/collection/list/LopGetTest.java | 26 +- .../collection/map/MopDeleteTest.java | 26 +- .../memcached/collection/map/MopGetTest.java | 36 +- .../emptycollection/GetWithDropSetTest.java | 44 +- 8 files changed, 579 insertions(+), 580 deletions(-) diff --git a/src/main/java/net/spy/memcached/ArcusClient.java b/src/main/java/net/spy/memcached/ArcusClient.java index 30ba8e795..4b7ca26a2 100644 --- a/src/main/java/net/spy/memcached/ArcusClient.java +++ b/src/main/java/net/spy/memcached/ArcusClient.java @@ -1308,11 +1308,11 @@ public void complete() { return rv; } - @Override - public CollectionFuture>> asyncBopGet(String key, long bkey, - ElementFlagFilter eFlagFilter) { - return asyncBopGet(key, bkey, eFlagFilter, false, false); - } +// @Override +// public CollectionFuture>> asyncBopGet(String key, long bkey, +// ElementFlagFilter eFlagFilter) { +// return asyncBopGet(key, bkey, eFlagFilter, false, false); +// } @Override public CollectionFuture>> asyncBopGet(String key, @@ -1325,13 +1325,13 @@ public CollectionFuture>> asyncBopGet(String key, return asyncBopGet(key, get, false, collectionTranscoder); } - @Override - public CollectionFuture>> asyncBopGet(String key, - long from, long to, - ElementFlagFilter eFlagFilter, - int offset, int count) { - return asyncBopGet(key, from, to, eFlagFilter, offset, count, false, false); - } +// @Override +// public CollectionFuture>> asyncBopGet(String key, +// long from, long to, +// ElementFlagFilter eFlagFilter, +// int offset, int count) { +// return asyncBopGet(key, from, to, eFlagFilter, offset, count, false, false); +// } @Override public CollectionFuture>> asyncBopGet(String key, @@ -1346,13 +1346,13 @@ public CollectionFuture>> asyncBopGet(String key, return asyncBopGet(key, get, reverse, collectionTranscoder); } - @Override - public CollectionFuture>> asyncBopGet(String key, - long bkey, - ElementFlagFilter eFlagFilter, - Transcoder tc) { - return asyncBopGet(key, bkey, eFlagFilter, false, false, tc); - } +// @Override +// public CollectionFuture>> asyncBopGet(String key, +// long bkey, +// ElementFlagFilter eFlagFilter, +// Transcoder tc) { +// return asyncBopGet(key, bkey, eFlagFilter, false, false, tc); +// } @Override public CollectionFuture>> asyncBopGet(String key, @@ -1366,14 +1366,14 @@ public CollectionFuture>> asyncBopGet(String key, return asyncBopGet(key, get, false, tc); } - @Override - public CollectionFuture>> asyncBopGet(String key, - long from, long to, - ElementFlagFilter eFlagFilter, - int offset, int count, - Transcoder tc) { - return asyncBopGet(key, from, to, eFlagFilter, offset, count, false, false, tc); - } +// @Override +// public CollectionFuture>> asyncBopGet(String key, +// long from, long to, +// ElementFlagFilter eFlagFilter, +// int offset, int count, +// Transcoder tc) { +// return asyncBopGet(key, from, to, eFlagFilter, offset, count, false, false, tc); +// } @Override public CollectionFuture>> asyncBopGet(String key, @@ -1389,10 +1389,10 @@ public CollectionFuture>> asyncBopGet(String key, return asyncBopGet(key, get, reverse, tc); } - @Override - public CollectionFuture> asyncMopGet(String key) { - return asyncMopGet(key, false, false); - } +// @Override +// public CollectionFuture> asyncMopGet(String key) { +// return asyncMopGet(key, false, false); +// } @Override public CollectionFuture> asyncMopGet(String key, @@ -1403,10 +1403,10 @@ public CollectionFuture> asyncMopGet(String key, return asyncMopGet(key, get, collectionTranscoder); } - @Override - public CollectionFuture> asyncMopGet(String key, String mkey) { - return asyncMopGet(key, mkey, false, false); - } +// @Override +// public CollectionFuture> asyncMopGet(String key, String mkey) { +// return asyncMopGet(key, mkey, false, false); +// } @Override public CollectionFuture> asyncMopGet(String key, @@ -1423,10 +1423,10 @@ public CollectionFuture> asyncMopGet(String key, return asyncMopGet(key, get, collectionTranscoder); } - @Override - public CollectionFuture> asyncMopGet(String key, List mkeyList) { - return asyncMopGet(key, mkeyList, false, false); - } +// @Override +// public CollectionFuture> asyncMopGet(String key, List mkeyList) { +// return asyncMopGet(key, mkeyList, false, false); +// } @Override public CollectionFuture> asyncMopGet(String key, @@ -1443,10 +1443,10 @@ public CollectionFuture> asyncMopGet(String key, return asyncMopGet(key, get, collectionTranscoder); } - @Override - public CollectionFuture> asyncMopGet(String key, Transcoder tc) { - return asyncMopGet(key, false, false, tc); - } +// @Override +// public CollectionFuture> asyncMopGet(String key, Transcoder tc) { +// return asyncMopGet(key, false, false, tc); +// } @Override public CollectionFuture> asyncMopGet(String key, @@ -1457,10 +1457,10 @@ public CollectionFuture> asyncMopGet(String key, return asyncMopGet(key, get, tc); } - @Override - public CollectionFuture> asyncMopGet(String key, String mkey, Transcoder tc) { - return asyncMopGet(key, mkey, false, false, tc); - } +// @Override +// public CollectionFuture> asyncMopGet(String key, String mkey, Transcoder tc) { +// return asyncMopGet(key, mkey, false, false, tc); +// } @Override public CollectionFuture> asyncMopGet(String key, @@ -1477,10 +1477,10 @@ public CollectionFuture> asyncMopGet(String key, return asyncMopGet(key, get, tc); } - @Override - public CollectionFuture> asyncMopGet(String key, List mkeyList, Transcoder tc) { - return asyncMopGet(key, mkeyList, false, false, tc); - } +// @Override +// public CollectionFuture> asyncMopGet(String key, List mkeyList, Transcoder tc) { +// return asyncMopGet(key, mkeyList, false, false, tc); +// } @Override public CollectionFuture> asyncMopGet(String key, @@ -1497,10 +1497,10 @@ public CollectionFuture> asyncMopGet(String key, return asyncMopGet(key, get, tc); } - @Override - public CollectionFuture> asyncLopGet(String key, int index) { - return asyncLopGet(key, index, false, false); - } +// @Override +// public CollectionFuture> asyncLopGet(String key, int index) { +// return asyncLopGet(key, index, false, false); +// } @Override public CollectionFuture> asyncLopGet(String key, int index, @@ -1509,10 +1509,10 @@ public CollectionFuture> asyncLopGet(String key, int index, return asyncLopGet(key, get, collectionTranscoder); } - @Override - public CollectionFuture> asyncLopGet(String key, int from, int to) { - return asyncLopGet(key, from, to, false, false); - } +// @Override +// public CollectionFuture> asyncLopGet(String key, int from, int to) { +// return asyncLopGet(key, from, to, false, false); +// } @Override public CollectionFuture> asyncLopGet(String key, @@ -1522,10 +1522,10 @@ public CollectionFuture> asyncLopGet(String key, return asyncLopGet(key, get, collectionTranscoder); } - @Override - public CollectionFuture> asyncLopGet(String key, int index, Transcoder tc) { - return asyncLopGet(key, index, false, false, tc); - } +// @Override +// public CollectionFuture> asyncLopGet(String key, int index, Transcoder tc) { +// return asyncLopGet(key, index, false, false, tc); +// } @Override public CollectionFuture> asyncLopGet(String key, int index, boolean withDelete, boolean dropIfEmpty, @@ -1534,10 +1534,10 @@ public CollectionFuture> asyncLopGet(String key, int index, return asyncLopGet(key, get, tc); } - @Override - public CollectionFuture> asyncLopGet(String key, int from, int to, Transcoder tc) { - return asyncLopGet(key, from, to, false, false, tc); - } +// @Override +// public CollectionFuture> asyncLopGet(String key, int from, int to, Transcoder tc) { +// return asyncLopGet(key, from, to, false, false, tc); +// } @Override public CollectionFuture> asyncLopGet(String key, @@ -1548,10 +1548,10 @@ public CollectionFuture> asyncLopGet(String key, return asyncLopGet(key, get, tc); } - @Override - public CollectionFuture> asyncSopGet(String key, int count) { - return asyncSopGet(key, count, false, false); - } +// @Override +// public CollectionFuture> asyncSopGet(String key, int count) { +// return asyncSopGet(key, count, false, false); +// } @Override public CollectionFuture> asyncSopGet(String key, int count, @@ -1560,10 +1560,10 @@ public CollectionFuture> asyncSopGet(String key, int count, return asyncSopGet(key, get, collectionTranscoder); } - @Override - public CollectionFuture> asyncSopGet(String key, int count, Transcoder tc) { - return asyncSopGet(key, count, false, false, tc); - } +// @Override +// public CollectionFuture> asyncSopGet(String key, int count, Transcoder tc) { +// return asyncSopGet(key, count, false, false, tc); +// } @Override public CollectionFuture> asyncSopGet(String key, int count, @@ -1613,19 +1613,19 @@ public CollectionFuture asyncMopDelete(String key, String mkey, return asyncCollectionDelete(key, delete); } - @Override - public CollectionFuture asyncMopDelete(String key, - List mkeyList, - boolean dropIfEmpty) { - if (mkeyList == null) { - throw new IllegalArgumentException("mkeyList is null"); - } - for (int i = 0; i < mkeyList.size(); i++) { - validateMKey(mkeyList.get(i)); - } - MapDelete delete = new MapDelete(mkeyList, false, dropIfEmpty); - return asyncCollectionDelete(key, delete); - } +// @Override +// public CollectionFuture asyncMopDelete(String key, +// List mkeyList, +// boolean dropIfEmpty) { +// if (mkeyList == null) { +// throw new IllegalArgumentException("mkeyList is null"); +// } +// for (int i = 0; i < mkeyList.size(); i++) { +// validateMKey(mkeyList.get(i)); +// } +// MapDelete delete = new MapDelete(mkeyList, false, dropIfEmpty); +// return asyncCollectionDelete(key, delete); +// } @Override public CollectionFuture asyncLopDelete(String key, int index, @@ -2814,11 +2814,11 @@ public CollectionFuture asyncBopInsert(String key, return asyncCollectionInsert(key, BTreeUtil.toHex(bkey), bTreeInsert, tc); } - @Override - public CollectionFuture>> asyncBopGet( - String key, byte[] bkey, ElementFlagFilter eFlagFilter) { - return asyncBopGet(key, bkey, eFlagFilter, false, false); - } +// @Override +// public CollectionFuture>> asyncBopGet( +// String key, byte[] bkey, ElementFlagFilter eFlagFilter) { +// return asyncBopGet(key, bkey, eFlagFilter, false, false); +// } @Override public CollectionFuture>> asyncBopGet( @@ -2829,11 +2829,11 @@ public CollectionFuture>> asyncBopGet( return asyncBopExtendedGet(key, get, false, collectionTranscoder); } - @Override - public CollectionFuture>> asyncBopGet( - String key, byte[] bkey, ElementFlagFilter eFlagFilter, Transcoder tc) { - return asyncBopGet(key, bkey, eFlagFilter, false, false, tc); - } +// @Override +// public CollectionFuture>> asyncBopGet( +// String key, byte[] bkey, ElementFlagFilter eFlagFilter, Transcoder tc) { +// return asyncBopGet(key, bkey, eFlagFilter, false, false, tc); +// } @Override public CollectionFuture>> asyncBopGet( @@ -2844,12 +2844,12 @@ public CollectionFuture>> asyncBopGet( return asyncBopExtendedGet(key, get, false, tc); } - @Override - public CollectionFuture>> asyncBopGet( - String key, byte[] from, byte[] to, ElementFlagFilter eFlagFilter, - int offset, int count) { - return asyncBopGet(key, from, to, eFlagFilter, offset, count, false, false); - } +// @Override +// public CollectionFuture>> asyncBopGet( +// String key, byte[] from, byte[] to, ElementFlagFilter eFlagFilter, +// int offset, int count) { +// return asyncBopGet(key, from, to, eFlagFilter, offset, count, false, false); +// } @Override public CollectionFuture>> asyncBopGet( @@ -2861,13 +2861,13 @@ public CollectionFuture>> asyncBopGet( return asyncBopExtendedGet(key, get, reverse, collectionTranscoder); } - @Override - public CollectionFuture>> asyncBopGet( - String key, byte[] from, byte[] to, ElementFlagFilter eFlagFilter, int offset, - int count, Transcoder tc) { - return asyncBopGet(key, from, to, eFlagFilter, offset, count, - false, false, tc); - } +// @Override +// public CollectionFuture>> asyncBopGet( +// String key, byte[] from, byte[] to, ElementFlagFilter eFlagFilter, int offset, +// int count, Transcoder tc) { +// return asyncBopGet(key, from, to, eFlagFilter, offset, count, +// false, false, tc); +// } @Override public CollectionFuture>> asyncBopGet( diff --git a/src/main/java/net/spy/memcached/ArcusClientIF.java b/src/main/java/net/spy/memcached/ArcusClientIF.java index 35ffb4e42..905c3a1dc 100644 --- a/src/main/java/net/spy/memcached/ArcusClientIF.java +++ b/src/main/java/net/spy/memcached/ArcusClientIF.java @@ -505,17 +505,17 @@ public CollectionFuture asyncLopCreate(String key, ElementValueType type, CollectionAttributes attributes); - /** - * Retrieves an item on given bkey in the b+tree. - * - * @param key key of a b+tree - * @param bkey bkey - * @param eFlagFilter element flag filter - * @return a future that will hold the return value map of the fetch. - */ - public CollectionFuture>> asyncBopGet(String key, - long bkey, - ElementFlagFilter eFlagFilter); +// /** +// * Retrieves an item on given bkey in the b+tree. +// * +// * @param key key of a b+tree +// * @param bkey bkey +// * @param eFlagFilter element flag filter +// * @return a future that will hold the return value map of the fetch. +// */ +// public CollectionFuture>> asyncBopGet(String key, +// long bkey, +// ElementFlagFilter eFlagFilter); /** * Retrieves an item on given bkey in the b+tree. @@ -534,27 +534,27 @@ public CollectionFuture>> asyncBopGet(String key, boolean withDelete, boolean dropIfEmpty); - /** - * Retrieves count number of items in given bkey range(from..to) - * from offset in the b+tree. - * The returned map from the future should be sorted by the given range. - *
{@code
-   *  from >= to : in descending order
-   *  from < to  : in ascending order
-   * }
- * - * @param key key of a b+tree - * @param from the first bkey - * @param to the last bkey - * @param eFlagFilter element flag filter - * @param offset 0-based offset - * @param count number of returning values (0 to all) - * @return a future that will hold the return value map of the fetch - */ - public CollectionFuture>> asyncBopGet(String key, - long from, long to, - ElementFlagFilter eFlagFilter, - int offset, int count); +// /** +// * Retrieves count number of items in given bkey range(from..to) +// * from offset in the b+tree. +// * The returned map from the future should be sorted by the given range. +// *
{@code
+//   *  from >= to : in descending order
+//   *  from < to  : in ascending order
+//   * }
+// * +// * @param key key of a b+tree +// * @param from the first bkey +// * @param to the last bkey +// * @param eFlagFilter element flag filter +// * @param offset 0-based offset +// * @param count number of returning values (0 to all) +// * @return a future that will hold the return value map of the fetch +// */ +// public CollectionFuture>> asyncBopGet(String key, +// long from, long to, +// ElementFlagFilter eFlagFilter, +// int offset, int count); /** * Retrieves count number of items in given bkey range(from..to) @@ -583,20 +583,20 @@ public CollectionFuture>> asyncBopGet(String key, boolean withDelete, boolean dropIfEmpty); - /** - * Retrieves an item on given bkey in the b+tree. - * - * @param the expected class of the value - * @param key key of a b+tree - * @param bkey bkey - * @param eFlagFilter element flag filter - * @param tc a transcoder to decode returned values - * @return a future that will hold the return value map of the fetch. - */ - public CollectionFuture>> asyncBopGet(String key, - long bkey, - ElementFlagFilter eFlagFilter, - Transcoder tc); +// /** +// * Retrieves an item on given bkey in the b+tree. +// * +// * @param the expected class of the value +// * @param key key of a b+tree +// * @param bkey bkey +// * @param eFlagFilter element flag filter +// * @param tc a transcoder to decode returned values +// * @return a future that will hold the return value map of the fetch. +// */ +// public CollectionFuture>> asyncBopGet(String key, +// long bkey, +// ElementFlagFilter eFlagFilter, +// Transcoder tc); /** * Retrieves an item on given bkey in the b+tree. @@ -618,30 +618,30 @@ public CollectionFuture>> asyncBopGet(String key, boolean dropIfEmpty, Transcoder tc); - /** - * Retrieves count number of items in given bkey range(from..to) - * from offset in the b+tree. - * The returned map from the future should be sorted by the given range. - *
{@code
-   *  from >= to : in descending order
-   *  from < to  : in ascending order
-   * }
- * - * @param the expected class of the value - * @param key key of a b+tree - * @param from the first bkey - * @param to the last bkey - * @param eFlagFilter element flag filter - * @param offset 0-based offset - * @param count number of returning values (0 to all) - * @param tc a transcoder to decode returned values - * @return a future that will hold the return value map of the fetch - */ - public CollectionFuture>> asyncBopGet(String key, - long from, long to, - ElementFlagFilter eFlagFilter, - int offset, int count, - Transcoder tc); +// /** +// * Retrieves count number of items in given bkey range(from..to) +// * from offset in the b+tree. +// * The returned map from the future should be sorted by the given range. +// *
{@code
+//   *  from >= to : in descending order
+//   *  from < to  : in ascending order
+//   * }
+// * +// * @param the expected class of the value +// * @param key key of a b+tree +// * @param from the first bkey +// * @param to the last bkey +// * @param eFlagFilter element flag filter +// * @param offset 0-based offset +// * @param count number of returning values (0 to all) +// * @param tc a transcoder to decode returned values +// * @return a future that will hold the return value map of the fetch +// */ +// public CollectionFuture>> asyncBopGet(String key, +// long from, long to, +// ElementFlagFilter eFlagFilter, +// int offset, int count, +// Transcoder tc); /** * Retrieves count number of items in given bkey range(from..to) @@ -673,13 +673,13 @@ public CollectionFuture>> asyncBopGet(String key, boolean dropIfEmpty, Transcoder tc); - /** - * Retrieves all items from the map - * - * @param key key of a map - * @return a future that will hold the return value map of the fetch - */ - public CollectionFuture> asyncMopGet(String key); +// /** +// * Retrieves all items from the map +// * +// * @param key key of a map +// * @return a future that will hold the return value map of the fetch +// */ +// public CollectionFuture> asyncMopGet(String key); /** * Retrieves all items from the map @@ -693,14 +693,14 @@ public CollectionFuture>> asyncBopGet(String key, public CollectionFuture> asyncMopGet(String key, boolean withDelete, boolean dropIfEmpty); - /** - * Retrieves an item on given mkey in the map. - * - * @param key key of a map - * @param mkey mkey of a map - * @return a future that will hold the return value map of the fetch - */ - public CollectionFuture> asyncMopGet(String key, String mkey); +// /** +// * Retrieves an item on given mkey in the map. +// * +// * @param key key of a map +// * @param mkey mkey of a map +// * @return a future that will hold the return value map of the fetch +// */ +// public CollectionFuture> asyncMopGet(String key, String mkey); /** * Retrieves an item on given mkey in the map. @@ -715,14 +715,14 @@ public CollectionFuture> asyncMopGet(String key, public CollectionFuture> asyncMopGet(String key, String mkey, boolean withDelete, boolean dropIfEmpty); - /** - * Retrieves items on given mkey list in the map. - * - * @param key key of a map - * @param mkeyList mkeyList - * @return a future that will hold the return value map of the fetch. - */ - public CollectionFuture> asyncMopGet(String key, List mkeyList); +// /** +// * Retrieves items on given mkey list in the map. +// * +// * @param key key of a map +// * @param mkeyList mkeyList +// * @return a future that will hold the return value map of the fetch. +// */ +// public CollectionFuture> asyncMopGet(String key, List mkeyList); /** * Retrieves items on given mkey list in the map. @@ -737,16 +737,16 @@ public CollectionFuture> asyncMopGet(String key, String mkey public CollectionFuture> asyncMopGet(String key, List mkeyList, boolean withDelete, boolean dropIfEmpty); - /** - * Retrieves all items from the map - * - * @param the expected class of the value - * @param key key of a map - * @param tc a transcoder to decode returned values - * @return a future that will hold the return value map of the fetch - */ - public CollectionFuture> asyncMopGet(String key, - Transcoder tc); +// /** +// * Retrieves all items from the map +// * +// * @param the expected class of the value +// * @param key key of a map +// * @param tc a transcoder to decode returned values +// * @return a future that will hold the return value map of the fetch +// */ +// public CollectionFuture> asyncMopGet(String key, +// Transcoder tc); /** * Retrieves all items from the map @@ -763,17 +763,17 @@ public CollectionFuture> asyncMopGet(String key, boolean withDelete, boolean dropIfEmpty, Transcoder tc); - /** - * Retrieves an item on given mkey in the map. - * - * @param the expected class of the value - * @param key key of a map - * @param mkey mkey of a map - * @param tc a transcoder to decode returned values - * @return a future that will hold the return value map of the fetch - */ - public CollectionFuture> asyncMopGet(String key, String mkey, - Transcoder tc); +// /** +// * Retrieves an item on given mkey in the map. +// * +// * @param the expected class of the value +// * @param key key of a map +// * @param mkey mkey of a map +// * @param tc a transcoder to decode returned values +// * @return a future that will hold the return value map of the fetch +// */ +// public CollectionFuture> asyncMopGet(String key, String mkey, +// Transcoder tc); /** * Retrieves an item on given mkey in the map. @@ -791,17 +791,17 @@ public CollectionFuture> asyncMopGet(String key, String mkey, boolean withDelete, boolean dropIfEmpty, Transcoder tc); - /** - * Retrieves items on given mkey list in the map. - * - * @param the expected class of the value - * @param key key of a map - * @param mkeyList mkeyList - * @param tc a transcoder to decode returned values - * @return a future that will hold the return value map of the fetch. - */ - public CollectionFuture> asyncMopGet(String key, List mkeyList, - Transcoder tc); +// /** +// * Retrieves items on given mkey list in the map. +// * +// * @param the expected class of the value +// * @param key key of a map +// * @param mkeyList mkeyList +// * @param tc a transcoder to decode returned values +// * @return a future that will hold the return value map of the fetch. +// */ +// public CollectionFuture> asyncMopGet(String key, List mkeyList, +// Transcoder tc); /** * Retrieves items on given mkey list in the map. @@ -819,14 +819,14 @@ public CollectionFuture> asyncMopGet(String key, List boolean withDelete, boolean dropIfEmpty, Transcoder tc); - /** - * Retrieves an item on given index in the list. - * - * @param key key of a list - * @param index list index - * @return a future that will hold the return value list of the fetch - */ - public CollectionFuture> asyncLopGet(String key, int index); +// /** +// * Retrieves an item on given index in the list. +// * +// * @param key key of a list +// * @param index list index +// * @return a future that will hold the return value list of the fetch +// */ +// public CollectionFuture> asyncLopGet(String key, int index); /** * Retrieves an item on given index in the list. @@ -841,16 +841,16 @@ public CollectionFuture> asyncMopGet(String key, List public CollectionFuture> asyncLopGet(String key, int index, boolean withDelete, boolean dropIfEmpty); - /** - * Retrieves items on given index range(from..to) in the list. - * - * @param key key of a list - * @param from the first index to delete - * @param to the last index to delete - * @return a future that will hold the return value list of the fetch - */ - public CollectionFuture> asyncLopGet(String key, - int from, int to); +// /** +// * Retrieves items on given index range(from..to) in the list. +// * +// * @param key key of a list +// * @param from the first index to delete +// * @param to the last index to delete +// * @return a future that will hold the return value list of the fetch +// */ +// public CollectionFuture> asyncLopGet(String key, +// int from, int to); /** * Retrieves items on given index range(from..to) in the list. @@ -867,17 +867,17 @@ public CollectionFuture> asyncLopGet(String key, int from, int to, boolean withDelete, boolean dropIfEmpty); - /** - * Retrieves an item on given index in the list. - * - * @param the expected class of the value - * @param key key of a list - * @param index list index - * @param tc a tranacoder to decode returned value - * @return a future that will hold the return value list of the fetch - */ - public CollectionFuture> asyncLopGet(String key, int index, - Transcoder tc); +// /** +// * Retrieves an item on given index in the list. +// * +// * @param the expected class of the value +// * @param key key of a list +// * @param index list index +// * @param tc a tranacoder to decode returned value +// * @return a future that will hold the return value list of the fetch +// */ +// public CollectionFuture> asyncLopGet(String key, int index, +// Transcoder tc); /** * Retrieves an item on given index in the list. @@ -895,19 +895,19 @@ public CollectionFuture> asyncLopGet(String key, int index, boolean withDelete, boolean dropIfEmpty, Transcoder tc); - /** - * Retrieves items on given index range(from..to) in the list. (Arcus 1.6 and above) - * - * @param the expected class of the value - * @param key key of a list - * @param from the first index to delete - * @param to the last index to delete - * @param tc a transcoder to decode the returned values - * @return a future that will hold the return value list of the fetch - */ - public CollectionFuture> asyncLopGet(String key, - int from, int to, - Transcoder tc); +// /** +// * Retrieves items on given index range(from..to) in the list. (Arcus 1.6 and above) +// * +// * @param the expected class of the value +// * @param key key of a list +// * @param from the first index to delete +// * @param to the last index to delete +// * @param tc a transcoder to decode the returned values +// * @return a future that will hold the return value list of the fetch +// */ +// public CollectionFuture> asyncLopGet(String key, +// int from, int to, +// Transcoder tc); /** * Retrieves items on given index range(from..to) in the list. (Arcus 1.6 and above) @@ -927,14 +927,14 @@ public CollectionFuture> asyncLopGet(String key, boolean withDelete, boolean dropIfEmpty, Transcoder tc); - /** - * Retrieves count number of random items in the set. - * - * @param key key of a set - * @param count number of items to fetch - * @return a future that will hold the return value set of the fetch - */ - public CollectionFuture> asyncSopGet(String key, int count); +// /** +// * Retrieves count number of random items in the set. +// * +// * @param key key of a set +// * @param count number of items to fetch +// * @return a future that will hold the return value set of the fetch +// */ +// public CollectionFuture> asyncSopGet(String key, int count); /** * Retrieves count number of random items in the set. @@ -949,17 +949,17 @@ public CollectionFuture> asyncLopGet(String key, public CollectionFuture> asyncSopGet(String key, int count, boolean withDelete, boolean dropIfEmpty); - /** - * Retrieves count number of random items in the set. - * - * @param the expected class of the value - * @param key key of a set - * @param count number of items to fetch - * @param tc a tranacoder to decode returned value - * @return a future that will hold the return value set of the fetch - */ - public CollectionFuture> asyncSopGet(String key, int count, - Transcoder tc); +// /** +// * Retrieves count number of random items in the set. +// * +// * @param the expected class of the value +// * @param key key of a set +// * @param count number of items to fetch +// * @param tc a tranacoder to decode returned value +// * @return a future that will hold the return value set of the fetch +// */ +// public CollectionFuture> asyncSopGet(String key, int count, +// Transcoder tc); /** * Retrieves count number of random items in the set. @@ -1062,18 +1062,18 @@ public CollectionFuture asyncMopDelete(String key, public CollectionFuture asyncMopDelete(String key, String mkey, boolean dropIfEmpty); - /** - * Deletes items on given mkey list in the map. - * - * @param key key of a map - * @param mkeyList mkeyList - * @param dropIfEmpty false to remove the key when all elements are removed. - * true b+ tree will remain empty even if all the elements are removed - * @return whether or not the operation was performed - */ - public CollectionFuture asyncMopDelete(String key, - List mkeyList, - boolean dropIfEmpty); +// /** +// * Deletes items on given mkey list in the map. +// * +// * @param key key of a map +// * @param mkeyList mkeyList +// * @param dropIfEmpty false to remove the key when all elements are removed. +// * true b+ tree will remain empty even if all the elements are removed +// * @return whether or not the operation was performed +// */ +// public CollectionFuture asyncMopDelete(String key, +// List mkeyList, +// boolean dropIfEmpty); /** * Deletes an item on given index in the list. @@ -1765,17 +1765,17 @@ public CollectionFuture> asyncBopPip String key, List> elements, CollectionAttributes attributesForCreate, Transcoder tc); - /** - * Retrieves count number of items in given bkey in the b+tree. - * - * @param key key of a b+tree - * @param bkey bkey of an element - * @param eFlagFilter element flag filter - * @return a future that will hold the return value map of the fetch - */ - public CollectionFuture>> asyncBopGet( - String key, byte[] bkey, - ElementFlagFilter eFlagFilter); +// /** +// * Retrieves count number of items in given bkey in the b+tree. +// * +// * @param key key of a b+tree +// * @param bkey bkey of an element +// * @param eFlagFilter element flag filter +// * @return a future that will hold the return value map of the fetch +// */ +// public CollectionFuture>> asyncBopGet( +// String key, byte[] bkey, +// ElementFlagFilter eFlagFilter); /** * Retrieves count number of items in given bkey in the b+tree. @@ -1792,19 +1792,19 @@ public CollectionFuture>> asyncBopGet( String key, byte[] bkey, ElementFlagFilter eFlagFilter, boolean withDelete, boolean dropIfEmpty); - /** - * Retrieves count number of items in given bkey in the b+tree. - * - * @param the expected class of the value - * @param key key of a b+tree - * @param bkey bkey of an element - * @param eFlagFilter element flag filter - * @param tc transcoder to decode value - * @return a future that will hold the return value map of the fetch - */ - public CollectionFuture>> asyncBopGet( - String key, byte[] bkey, - ElementFlagFilter eFlagFilter, Transcoder tc); +// /** +// * Retrieves count number of items in given bkey in the b+tree. +// * +// * @param the expected class of the value +// * @param key key of a b+tree +// * @param bkey bkey of an element +// * @param eFlagFilter element flag filter +// * @param tc transcoder to decode value +// * @return a future that will hold the return value map of the fetch +// */ +// public CollectionFuture>> asyncBopGet( +// String key, byte[] bkey, +// ElementFlagFilter eFlagFilter, Transcoder tc); /** * Retrieves count number of items in given bkey in the b+tree. @@ -1823,26 +1823,26 @@ public CollectionFuture>> asyncBopGet( String key, byte[] bkey, ElementFlagFilter eFlagFilter, boolean withDelete, boolean dropIfEmpty, Transcoder tc); - /** - * Retrieves count number of items in given bkey range(from..to) - * from offset in the b+tree. - * The returned map from the future should be sorted by the given range. - *
{@code
-   *  from >= to : in descending order
-   *  from < to  : in ascending order
-   * }
- * - * @param key key of a b+tree - * @param from the first bkey - * @param to the last bkey - * @param eFlagFilter element flag filter - * @param offset 0-based offset - * @param count number of returning values (0 to all) - * @return a future that will hold the return value map of the fetch - */ - public CollectionFuture>> asyncBopGet( - String key, byte[] from, byte[] to, ElementFlagFilter eFlagFilter, int offset, - int count); +// /** +// * Retrieves count number of items in given bkey range(from..to) +// * from offset in the b+tree. +// * The returned map from the future should be sorted by the given range. +// *
{@code
+//   *  from >= to : in descending order
+//   *  from < to  : in ascending order
+//   * }
+// * +// * @param key key of a b+tree +// * @param from the first bkey +// * @param to the last bkey +// * @param eFlagFilter element flag filter +// * @param offset 0-based offset +// * @param count number of returning values (0 to all) +// * @return a future that will hold the return value map of the fetch +// */ +// public CollectionFuture>> asyncBopGet( +// String key, byte[] from, byte[] to, ElementFlagFilter eFlagFilter, int offset, +// int count); /** * Retrieves count number of items in given bkey range(from..to) @@ -1868,28 +1868,28 @@ public CollectionFuture>> asyncBopGet( String key, byte[] from, byte[] to, ElementFlagFilter eFlagFilter, int offset, int count, boolean withDelete, boolean dropIfEmpty); - /** - * Retrieves count number of items in given bkey range(from..to) - * from offset in the b+tree. - * The returned map from the future should be sorted by the given range. - *
{@code
-   *  from >= to : in descending order
-   *  from < to  : in ascending order
-   * }
- * - * @param the expected class of the value - * @param key key of a b+tree - * @param from the first bkey - * @param to the last bkey - * @param eFlagFilter element flag filter - * @param offset 0-based offset - * @param count number of returning values (0 to all) - * @param tc transcoder to decode value - * @return a future that will hold the return value map of the fetch - */ - public CollectionFuture>> asyncBopGet( - String key, byte[] from, byte[] to, ElementFlagFilter eFlagFilter, int offset, - int count, Transcoder tc); +// /** +// * Retrieves count number of items in given bkey range(from..to) +// * from offset in the b+tree. +// * The returned map from the future should be sorted by the given range. +// *
{@code
+//   *  from >= to : in descending order
+//   *  from < to  : in ascending order
+//   * }
+// * +// * @param the expected class of the value +// * @param key key of a b+tree +// * @param from the first bkey +// * @param to the last bkey +// * @param eFlagFilter element flag filter +// * @param offset 0-based offset +// * @param count number of returning values (0 to all) +// * @param tc transcoder to decode value +// * @return a future that will hold the return value map of the fetch +// */ +// public CollectionFuture>> asyncBopGet( +// String key, byte[] from, byte[] to, ElementFlagFilter eFlagFilter, int offset, +// int count, Transcoder tc); /** * Retrieves count number of items in given bkey range(from..to) diff --git a/src/main/java/net/spy/memcached/ArcusClientPool.java b/src/main/java/net/spy/memcached/ArcusClientPool.java index bc93dd0a8..5b307a4bf 100644 --- a/src/main/java/net/spy/memcached/ArcusClientPool.java +++ b/src/main/java/net/spy/memcached/ArcusClientPool.java @@ -656,12 +656,12 @@ public CollectionFuture asyncLopCreate(String key, return this.getClient().asyncLopCreate(key, type, attributes); } - @Override - public CollectionFuture>> asyncBopGet(String key, - long bkey, - ElementFlagFilter eFlagFilter) { - return this.getClient().asyncBopGet(key, bkey, eFlagFilter); - } +// @Override +// public CollectionFuture>> asyncBopGet(String key, +// long bkey, +// ElementFlagFilter eFlagFilter) { +// return this.getClient().asyncBopGet(key, bkey, eFlagFilter); +// } @Override public CollectionFuture>> asyncBopGet(String key, @@ -673,14 +673,14 @@ public CollectionFuture>> asyncBopGet(String key, dropIfEmpty); } - @Override - public CollectionFuture>> asyncBopGet(String key, - long from, long to, - ElementFlagFilter eFlagFilter, - int offset, int count) { - return this.getClient().asyncBopGet(key, from, to, eFlagFilter, offset, - count); - } +// @Override +// public CollectionFuture>> asyncBopGet(String key, +// long from, long to, +// ElementFlagFilter eFlagFilter, +// int offset, int count) { +// return this.getClient().asyncBopGet(key, from, to, eFlagFilter, offset, +// count); +// } @Override public CollectionFuture>> asyncBopGet(String key, @@ -693,13 +693,13 @@ public CollectionFuture>> asyncBopGet(String key, count, withDelete, dropIfEmpty); } - @Override - public CollectionFuture>> asyncBopGet(String key, - long bkey, - ElementFlagFilter eFlagFilter, - Transcoder tc) { - return this.getClient().asyncBopGet(key, bkey, eFlagFilter, tc); - } +// @Override +// public CollectionFuture>> asyncBopGet(String key, +// long bkey, +// ElementFlagFilter eFlagFilter, +// Transcoder tc) { +// return this.getClient().asyncBopGet(key, bkey, eFlagFilter, tc); +// } @Override public CollectionFuture>> asyncBopGet(String key, @@ -712,15 +712,15 @@ public CollectionFuture>> asyncBopGet(String key, dropIfEmpty, tc); } - @Override - public CollectionFuture>> asyncBopGet(String key, - long from, long to, - ElementFlagFilter eFlagFilter, - int offset, int count, - Transcoder tc) { - return this.getClient().asyncBopGet(key, from, to, eFlagFilter, offset, - count, tc); - } +// @Override +// public CollectionFuture>> asyncBopGet(String key, +// long from, long to, +// ElementFlagFilter eFlagFilter, +// int offset, int count, +// Transcoder tc) { +// return this.getClient().asyncBopGet(key, from, to, eFlagFilter, offset, +// count, tc); +// } @Override public CollectionFuture>> asyncBopGet(String key, @@ -734,10 +734,10 @@ public CollectionFuture>> asyncBopGet(String key, count, withDelete, dropIfEmpty, tc); } - @Override - public CollectionFuture> asyncMopGet(String key) { - return this.getClient().asyncMopGet(key); - } +// @Override +// public CollectionFuture> asyncMopGet(String key) { +// return this.getClient().asyncMopGet(key); +// } @Override public CollectionFuture> asyncMopGet(String key, @@ -746,10 +746,10 @@ public CollectionFuture> asyncMopGet(String key, return this.getClient().asyncMopGet(key, withDelete, dropIfEmpty); } - @Override - public CollectionFuture> asyncMopGet(String key, String mkey) { - return this.getClient().asyncMopGet(key, mkey); - } +// @Override +// public CollectionFuture> asyncMopGet(String key, String mkey) { +// return this.getClient().asyncMopGet(key, mkey); +// } @Override public CollectionFuture> asyncMopGet(String key, String mkey, @@ -758,10 +758,10 @@ public CollectionFuture> asyncMopGet(String key, String mkey return this.getClient().asyncMopGet(key, mkey, withDelete, dropIfEmpty); } - @Override - public CollectionFuture> asyncMopGet(String key, List mkeyList) { - return this.getClient().asyncMopGet(key, mkeyList); - } +// @Override +// public CollectionFuture> asyncMopGet(String key, List mkeyList) { +// return this.getClient().asyncMopGet(key, mkeyList); +// } @Override public CollectionFuture> asyncMopGet(String key, List mkeyList, @@ -770,10 +770,10 @@ public CollectionFuture> asyncMopGet(String key, List CollectionFuture> asyncMopGet(String key, Transcoder tc) { - return this.getClient().asyncMopGet(key, tc); - } +// @Override +// public CollectionFuture> asyncMopGet(String key, Transcoder tc) { +// return this.getClient().asyncMopGet(key, tc); +// } @Override public CollectionFuture> asyncMopGet(String key, @@ -783,11 +783,11 @@ public CollectionFuture> asyncMopGet(String key, return this.getClient().asyncMopGet(key, withDelete, dropIfEmpty, tc); } - @Override - public CollectionFuture> asyncMopGet(String key, String mkey, - Transcoder tc) { - return this.getClient().asyncMopGet(key, mkey, tc); - } +// @Override +// public CollectionFuture> asyncMopGet(String key, String mkey, +// Transcoder tc) { +// return this.getClient().asyncMopGet(key, mkey, tc); +// } @Override public CollectionFuture> asyncMopGet(String key, String mkey, @@ -797,11 +797,11 @@ public CollectionFuture> asyncMopGet(String key, String mkey, return this.getClient().asyncMopGet(key, mkey, withDelete, dropIfEmpty, tc); } - @Override - public CollectionFuture> asyncMopGet(String key, List mkeyList, - Transcoder tc) { - return this.getClient().asyncMopGet(key, mkeyList, tc); - } +// @Override +// public CollectionFuture> asyncMopGet(String key, List mkeyList, +// Transcoder tc) { +// return this.getClient().asyncMopGet(key, mkeyList, tc); +// } @Override public CollectionFuture> asyncMopGet(String key, List mkeyList, @@ -811,11 +811,11 @@ public CollectionFuture> asyncMopGet(String key, List return this.getClient().asyncMopGet(key, mkeyList, withDelete, dropIfEmpty, tc); } - @Override - public CollectionFuture> asyncLopGet(String key, int index) { - return this.getClient() - .asyncLopGet(key, index); - } +// @Override +// public CollectionFuture> asyncLopGet(String key, int index) { +// return this.getClient() +// .asyncLopGet(key, index); +// } @Override public CollectionFuture> asyncLopGet(String key, int index, @@ -825,10 +825,10 @@ public CollectionFuture> asyncLopGet(String key, int index, .asyncLopGet(key, index, withDelete, dropIfEmpty); } - @Override - public CollectionFuture> asyncLopGet(String key, int from, int to) { - return this.getClient().asyncLopGet(key, from, to); - } +// @Override +// public CollectionFuture> asyncLopGet(String key, int from, int to) { +// return this.getClient().asyncLopGet(key, from, to); +// } @Override public CollectionFuture> asyncLopGet(String key, @@ -839,10 +839,10 @@ public CollectionFuture> asyncLopGet(String key, dropIfEmpty); } - @Override - public CollectionFuture> asyncLopGet(String key, int index, Transcoder tc) { - return this.getClient().asyncLopGet(key, index, tc); - } +// @Override +// public CollectionFuture> asyncLopGet(String key, int index, Transcoder tc) { +// return this.getClient().asyncLopGet(key, index, tc); +// } @Override public CollectionFuture> asyncLopGet(String key, int index, @@ -853,10 +853,11 @@ public CollectionFuture> asyncLopGet(String key, int index, dropIfEmpty, tc); } - @Override - public CollectionFuture> asyncLopGet(String key, int from, int to, Transcoder tc) { - return this.getClient().asyncLopGet(key, from, to, tc); - } +// @Override +// public CollectionFuture> asyncLopGet(String key, int from, int to, +// Transcoder tc) { +// return this.getClient().asyncLopGet(key, from, to, tc); +// } @Override public CollectionFuture> asyncLopGet(String key, @@ -868,11 +869,11 @@ public CollectionFuture> asyncLopGet(String key, dropIfEmpty, tc); } - @Override - public CollectionFuture> asyncSopGet(String key, int count) { - return this.getClient() - .asyncSopGet(key, count); - } +// @Override +// public CollectionFuture> asyncSopGet(String key, int count) { +// return this.getClient() +// .asyncSopGet(key, count); +// } @Override public CollectionFuture> asyncSopGet(String key, @@ -883,10 +884,10 @@ public CollectionFuture> asyncSopGet(String key, .asyncSopGet(key, count, withDelete, dropIfEmpty); } - @Override - public CollectionFuture> asyncSopGet(String key, int count, Transcoder tc) { - return this.getClient().asyncSopGet(key, count, tc); - } +// @Override +// public CollectionFuture> asyncSopGet(String key, int count, Transcoder tc) { +// return this.getClient().asyncSopGet(key, count, tc); +// } @Override public CollectionFuture> asyncSopGet(String key, @@ -928,11 +929,11 @@ public CollectionFuture asyncMopDelete(String key, String mkey, return this.getClient().asyncMopDelete(key, mkey, dropIfEmpty); } - @Override - public CollectionFuture asyncMopDelete(String key, List mkeyList, - boolean dropIfEmpty) { - return this.getClient().asyncMopDelete(key, mkeyList, dropIfEmpty); - } +// @Override +// public CollectionFuture asyncMopDelete(String key, List mkeyList, +// boolean dropIfEmpty) { +// return this.getClient().asyncMopDelete(key, mkeyList, dropIfEmpty); +// } @Override public CollectionFuture asyncLopDelete(String key, int index, @@ -1290,11 +1291,11 @@ public CollectionFuture> asyncBopPip attributesForCreate, tc); } - @Override - public CollectionFuture>> asyncBopGet( - String key, byte[] bkey, ElementFlagFilter eFlagFilter) { - return this.getClient().asyncBopGet(key, bkey, eFlagFilter); - } +// @Override +// public CollectionFuture>> asyncBopGet( +// String key, byte[] bkey, ElementFlagFilter eFlagFilter) { +// return this.getClient().asyncBopGet(key, bkey, eFlagFilter); +// } @Override public CollectionFuture>> asyncBopGet( @@ -1304,13 +1305,13 @@ public CollectionFuture>> asyncBopGet( dropIfEmpty); } - @Override - public CollectionFuture>> asyncBopGet( - String key, byte[] from, byte[] to, ElementFlagFilter eFlagFilter, - int offset, int count) { - return this.getClient().asyncBopGet(key, from, to, eFlagFilter, offset, - count); - } +// @Override +// public CollectionFuture>> asyncBopGet( +// String key, byte[] from, byte[] to, ElementFlagFilter eFlagFilter, +// int offset, int count) { +// return this.getClient().asyncBopGet(key, from, to, eFlagFilter, offset, +// count); +// } @Override public CollectionFuture>> asyncBopGet( @@ -1320,11 +1321,11 @@ public CollectionFuture>> asyncBopGet( count, withDelete, dropIfEmpty); } - @Override - public CollectionFuture>> asyncBopGet( - String key, byte[] bkey, ElementFlagFilter eFlagFilter, Transcoder tc) { - return this.getClient().asyncBopGet(key, bkey, eFlagFilter, tc); - } +// @Override +// public CollectionFuture>> asyncBopGet( +// String key, byte[] bkey, ElementFlagFilter eFlagFilter, Transcoder tc) { +// return this.getClient().asyncBopGet(key, bkey, eFlagFilter, tc); +// } @Override public CollectionFuture>> asyncBopGet( @@ -1334,13 +1335,13 @@ public CollectionFuture>> asyncBopGet( dropIfEmpty, tc); } - @Override - public CollectionFuture>> asyncBopGet( - String key, byte[] from, byte[] to, ElementFlagFilter eFlagFilter, - int offset, int count, Transcoder tc) { - return this.getClient().asyncBopGet(key, from, to, eFlagFilter, offset, - count, tc); - } +// @Override +// public CollectionFuture>> asyncBopGet( +// String key, byte[] from, byte[] to, ElementFlagFilter eFlagFilter, +// int offset, int count, Transcoder tc) { +// return this.getClient().asyncBopGet(key, from, to, eFlagFilter, offset, +// count, tc); +// } @Override public CollectionFuture>> asyncBopGet( diff --git a/src/test/manual/net/spy/memcached/collection/btree/BopOverflowActionTest.java b/src/test/manual/net/spy/memcached/collection/btree/BopOverflowActionTest.java index 7cff7c09a..e08ddc593 100644 --- a/src/test/manual/net/spy/memcached/collection/btree/BopOverflowActionTest.java +++ b/src/test/manual/net/spy/memcached/collection/btree/BopOverflowActionTest.java @@ -46,33 +46,33 @@ protected void setUp() throws Exception { // 0, true).get(1000, TimeUnit.MILLISECONDS); } - public void testBopGet_Maxcount() throws Exception { - // Test - for (int maxcount = 100; maxcount <= 300; maxcount += 100) { - // Create a B+ Tree - mc.asyncBopInsert(key, 0, null, "item0", new CollectionAttributes()); - - // Set maxcount - CollectionAttributes attrs = new CollectionAttributes(); - attrs.setMaxCount(maxcount); - assertTrue(mc.asyncSetAttr(key, attrs).get(1000, - TimeUnit.MILLISECONDS)); - - for (int i = 1; i <= maxcount; i++) { - mc.asyncBopInsert(key, i, null, "item" + i, - new CollectionAttributes()).get(); - } - - Map> result = mc.asyncBopGet(key, 0, - maxcount + 1000, ElementFlagFilter.DO_NOT_FILTER, 0, - maxcount + 1000).get(10000, - TimeUnit.MILLISECONDS); - assertEquals(maxcount, result.size()); - assertTrue(mc.asyncBopDelete(key, 0, 20000, - ElementFlagFilter.DO_NOT_FILTER, 0, false).get(1000, - TimeUnit.MILLISECONDS)); - } - } +// public void testBopGet_Maxcount() throws Exception { +// // Test +// for (int maxcount = 100; maxcount <= 300; maxcount += 100) { +// // Create a B+ Tree +// mc.asyncBopInsert(key, 0, null, "item0", new CollectionAttributes()); +// +// // Set maxcount +// CollectionAttributes attrs = new CollectionAttributes(); +// attrs.setMaxCount(maxcount); +// assertTrue(mc.asyncSetAttr(key, attrs).get(1000, +// TimeUnit.MILLISECONDS)); +// +// for (int i = 1; i <= maxcount; i++) { +// mc.asyncBopInsert(key, i, null, "item" + i, +// new CollectionAttributes()).get(); +// } +// +// Map> result = mc.asyncBopGet(key, 0, +// maxcount + 1000, ElementFlagFilter.DO_NOT_FILTER, 0, +// maxcount + 1000).get(10000, +// TimeUnit.MILLISECONDS); +// assertEquals(maxcount, result.size()); +// assertTrue(mc.asyncBopDelete(key, 0, 20000, +// ElementFlagFilter.DO_NOT_FILTER, 0, false).get(1000, +// TimeUnit.MILLISECONDS)); +// } +// } public void testBopGet_Overflow() throws Exception { // Create a B+ Tree diff --git a/src/test/manual/net/spy/memcached/collection/list/LopGetTest.java b/src/test/manual/net/spy/memcached/collection/list/LopGetTest.java index 1dae9163e..16242b470 100644 --- a/src/test/manual/net/spy/memcached/collection/list/LopGetTest.java +++ b/src/test/manual/net/spy/memcached/collection/list/LopGetTest.java @@ -100,17 +100,17 @@ public void testLopGet_GetWithDeletion() throws Exception { assertNull(rlist); } - public void testLopGet_simple() throws Exception { - CollectionAttributes attrs = null; - - // get all elements - List list = mc.asyncLopGet(key, 0, 9).get(1000, - TimeUnit.MILLISECONDS); - - assertEquals(list.size(), 9); - - // get count of the list and compare with count of items after using get method - attrs = mc.asyncGetAttr(key).get(1000, TimeUnit.MILLISECONDS); - assertEquals(9, attrs.getCount().intValue()); - } +// public void testLopGet_simple() throws Exception { +// CollectionAttributes attrs = null; +// +// // get all elements +// List list = mc.asyncLopGet(key, 0, 9).get(1000, +// TimeUnit.MILLISECONDS); +// +// assertEquals(list.size(), 9); +// +// // get count of the list and compare with count of items after using get method +// attrs = mc.asyncGetAttr(key).get(1000, TimeUnit.MILLISECONDS); +// assertEquals(9, attrs.getCount().intValue()); +// } } diff --git a/src/test/manual/net/spy/memcached/collection/map/MopDeleteTest.java b/src/test/manual/net/spy/memcached/collection/map/MopDeleteTest.java index 671b5ff34..1b11d2e54 100644 --- a/src/test/manual/net/spy/memcached/collection/map/MopDeleteTest.java +++ b/src/test/manual/net/spy/memcached/collection/map/MopDeleteTest.java @@ -16,8 +16,6 @@ */ package net.spy.memcached.collection.map; -import java.util.Arrays; -import java.util.List; import java.util.Map; import java.util.concurrent.TimeUnit; @@ -57,18 +55,18 @@ public void testMopDelete_NoMkey() throws Exception { assertFalse(mc.asyncMopDelete(key, "11", false).get(1000, TimeUnit.MILLISECONDS)); } - public void testMopDelete_oneNoMkeyList() throws Exception { - // Delete if key is in the map, Skip if key isn't in the map - List mkeyList = Arrays.asList("3", "no_key"); - assertTrue(mc.asyncMopDelete(key, mkeyList, false).get(1000, TimeUnit.MILLISECONDS)); - } - - public void testMopDelete_AllNoMkeyList() throws Exception { - // If all keys aren't in the map, return false - List mkeyList = Arrays.asList("no_key1", "no_key2"); - assertFalse(mc.asyncMopDelete(key, mkeyList, false).get(1000, - TimeUnit.MILLISECONDS)); - } +// public void testMopDelete_oneNoMkeyList() throws Exception { +// // Delete if key is in the map, Skip if key isn't in the map +// List mkeyList = Arrays.asList("3", "no_key"); +// assertTrue(mc.asyncMopDelete(key, mkeyList, false).get(1000, TimeUnit.MILLISECONDS)); +// } +// +// public void testMopDelete_AllNoMkeyList() throws Exception { +// // If all keys aren't in the map, return false +// List mkeyList = Arrays.asList("no_key1", "no_key2"); +// assertFalse(mc.asyncMopDelete(key, mkeyList, false).get(1000, +// TimeUnit.MILLISECONDS)); +// } public void testMopDelete_DeleteByBestEffort() throws Exception { // Delete items(2..11) in the map diff --git a/src/test/manual/net/spy/memcached/collection/map/MopGetTest.java b/src/test/manual/net/spy/memcached/collection/map/MopGetTest.java index d43a4750e..b373da410 100644 --- a/src/test/manual/net/spy/memcached/collection/map/MopGetTest.java +++ b/src/test/manual/net/spy/memcached/collection/map/MopGetTest.java @@ -115,22 +115,22 @@ public void testMopGet_GetWithDeletion() throws Exception { assertNull(rmap); } - public void testMopGet_simple() throws Exception { - CollectionAttributes attrs = null; - - List mKeyList = new ArrayList(); - for (int i = 0; i <= 9; i++) { - mKeyList.add(String.valueOf(i)); - } - - // get all elements - Map list = mc.asyncMopGet(key, mKeyList).get(1000, - TimeUnit.MILLISECONDS); - - assertEquals(list.size(), 9); - - // get count of the map and compare with count of items after using get method - attrs = mc.asyncGetAttr(key).get(1000, TimeUnit.MILLISECONDS); - assertEquals(9, attrs.getCount().intValue()); - } +// public void testMopGet_simple() throws Exception { +// CollectionAttributes attrs = null; +// +// List mKeyList = new ArrayList(); +// for (int i = 0; i <= 9; i++) { +// mKeyList.add(String.valueOf(i)); +// } +// +// // get all elements +// Map list = mc.asyncMopGet(key, mKeyList).get(1000, +// TimeUnit.MILLISECONDS); +// +// assertEquals(list.size(), 9); +// +// // get count of the map and compare with count of items after using get method +// attrs = mc.asyncGetAttr(key).get(1000, TimeUnit.MILLISECONDS); +// assertEquals(9, attrs.getCount().intValue()); +// } } diff --git a/src/test/manual/net/spy/memcached/emptycollection/GetWithDropSetTest.java b/src/test/manual/net/spy/memcached/emptycollection/GetWithDropSetTest.java index 2b3e6b84b..f676a90a0 100644 --- a/src/test/manual/net/spy/memcached/emptycollection/GetWithDropSetTest.java +++ b/src/test/manual/net/spy/memcached/emptycollection/GetWithDropSetTest.java @@ -107,26 +107,26 @@ public void testGetWithtDeleteAndWithDrop() { } } - public void testGetWithoutDeleteAndDropOptions() { - try { - // check attr - assertEquals(Long.valueOf(1), mc.asyncGetAttr(KEY).get() - .getCount()); - - //get value - assertTrue(mc.asyncSopGet(KEY, 10).get() - .contains(VALUE)); - - // check exists - assertEquals(Long.valueOf(1), mc.asyncGetAttr(KEY).get() - .getCount()); - - // get value again - assertTrue(mc.asyncSopGet(KEY, 10).get() - .contains(VALUE)); - } catch (Exception e) { - e.printStackTrace(); - fail(e.getMessage()); - } - } +// public void testGetWithoutDeleteAndDropOptions() { +// try { +// // check attr +// assertEquals(Long.valueOf(1), mc.asyncGetAttr(KEY).get() +// .getCount()); +// +// //get value +// assertTrue(mc.asyncSopGet(KEY, 10).get() +// .contains(VALUE)); +// +// // check exists +// assertEquals(Long.valueOf(1), mc.asyncGetAttr(KEY).get() +// .getCount()); +// +// // get value again +// assertTrue(mc.asyncSopGet(KEY, 10).get() +// .contains(VALUE)); +// } catch (Exception e) { +// e.printStackTrace(); +// fail(e.getMessage()); +// } +// } }