public interface ArrayPipelineCommands
| Modifier and Type | Method and Description |
|---|---|
Response<java.lang.Long> |
arcount(java.lang.String key)
ARCOUNT Command Returns the number of
non-empty elements in an array.
|
Response<java.lang.Long> |
ardel(java.lang.String key,
long... indices)
ARDEL Command Deletes elements at the
specified indices in an array.
|
Response<java.lang.Long> |
ardel(java.lang.String key,
long index)
ARDEL Command Deletes the element at a
single index in an array.
|
Response<java.lang.Long> |
ardelrange(java.lang.String key,
long start,
long end)
ARDELRANGE Command Convenience
single-range overload of
ardelrange(String, LongRange...). |
Response<java.lang.Long> |
ardelrange(java.lang.String key,
LongRange... ranges)
ARDELRANGE Command Deletes elements
in one or more inclusive
LongRange ranges of indices. |
Response<java.lang.String> |
arget(java.lang.String key,
long index)
ARGET Command Returns the value stored at
a single index in an array.
|
Response<java.util.List<java.lang.String>> |
argetrange(java.lang.String key,
long start,
long end)
ARGETRANGE Command Returns the values
at a contiguous range of indices.
|
Response<java.util.List<java.lang.Long>> |
argrep(java.lang.String key,
ArgrepParams params)
ARGREP Command Searches array elements
within an inclusive index range (carried by
ArgrepParams) using one or more textual
predicates and returns the matching indices. |
Response<java.util.List<KeyValue<java.lang.Long,java.lang.String>>> |
argrepWithValues(java.lang.String key,
ArgrepParams params)
ARGREP Command Searches array elements
within an inclusive index range (carried by
ArgrepParams) and returns the matching
index/value pairs. |
Response<ArrayInfo> |
arinfo(java.lang.String key)
ARINFO Command Returns metadata
describing an array.
|
Response<ArrayFullInfo> |
arinfoFull(java.lang.String key)
ARINFO Command Returns the
FULL
variant of the array metadata. |
Response<java.lang.Long> |
arinsert(java.lang.String key,
java.lang.String... values)
ARINSERT Command Inserts one or more
values at consecutive indices beginning at the current insert cursor position.
|
Response<java.lang.Long> |
arinsert(java.lang.String key,
java.lang.String value)
ARINSERT Command Convenience
single-value overload of
arinsert(String, String...). |
Response<java.util.List<java.lang.String>> |
arlastitems(java.lang.String key,
long count)
ARLASTITEMS Command Returns the most
recently inserted elements in oldest-first order.
|
Response<java.util.List<java.lang.String>> |
arlastitems(java.lang.String key,
long count,
boolean rev)
ARLASTITEMS Command Returns the most
recently inserted elements.
|
Response<java.lang.Long> |
arlen(java.lang.String key)
ARLEN Command Returns the length of an
array (max index + 1).
|
Response<java.util.List<java.lang.String>> |
armget(java.lang.String key,
long... indices)
ARMGET Command Returns the values at
multiple indices.
|
Response<java.lang.Long> |
armset(java.lang.String key,
java.util.Map<java.lang.Long,java.lang.String> indexValueMap)
ARMSET Command Sets multiple index-value
pairs.
|
Response<java.lang.Long> |
arnext(java.lang.String key)
ARNEXT Command Returns the next index
that
ARINSERT would use. |
Response<java.lang.String> |
aropAggregate(java.lang.String key,
long start,
long end,
ArrayAggregate op)
AROP Command Applies a numeric aggregate
over the non-empty elements in the inclusive
[start, end] range. |
Response<java.lang.Long> |
aropBitwise(java.lang.String key,
long start,
long end,
ArrayBitwise op)
AROP Command Applies a bitwise operation
over the non-empty elements in the inclusive
[start, end] range. |
Response<java.lang.Long> |
aropCount(java.lang.String key,
long start,
long end)
AROP Command Counts the number of non-empty
elements in the inclusive
[start, end] range using the USED subcommand. |
Response<java.lang.Long> |
aropCount(java.lang.String key,
long start,
long end,
java.lang.String match)
AROP Command Counts elements in the
inclusive
[start, end] range whose value equals match using the MATCH
subcommand. |
Response<java.lang.Long> |
arring(java.lang.String key,
long size,
java.lang.String... values)
ARRING Command Inserts one or more values
into an array as a fixed-size ring buffer.
|
Response<java.lang.Long> |
arring(java.lang.String key,
long size,
java.lang.String value)
ARRING Command Convenience single-value
overload of
arring(String, long, String...). |
Response<java.util.List<KeyValue<java.lang.Long,java.lang.String>>> |
arscan(java.lang.String key,
long start,
long end)
ARSCAN Command Iterates existing elements
in an inclusive index range and returns the index/value pairs.
|
Response<java.util.List<KeyValue<java.lang.Long,java.lang.String>>> |
arscan(java.lang.String key,
long start,
long end,
long limit)
ARSCAN Command Iterates existing elements
in an inclusive index range with a cap on the number of pairs returned.
|
Response<java.lang.Long> |
arseek(java.lang.String key,
long index)
ARSEEK Command Sets the insert cursor of
an array to a specific index.
|
Response<java.lang.Long> |
arset(java.lang.String key,
long index,
java.lang.String... values)
ARSET Command Sets one or more contiguous
values starting at
index. |
Response<java.lang.Long> |
arset(java.lang.String key,
long index,
java.lang.String value)
ARSET Command Convenience single-value
overload of
arset(String, long, String...). |
@Experimental Response<java.lang.Long> arcount(java.lang.String key)
Time complexity: O(1)
Wire: ARCOUNT key
key - the name of the key that holds the arrayResponse that resolves to the number of non-empty elements, or 0 if
key does not exist@Experimental Response<java.lang.Long> ardel(java.lang.String key, long index)
Time complexity: O(1)
Wire: ARDEL key index
key - the name of the key that holds the arrayindex - the zero-based index to deleteResponse that resolves to 1 if an element was deleted, 0
otherwise@Experimental Response<java.lang.Long> ardel(java.lang.String key, long... indices)
Time complexity: O(N) where N is the number of indices supplied.
Wire: ARDEL key index1 [index2 ...]
key - the name of the key that holds the arrayindices - one or more zero-based indices to deleteResponse that resolves to the number of elements actually deleted@Experimental Response<java.lang.Long> ardelrange(java.lang.String key, LongRange... ranges)
LongRange ranges of indices.
Time complexity: O(M + N) where M is the number of ranges and N the total number of elements they cover.
Wire: ARDELRANGE key r1.start r1.end [r2.start r2.end ...]
key - the name of the key that holds the arrayranges - one or more inclusive index rangesResponse that resolves to the number of elements deleted@Experimental Response<java.lang.Long> ardelrange(java.lang.String key, long start, long end)
ardelrange(String, LongRange...).
Wire: ARDELRANGE key start end
key - the name of the key that holds the arraystart - zero-based start index (inclusive)end - zero-based end index (inclusive)Response that resolves to the number of elements deleted@Experimental Response<java.lang.String> arget(java.lang.String key, long index)
Time complexity: O(1)
Wire: ARGET key index
key - the name of the key that holds the arrayindex - the zero-based index of the element to retrieveResponse that resolves to the value at the given index, or null if
the key or index does not exist@Experimental Response<java.util.List<java.lang.String>> argetrange(java.lang.String key, long start, long end)
Time complexity: O(N) where N is the number of elements in the range.
Wire: ARGETRANGE key start end
key - the name of the key that holds the arraystart - zero-based start index of the rangeend - zero-based end index of the range (inclusive)Response that resolves to the list of values in traversal order; empty slots
appear as null entries@Experimental Response<java.util.List<java.lang.Long>> argrep(java.lang.String key, ArgrepParams params)
ArgrepParams) using one or more textual
predicates and returns the matching indices.
Time complexity: O(N) where N is the number of elements scanned.
Wire: ARGREP key start end <params>
key - the name of the key that holds the arrayparams - the search range, predicates and options to applyResponse that resolves to the matching indices in traversal order@Experimental Response<java.util.List<KeyValue<java.lang.Long,java.lang.String>>> argrepWithValues(java.lang.String key, ArgrepParams params)
ArgrepParams) and returns the matching
index/value pairs.
Time complexity: O(N) where N is the number of elements scanned.
Wire: ARGREP key start end <params> WITHVALUES
key - the name of the key that holds the arrayparams - the search range, predicates and options to applyResponse that resolves to the matching index/value pairs@Experimental Response<ArrayInfo> arinfo(java.lang.String key)
@Experimental Response<ArrayFullInfo> arinfoFull(java.lang.String key)
FULL
variant of the array metadata.
Time complexity: O(S) where S is the number of slices.
Wire: ARINFO key FULL
key - the name of the key that holds the arrayResponse that resolves to a typed ArrayFullInfo, or null if
the key does not exist@Experimental Response<java.lang.Long> arinsert(java.lang.String key, java.lang.String... values)
Time complexity: O(N) where N is the number of values inserted.
Wire: ARINSERT key value1 [value2 ...]
key - the name of the key that holds the arrayvalues - one or more values to insertResponse that resolves to the last index at which a value was inserted@Experimental Response<java.lang.Long> arinsert(java.lang.String key, java.lang.String value)
arinsert(String, String...).
Wire: ARINSERT key value
key - the name of the key that holds the arrayvalue - the value to insertResponse that resolves to the index at which the value was inserted@Experimental Response<java.util.List<java.lang.String>> arlastitems(java.lang.String key, long count)
Time complexity: O(N) where N is the number of returned elements.
Wire: ARLASTITEMS key count
key - the name of the key that holds the arraycount - the maximum number of elements to returnResponse that resolves to the list of last-inserted values@Experimental Response<java.util.List<java.lang.String>> arlastitems(java.lang.String key, long count, boolean rev)
rev is true, elements are returned in reverse
chronological order.
Time complexity: O(N) where N is the number of returned elements.
Wire: ARLASTITEMS key count [REV]
key - the name of the key that holds the arraycount - the maximum number of elements to returnrev - whether to request the REV variantResponse that resolves to the list of last-inserted values@Experimental Response<java.lang.Long> arlen(java.lang.String key)
key - the name of the key that holds the arrayResponse that resolves to the array length, or 0 if the key does not
exist@Experimental Response<java.util.List<java.lang.String>> armget(java.lang.String key, long... indices)
Time complexity: O(N) where N is the number of requested indices.
Wire: ARMGET key index1 [index2 ...]
key - the name of the key that holds the arrayindices - one or more zero-based indices to retrieveResponse that resolves to the list of values aligned with indices;
missing slots appear as null@Experimental Response<java.lang.Long> armset(java.lang.String key, java.util.Map<java.lang.Long,java.lang.String> indexValueMap)
Time complexity: O(N) where N is the number of pairs.
Wire: ARMSET key index1 value1 [index2 value2 ...]
key - the name of the key that holds the arrayindexValueMap - the index-to-value pairs to writeResponse that resolves to the number of slots that were previously empty@Experimental Response<java.lang.Long> arnext(java.lang.String key)
ARINSERT would use.
Time complexity: O(1)
Wire: ARNEXT key
key - the name of the key that holds the arrayResponse that resolves to 0L for missing keys, the next insert index
when one is available, or null when the cursor is exhausted@Experimental Response<java.lang.Long> aropBitwise(java.lang.String key, long start, long end, ArrayBitwise op)
[start, end] range.
Time complexity: O(N) where N is the number of elements scanned.
Wire: AROP key start end AND|OR|XOR
key - the name of the key that holds the arraystart - zero-based start index (inclusive)end - zero-based end index (inclusive)op - the bitwise operator to applyResponse that resolves to the operation's numeric result@Experimental Response<java.lang.String> aropAggregate(java.lang.String key, long start, long end, ArrayAggregate op)
[start, end] range.
Time complexity: O(N) where N is the number of elements scanned.
Wire: AROP key start end SUM|MIN|MAX
key - the name of the key that holds the arraystart - zero-based start index (inclusive)end - zero-based end index (inclusive)op - the aggregate operator to applyResponse that resolves to the aggregate value, or null when the range
is empty@Experimental Response<java.lang.Long> aropCount(java.lang.String key, long start, long end)
[start, end] range using the USED subcommand.
Time complexity: O(N) where N is the number of elements scanned.
Wire: AROP key start end USED
key - the name of the key that holds the arraystart - zero-based start index (inclusive)end - zero-based end index (inclusive)Response that resolves to the count of non-empty elements@Experimental Response<java.lang.Long> aropCount(java.lang.String key, long start, long end, java.lang.String match)
[start, end] range whose value equals match using the MATCH
subcommand.
Time complexity: O(N) where N is the number of elements scanned.
Wire: AROP key start end MATCH match
key - the name of the key that holds the arraystart - zero-based start index (inclusive)end - zero-based end index (inclusive)match - the value to matchResponse that resolves to the count of matching elements@Experimental Response<java.lang.Long> arring(java.lang.String key, long size, java.lang.String... values)
Time complexity: O(N) where N is the number of values inserted.
Wire: ARRING key size value1 [value2 ...]
key - the name of the key that holds the arraysize - the ring buffer window sizevalues - one or more values to insertResponse that resolves to the last index at which a value was inserted@Experimental Response<java.lang.Long> arring(java.lang.String key, long size, java.lang.String value)
arring(String, long, String...).
Wire: ARRING key size value
key - the name of the key that holds the arraysize - the ring buffer window sizevalue - the value to insertResponse that resolves to the index at which the value was inserted@Experimental Response<java.util.List<KeyValue<java.lang.Long,java.lang.String>>> arscan(java.lang.String key, long start, long end)
Time complexity: O(N) where N is the number of populated elements.
Wire: ARSCAN key start end
key - the name of the key that holds the arraystart - zero-based start index; when start > end the iteration is reversedend - zero-based end index (inclusive)Response that resolves to the populated (index, value) pairs@Experimental Response<java.util.List<KeyValue<java.lang.Long,java.lang.String>>> arscan(java.lang.String key, long start, long end, long limit)
Time complexity: O(N) where N is the number of populated elements returned.
Wire: ARSCAN key start end LIMIT limit
key - the name of the key that holds the arraystart - zero-based start index; when start > end the iteration is reversedend - zero-based end index (inclusive)limit - cap on the number of returned populated elementsResponse that resolves to the populated (index, value) pairs@Experimental Response<java.lang.Long> arseek(java.lang.String key, long index)
Time complexity: O(1)
Wire: ARSEEK key index
key - the name of the key that holds the arrayindex - the zero-based index to set as the new insert cursorResponse that resolves to 1 if the cursor was set, 0 if the
key does not exist@Experimental Response<java.lang.Long> arset(java.lang.String key, long index, java.lang.String... values)
index.
Time complexity: O(N) where N is the number of values written.
Wire: ARSET key index value1 [value2 ...]
key - the name of the key that holds the arrayindex - zero-based starting indexvalues - one or more values to write at consecutive indicesResponse that resolves to the number of slots that were previously empty@Experimental Response<java.lang.Long> arset(java.lang.String key, long index, java.lang.String value)
arset(String, long, String...).
Wire: ARSET key index value
key - the name of the key that holds the arrayindex - zero-based index at which to store the valuevalue - the value to writeResponse that resolves to the number of slots that were previously emptyCopyright © 2026. All rights reserved.