@@ -2625,7 +2625,7 @@ public SMGetFuture<List<SMGetElement<Object>>> asyncBopSortMergeGet(
26252625 int count , boolean unique ) {
26262626 KeyValidator .validateBKey (from , to );
26272627 keyValidator .validateKey (keyList );
2628- checkDupKey (keyList );
2628+ keyValidator . checkDupKey (keyList );
26292629 if (count < 1 ) {
26302630 throw new IllegalArgumentException ("Count must be larger than 0." );
26312631 }
@@ -2652,7 +2652,7 @@ public SMGetFuture<List<SMGetElement<Object>>> asyncBopSortMergeGet(
26522652 List <String > keyList , long from , long to , ElementFlagFilter eFlagFilter ,
26532653 int count , boolean unique ) {
26542654 keyValidator .validateKey (keyList );
2655- checkDupKey (keyList );
2655+ keyValidator . checkDupKey (keyList );
26562656 if (count < 1 ) {
26572657 throw new IllegalArgumentException ("Count must be larger than 0." );
26582658 }
@@ -2687,7 +2687,7 @@ public <T> Future<Map<String, CollectionOperationStatus>> asyncBopInsertBulk(
26872687
26882688 KeyValidator .validateBKey (bkey );
26892689 keyValidator .validateKey (keyList );
2690- checkDupKey (keyList );
2690+ keyValidator . checkDupKey (keyList );
26912691 Collection <Entry <MemcachedNode , List <String >>> arrangedKey =
26922692 groupingKeys (keyList , NON_PIPED_BULK_INSERT_CHUNK_SIZE , APIType .BOP_INSERT );
26932693
@@ -2721,7 +2721,7 @@ public <T> Future<Map<String, CollectionOperationStatus>> asyncBopInsertBulk(
27212721
27222722 KeyValidator .validateBKey (bkey );
27232723 keyValidator .validateKey (keyList );
2724- checkDupKey (keyList );
2724+ keyValidator . checkDupKey (keyList );
27252725 Collection <Entry <MemcachedNode , List <String >>> arrangedKey =
27262726 groupingKeys (keyList , NON_PIPED_BULK_INSERT_CHUNK_SIZE , APIType .BOP_INSERT );
27272727 List <CollectionBulkInsert <T >> insertList = new ArrayList <>(
@@ -2753,7 +2753,7 @@ public <T> Future<Map<String, CollectionOperationStatus>> asyncMopInsertBulk(
27532753
27542754 keyValidator .validateMKey (mkey );
27552755 keyValidator .validateKey (keyList );
2756- checkDupKey (keyList );
2756+ keyValidator . checkDupKey (keyList );
27572757 Collection <Entry <MemcachedNode , List <String >>> arrangedKey =
27582758 groupingKeys (keyList , NON_PIPED_BULK_INSERT_CHUNK_SIZE , APIType .MOP_INSERT );
27592759
@@ -2783,7 +2783,7 @@ public <T> Future<Map<String, CollectionOperationStatus>> asyncSopInsertBulk(
27832783 List <String > keyList , T value ,
27842784 CollectionAttributes attributesForCreate , Transcoder <T > tc ) {
27852785 keyValidator .validateKey (keyList );
2786- checkDupKey (keyList );
2786+ keyValidator . checkDupKey (keyList );
27872787
27882788 Collection <Entry <MemcachedNode , List <String >>> arrangedKey =
27892789 groupingKeys (keyList , NON_PIPED_BULK_INSERT_CHUNK_SIZE , APIType .SOP_INSERT );
@@ -2813,7 +2813,7 @@ public <T> Future<Map<String, CollectionOperationStatus>> asyncLopInsertBulk(
28132813 List <String > keyList , int index , T value ,
28142814 CollectionAttributes attributesForCreate , Transcoder <T > tc ) {
28152815 keyValidator .validateKey (keyList );
2816- checkDupKey (keyList );
2816+ keyValidator . checkDupKey (keyList );
28172817
28182818 Collection <Entry <MemcachedNode , List <String >>> arrangedKey =
28192819 groupingKeys (keyList , NON_PIPED_BULK_INSERT_CHUNK_SIZE , APIType .LOP_INSERT );
@@ -2881,7 +2881,7 @@ public <T> CollectionGetBulkFuture<Map<String, BTreeGetResult<Long, T>>> asyncBo
28812881 ElementFlagFilter eFlagFilter , int offset , int count , Transcoder <T > tc ) {
28822882 KeyValidator .validateBKey (from , to );
28832883 keyValidator .validateKey (keyList );
2884- checkDupKey (keyList );
2884+ keyValidator . checkDupKey (keyList );
28852885 if (offset < 0 ) {
28862886 throw new IllegalArgumentException ("Offset must be 0 or positive integer." );
28872887 }
@@ -2920,7 +2920,7 @@ public <T> CollectionGetBulkFuture<Map<String, BTreeGetResult<ByteArrayBKey, T>>
29202920 Transcoder <T > tc ) {
29212921 KeyValidator .validateBKey (from , to );
29222922 keyValidator .validateKey (keyList );
2923- checkDupKey (keyList );
2923+ keyValidator . checkDupKey (keyList );
29242924
29252925 if (offset < 0 ) {
29262926 throw new IllegalArgumentException ("Offset must be 0 or positive integer." );
@@ -3178,18 +3178,6 @@ public void complete() {
31783178 return rv ;
31793179 }
31803180
3181- private void checkDupKey (Collection <String > keyList ) {
3182- /*
3183- * Dup Check -> insure elements sequentially added to keyList
3184- * */
3185- HashSet <String > keySet = new HashSet <>();
3186- for (String key : keyList ) {
3187- if (!keySet .add (key )) {
3188- throw new IllegalArgumentException ("Duplicate keys exist in key list." );
3189- }
3190- }
3191- }
3192-
31933181 private CollectionOperationStatus toCollectionOperationStatus (OperationStatus status ) {
31943182 if (status instanceof CollectionOperationStatus ) {
31953183 return (CollectionOperationStatus ) status ;
0 commit comments