3030import net .spy .memcached .v2 .vo .BTreeUpdateElement ;
3131import net .spy .memcached .v2 .vo .BopDeleteArgs ;
3232import net .spy .memcached .v2 .vo .BopGetArgs ;
33+ import net .spy .memcached .v2 .vo .GetArgs ;
3334import net .spy .memcached .v2 .vo .SMGetElements ;
3435
3536public interface AsyncArcusCommandsIF <T > {
@@ -73,7 +74,7 @@ public interface AsyncArcusCommandsIF<T> {
7374 * @param value the new value to set if the CAS ID matches
7475 * @param casId the CAS ID obtained from {@link #gets(String)}
7576 * @return {@code Boolean.True} if compared and set successfully,
76- * {@code Boolean.False} if the key does not exist or CAS ID does not match
77+ * {@code Boolean.False} if the key does not exist or CAS ID does not match
7778 */
7879 ArcusFuture <Boolean > cas (String key , int exp , T value , long casId );
7980
@@ -99,7 +100,7 @@ public interface AsyncArcusCommandsIF<T> {
99100 * Sets multiple key-value pairs.
100101 *
101102 * @param items map of keys and values to store
102- * @param exp expiration time in seconds
103+ * @param exp expiration time in seconds
103104 * @return Map of key to Boolean result
104105 */
105106 ArcusFuture <Map <String , Boolean >> multiSet (Map <String , T > items , int exp );
@@ -108,7 +109,7 @@ public interface AsyncArcusCommandsIF<T> {
108109 * Add multiple key-value pairs if they do not exist.
109110 *
110111 * @param items map of keys and values to store
111- * @param exp expiration time in seconds
112+ * @param exp expiration time in seconds
112113 * @return Map of key to Boolean result
113114 */
114115 ArcusFuture <Map <String , Boolean >> multiAdd (Map <String , T > items , int exp );
@@ -117,7 +118,7 @@ public interface AsyncArcusCommandsIF<T> {
117118 * Replace multiple key-value pairs if they exist.
118119 *
119120 * @param items map of keys and values to store
120- * @param exp expiration time in seconds
121+ * @param exp expiration time in seconds
121122 * @return Map of key to Boolean result
122123 */
123124 ArcusFuture <Map <String , Boolean >> multiReplace (Map <String , T > items , int exp );
@@ -431,7 +432,7 @@ ArcusFuture<SMGetElements<T>> bopSortMergeGet(List<String> keys, BKey from, BKey
431432 * ({@code delta} is ignored) (≥ 0)
432433 * @param eFlag eFlag of the element to create, or {@code null} if not needed
433434 * @return the new value after decrement,
434- * or {@code initial} if the element did not exist.
435+ * or {@code initial} if the element did not exist.
435436 */
436437 ArcusFuture <Long > bopDecr (String key , BKey bKey , int delta , long initial , byte [] eFlag );
437438
@@ -475,4 +476,82 @@ ArcusFuture<SMGetElements<T>> bopSortMergeGet(List<String> keys, BKey from, BKey
475476 * or {@code null} if the key is not found.
476477 */
477478 ArcusFuture <Long > bopCount (String key , BKey from , BKey to , ElementFlagFilter eFlagFilter );
479+
480+ /**
481+ * Create a list with the given attributes.
482+ *
483+ * @param key key of the list to create
484+ * @param type element value type
485+ * @param attributes initial attributes of the list
486+ * @return {@code true} if created, {@code false} if the key already exists.
487+ */
488+ ArcusFuture <Boolean > lopCreate (String key , ElementValueType type ,
489+ CollectionAttributes attributes );
490+
491+ /**
492+ * Insert an element at the given index into a list.
493+ *
494+ * @param key key of the list
495+ * @param index index at which to insert the element
496+ * @param value the value to insert
497+ * @return {@code true} if the element was inserted, {@code null} if the key is not found.
498+ */
499+ ArcusFuture <Boolean > lopInsert (String key , int index , T value );
500+
501+ /**
502+ * Insert an element at the given index into a list.
503+ * If the list does not exist, it is created with the given attributes.
504+ *
505+ * @param key key of the list
506+ * @param index index at which to insert the element
507+ * @param value the value to insert
508+ * @param attributes attributes to use when creating the list, or {@code null} to not create
509+ * @return {@code true} if the element was inserted, {@code null} if the key is not found.
510+ */
511+ ArcusFuture <Boolean > lopInsert (String key , int index , T value , CollectionAttributes attributes );
512+
513+ /**
514+ * Get an element at the given index from a list.
515+ *
516+ * @param key key of the list
517+ * @param index index of the element to get
518+ * @param args arguments for get operation
519+ * @return the element value, {@code null} if the key or element is not found.
520+ */
521+ ArcusFuture <T > lopGet (String key , int index , GetArgs args );
522+
523+ /**
524+ * Get elements in an index range from a list.
525+ *
526+ * @param key key of the list
527+ * @param from index range start (inclusive)
528+ * @param to index range end (inclusive)
529+ * @param args arguments for get operation
530+ * @return list of element values in order, an empty list if no elements are found in the range,
531+ * {@code null} if the key is not found.
532+ */
533+ ArcusFuture <List <T >> lopGet (String key , int from , int to , GetArgs args );
534+
535+ /**
536+ * Delete an element at the given index from a list.
537+ *
538+ * @param key key of the list
539+ * @param index index of the element to delete
540+ * @param dropIfEmpty whether to delete the list if it becomes empty after deletion
541+ * @return {@code true} if the element was deleted, {@code null} if the key is not found,
542+ * {@code false} if the element is not found.
543+ */
544+ ArcusFuture <Boolean > lopDelete (String key , int index , boolean dropIfEmpty );
545+
546+ /**
547+ * Delete elements in an index range from a list.
548+ *
549+ * @param key key of the list
550+ * @param from index range start (inclusive)
551+ * @param to index range end (inclusive)
552+ * @param dropIfEmpty whether to delete the list if it becomes empty after deletion
553+ * @return {@code true} if at least one element was deleted, {@code null} if the key is not found,
554+ * {@code false} if no elements are found in the range.
555+ */
556+ ArcusFuture <Boolean > lopDelete (String key , int from , int to , boolean dropIfEmpty );
478557}
0 commit comments