Package io.toro.martini.redis
Class RedisListMethods
- java.lang.Object
-
- io.toro.martini.redis.RedisBaseMethods
-
- io.toro.martini.redis.RedisListMethods
-
public class RedisListMethods extends io.toro.martini.redis.RedisBaseMethods
Methods for Lists.
-
-
Constructor Summary
Constructors Constructor Description RedisListMethods(io.toro.martini.database.DataSourceManager dataSourceManager)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static GloopModel
blpop(String connectionName, long timeout, GloopExecutionContext context, Object... keys)
Remove and get the first element in a list, or block until one is available.static Future<KeyValue<Object,Object>>
blpopAsync(String connectionName, long timeout, GloopExecutionContext context, Object... keys)
Asynchronously remove and get the first element in a list, or block until one is available.static GloopModel
brpop(String connectionName, long timeout, GloopExecutionContext context, Object... keys)
Remove and get the last element in a list, or block until one is available.static Future<KeyValue<Object,Object>>
brpopAsync(String connectionName, long timeout, GloopExecutionContext context, Object... keys)
Asynchronously remove and get the last element in a list, or block until one is available.static Object
brpoplpush(String connectionName, long timeout, Object source, Object destination, GloopExecutionContext context)
Pop a value from a list, push it to another list and return it; or block until one is available.static Future<Object>
brpoplpushAsync(String connectionName, long timeout, Object source, Object destination, GloopExecutionContext context)
Asynchronously pop a value from a list, push it to another list and return it; or block until one is available.static Object
lindex(String connectionName, Object key, long index, GloopExecutionContext context)
Get an element from a list by its index.static Future<Object>
lindexAsync(String connectionName, Object key, long index, GloopExecutionContext context)
Asynchronously get an element from a list by its index.static Long
linsert(String connectionName, Object key, boolean before, Object pivot, Object value, GloopExecutionContext context)
Insert an element before or after another element in a list.static Future<Long>
linsertAsync(String connectionName, Object key, boolean before, Object pivot, Object value, GloopExecutionContext context)
Asynchronously insert an element before or after another element in a list.static Long
llen(String connectionName, Object key, GloopExecutionContext context)
Get the length of a list.static Future<Long>
llenAsync(String connectionName, Object key, GloopExecutionContext context)
Asynchronously get the length of a list.static Object
lpop(String connectionName, Object key, GloopExecutionContext context)
Remove and get the first element in a list.static Future<Object>
lpopAsync(String connectionName, Object key, GloopExecutionContext context)
Asynchronously remove and get the first element in a list.static Long
lpos(String connectionName, Object key, Object value, GloopExecutionContext context)
Return the index of matching elements inside a Redis list.static Future<Long>
lposAsync(String connectionName, Object key, Object value, GloopExecutionContext context)
Asynchronously return the index of matching elements inside a Redis list.static Long
lpush(String connectionName, Object key, GloopExecutionContext context, Object... values)
Prepend one or multiple values to a list.static Future<Long>
lpushAsync(String connectionName, Object key, GloopExecutionContext context, Object... values)
Asynchronously prepend one or multiple values to a list.static Long
lpushx(String connectionName, Object key, GloopExecutionContext context, Object... values)
Prepend values to a list, only if the list exists.static Future<Long>
lpushxAsync(String connectionName, Object key, GloopExecutionContext context, Object... values)
Asynchronously prepend values to a list, only if the list exists.static Long
lrange(String connectionName, ValueStreamingChannel<Object> channel, Object key, long start, long stop, GloopExecutionContext context)
Get a range of elements from a list.static List<Object>
lrange(String connectionName, Object key, long start, long stop, GloopExecutionContext context)
Get a range of elements from a list.static Future<Long>
lrangeAsync(String connectionName, ValueStreamingChannel<Object> channel, Object key, long start, long stop, GloopExecutionContext context)
Asynchronously get a range of elements from a list.static Future<List<Object>>
lrangeAsync(String connectionName, Object key, long start, long stop, GloopExecutionContext context)
Asynchronously get a range of elements from a list.static Long
lrem(String connectionName, Object key, long count, Object value, GloopExecutionContext context)
Remove elements from a list.static Future<Long>
lremAsync(String connectionName, Object key, long count, Object value, GloopExecutionContext context)
Asynchronously remove elements from a list.static String
lset(String connectionName, Object key, long index, Object value, GloopExecutionContext context)
Set the value of an element in a list by its index.static Future<String>
lsetAsync(String connectionName, Object key, long index, Object value, GloopExecutionContext context)
Asynchronously set the value of an element in a list by its index.static String
ltrim(String connectionName, Object key, long start, long stop, GloopExecutionContext context)
Trim a list to the specified range.static Future<String>
ltrimAsync(String connectionName, Object key, long start, long stop, GloopExecutionContext context)
Asynchronously trim a list to the specified range.static Object
rpop(String connectionName, Object key, GloopExecutionContext context)
Remove and get the last element in a list.static Future<Object>
rpopAsync(String connectionName, Object key, GloopExecutionContext context)
Asynchronously remove and get the last element in a list.static Object
rpoplpush(String connectionName, Object source, Object destination, GloopExecutionContext context)
Remove the last element in a list, append it to another list and return it.static Future<Object>
rpoplpushAsync(String connectionName, Object source, Object destination, GloopExecutionContext context)
Asynchronously remove the last element in a list, append it to another list and return it.static Long
rpush(String connectionName, Object key, GloopExecutionContext context, Object... values)
Append one or multiple values to a list.static Future<Long>
rpushAsync(String connectionName, Object key, GloopExecutionContext context, Object... values)
Asynchronously append one or multiple values to a list.static Long
rpushx(String connectionName, Object key, GloopExecutionContext context, Object... values)
Append values to a list, only if the list exists.static Future<Long>
rpushxAsync(String connectionName, Object key, GloopExecutionContext context, Object... values)
Asynchronously append values to a list, only if the list exists.
-
-
-
Constructor Detail
-
RedisListMethods
@Autowired RedisListMethods(io.toro.martini.database.DataSourceManager dataSourceManager)
-
-
Method Detail
-
blpop
@GloopObjectParameter("output{\n redisKeyValue{\n key:object\n value:object\n }\n}") public static GloopModel blpop(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) long timeout, GloopExecutionContext context, @GloopParameter(allowNull=false) Object... keys)
Remove and get the first element in a list, or block until one is available.- Parameters:
connectionName
- The Martini Runtime Redis connection pool nametimeout
- the timeout in secondskeys
- the keys- Returns:
- KeyValue<K,V> array-reply specifically: A null multi-bulk when no element could be popped and the timeout expired. A two-element multi-bulk with the first element being the name of the key where an element was popped and the second element being the value of the popped element.
-
blpopAsync
@GloopParameter(name="redisFutureBlpopOutput") public static Future<KeyValue<Object,Object>> blpopAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) long timeout, GloopExecutionContext context, @GloopParameter(allowNull=false) Object... keys)
Asynchronously remove and get the first element in a list, or block until one is available.- Parameters:
connectionName
- The Martini Runtime Redis connection pool nametimeout
- the timeout in secondskeys
- the keys- Returns:
- keyValue<K,V> array-reply specifically: a null multi-bulk when no element could be popped and the timeout expired. a two-element multi-bulk with the first element being the name of the key where an element was popped and the second element being the value of the popped element.
-
brpop
@GloopObjectParameter("output{\n redisKeyValue{\n key:object\n value:object\n }\n}") public static GloopModel brpop(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) long timeout, GloopExecutionContext context, @GloopParameter(allowNull=false) Object... keys)
Remove and get the last element in a list, or block until one is available.- Parameters:
connectionName
- The Martini Runtime Redis connection pool nametimeout
- the timeout in secondskeys
- the keys- Returns:
- KeyValue<K,V> array-reply specifically: A null multi-bulk when no element could be popped and the timeout expired. A two-element multi-bulk with the first element being the name of the key where an element was popped and the second element being the value of the popped element.
-
brpopAsync
@GloopParameter(name="redisFutureBrpopOutput") public static Future<KeyValue<Object,Object>> brpopAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) long timeout, GloopExecutionContext context, @GloopParameter(allowNull=false) Object... keys)
Asynchronously remove and get the last element in a list, or block until one is available.- Parameters:
connectionName
- The Martini Runtime Redis connection pool nametimeout
- the timeout in secondskeys
- the keys- Returns:
- keyValue<K,V> array-reply specifically: a null multi-bulk when no element could be popped and the timeout expired. a two-element multi-bulk with the first element being the name of the key where an element was popped and the second element being the value of the popped element.
-
brpoplpush
@GloopParameter(name="redisBrpoplpushOutput") public static Object brpoplpush(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) long timeout, @GloopParameter(allowNull=false) Object source, @GloopParameter(allowNull=false) Object destination, GloopExecutionContext context)
Pop a value from a list, push it to another list and return it; or block until one is available.- Parameters:
connectionName
- The Martini Runtime Redis connection pool nametimeout
- the timeout in secondssource
- the source keydestination
- the destination type: key- Returns:
- V bulk-string-reply the element being popped from
source
and pushed todestination
. Iftimeout
is reached, a
-
brpoplpushAsync
@GloopParameter(name="redisFutureBrpoplpushOutput") public static Future<Object> brpoplpushAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) long timeout, @GloopParameter(allowNull=false) Object source, @GloopParameter(allowNull=false) Object destination, GloopExecutionContext context)
Asynchronously pop a value from a list, push it to another list and return it; or block until one is available.- Parameters:
connectionName
- The Martini Runtime Redis connection pool nametimeout
- the timeout in secondssource
- the source keydestination
- the destination type: key- Returns:
- v bulk-string-reply the element being popped from
source
and pushed todestination
. iftimeout
is reached, a
-
lindex
@GloopParameter(name="redisLindexOutput") public static Object lindex(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) long index, GloopExecutionContext context)
Get an element from a list by its index.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the keyindex
- the index type: long- Returns:
- V bulk-string-reply the requested element, or null when
index
is out of range.
-
lindexAsync
@GloopParameter(name="redisFutureLindexOutput") public static Future<Object> lindexAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) long index, GloopExecutionContext context)
Asynchronously get an element from a list by its index.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the keyindex
- the index type: long- Returns:
- v bulk-string-reply the requested element, or null when
index
is out of range.
-
linsert
@GloopParameter(name="redisLinsertOutput") public static Long linsert(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) boolean before, @GloopParameter(allowNull=false) Object pivot, @GloopParameter(allowNull=false) Object value, GloopExecutionContext context)
Insert an element before or after another element in a list.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the keybefore
- the beforepivot
- the pivotvalue
- the value- Returns:
- Long integer-reply the length of the list after the insert operation, or
-1
when the valuepivot
was not found.
-
linsertAsync
@GloopParameter(name="redisFutureLinsertOutput") public static Future<Long> linsertAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) boolean before, @GloopParameter(allowNull=false) Object pivot, @GloopParameter(allowNull=false) Object value, GloopExecutionContext context)
Asynchronously insert an element before or after another element in a list.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the keybefore
- the beforepivot
- the pivotvalue
- the value- Returns:
- long integer-reply the length of the list after the insert operation, or
-1
when the valuepivot
was not found.
-
llen
@GloopParameter(name="redisLlenOutput") public static Long llen(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, GloopExecutionContext context)
Get the length of a list.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the key- Returns:
- Long integer-reply the length of the list at
key
.
-
llenAsync
@GloopParameter(name="redisFutureLlenOutput") public static Future<Long> llenAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, GloopExecutionContext context)
Asynchronously get the length of a list.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the key- Returns:
- long integer-reply the length of the list at
key
.
-
lpop
@GloopParameter(name="redisLpopOutput") public static Object lpop(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, GloopExecutionContext context)
Remove and get the first element in a list.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the key- Returns:
- V bulk-string-reply the value of the first element, or null when
key
does not exist.
-
lpopAsync
@GloopParameter(name="redisFutureLpopOutput") public static Future<Object> lpopAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, GloopExecutionContext context)
Asynchronously remove and get the first element in a list.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the key- Returns:
- v bulk-string-reply the value of the first element, or null when
key
does not exist.
-
lpos
@GloopParameter(name="redisLposOutput") public static Long lpos(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) Object value, GloopExecutionContext context)
Return the index of matching elements inside a Redis list.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the keyvalue
- the value- Returns:
-
lposAsync
@GloopParameter(name="redisFutureLposOutput") public static Future<Long> lposAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) Object value, GloopExecutionContext context)
Asynchronously return the index of matching elements inside a Redis list.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the keyvalue
- the value- Returns:
-
lpush
@GloopParameter(name="redisLpushOutput") public static Long lpush(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, GloopExecutionContext context, @GloopParameter(allowNull=false) Object... values)
Prepend one or multiple values to a list.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the keyvalues
- the value- Returns:
- Long integer-reply the length of the list after the push operations.
-
lpushAsync
@GloopParameter(name="redisFutureLpushOutput") public static Future<Long> lpushAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, GloopExecutionContext context, @GloopParameter(allowNull=false) Object... values)
Asynchronously prepend one or multiple values to a list.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the keyvalues
- the value- Returns:
- long integer-reply the length of the list after the push operations.
-
lpushx
@GloopParameter(name="redisLpushxOutput") public static Long lpushx(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, GloopExecutionContext context, @GloopParameter(allowNull=false) Object... values)
Prepend values to a list, only if the list exists.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the keyvalues
- the values- Returns:
- Long integer-reply the length of the list after the push operation.
-
lpushxAsync
@GloopParameter(name="redisFutureLpushxOutput") public static Future<Long> lpushxAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, GloopExecutionContext context, @GloopParameter(allowNull=false) Object... values)
Asynchronously prepend values to a list, only if the list exists.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the keyvalues
- the values- Returns:
- long integer-reply the length of the list after the push operation.
-
lrange
@GloopParameter(name="redisLrangeOutput") public static List<Object> lrange(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) long start, @GloopParameter(allowNull=false) long stop, GloopExecutionContext context)
Get a range of elements from a list.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the keystart
- the start type: longstop
- the stop type: long- Returns:
- List<V> array-reply list of elements in the specified range.
-
lrange
@GloopParameter(name="redisLrangeOutput") public static Long lrange(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) ValueStreamingChannel<Object> channel, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) long start, @GloopParameter(allowNull=false) long stop, GloopExecutionContext context)
Get a range of elements from a list.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namechannel
- the channelkey
- the keystart
- the start type: longstop
- the stop type: long- Returns:
- Long count of elements in the specified range.
-
lrangeAsync
@GloopParameter(name="redisFutureLrangeOutput") public static Future<List<Object>> lrangeAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) long start, @GloopParameter(allowNull=false) long stop, GloopExecutionContext context)
Asynchronously get a range of elements from a list.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the keystart
- the start type: longstop
- the stop type: long- Returns:
- list<V> array-reply list of elements in the specified range.
-
lrangeAsync
@GloopParameter(name="redisFutureLrangeOutput") public static Future<Long> lrangeAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) ValueStreamingChannel<Object> channel, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) long start, @GloopParameter(allowNull=false) long stop, GloopExecutionContext context)
Asynchronously get a range of elements from a list.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namechannel
- the channelkey
- the keystart
- the start type: longstop
- the stop type: long- Returns:
- long count of elements in the specified range.
-
lrem
@GloopParameter(name="redisLremOutput") public static Long lrem(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) long count, @GloopParameter(allowNull=false) Object value, GloopExecutionContext context)
Remove elements from a list.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the keycount
- the count type: longvalue
- the value- Returns:
- Long integer-reply the number of removed elements.
-
lremAsync
@GloopParameter(name="redisFutureLremOutput") public static Future<Long> lremAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) long count, @GloopParameter(allowNull=false) Object value, GloopExecutionContext context)
Asynchronously remove elements from a list.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the keycount
- the count type: longvalue
- the value- Returns:
- long integer-reply the number of removed elements.
-
lset
@GloopParameter(name="redisLsetOutput") public static String lset(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) long index, @GloopParameter(allowNull=false) Object value, GloopExecutionContext context)
Set the value of an element in a list by its index.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the keyindex
- the index type: longvalue
- the value- Returns:
- String simple-string-reply
-
lsetAsync
@GloopParameter(name="redisFutureLsetOutput") public static Future<String> lsetAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) long index, @GloopParameter(allowNull=false) Object value, GloopExecutionContext context)
Asynchronously set the value of an element in a list by its index.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the keyindex
- the index type: longvalue
- the value- Returns:
- string simple-string-reply
-
ltrim
@GloopParameter(name="redisLtrimOutput") public static String ltrim(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) long start, @GloopParameter(allowNull=false) long stop, GloopExecutionContext context)
Trim a list to the specified range.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the keystart
- the start type: longstop
- the stop type: long- Returns:
- String simple-string-reply
-
ltrimAsync
@GloopParameter(name="redisFutureLtrimOutput") public static Future<String> ltrimAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) long start, @GloopParameter(allowNull=false) long stop, GloopExecutionContext context)
Asynchronously trim a list to the specified range.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the keystart
- the start type: longstop
- the stop type: long- Returns:
- string simple-string-reply
-
rpop
@GloopParameter(name="redisRpopOutput") public static Object rpop(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, GloopExecutionContext context)
Remove and get the last element in a list.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the key- Returns:
- V bulk-string-reply the value of the last element, or null when
key
does not exist.
-
rpopAsync
@GloopParameter(name="redisFutureRpopOutput") public static Future<Object> rpopAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, GloopExecutionContext context)
Asynchronously remove and get the last element in a list.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the key- Returns:
- v bulk-string-reply the value of the last element, or null when
key
does not exist.
-
rpoplpush
@GloopParameter(name="redisRpoplpushOutput") public static Object rpoplpush(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object source, @GloopParameter(allowNull=false) Object destination, GloopExecutionContext context)
Remove the last element in a list, append it to another list and return it.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namesource
- the source keydestination
- the destination type: key- Returns:
- V bulk-string-reply the element being popped and pushed.
-
rpoplpushAsync
@GloopParameter(name="redisFutureRpoplpushOutput") public static Future<Object> rpoplpushAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object source, @GloopParameter(allowNull=false) Object destination, GloopExecutionContext context)
Asynchronously remove the last element in a list, append it to another list and return it.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namesource
- the source keydestination
- the destination type: key- Returns:
- v bulk-string-reply the element being popped and pushed.
-
rpush
@GloopParameter(name="redisRpushOutput") public static Long rpush(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, GloopExecutionContext context, @GloopParameter(allowNull=false) Object... values)
Append one or multiple values to a list.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the keyvalues
- the value- Returns:
- Long integer-reply the length of the list after the push operation.
-
rpushAsync
@GloopParameter(name="redisFutureRpushOutput") public static Future<Long> rpushAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, GloopExecutionContext context, @GloopParameter(allowNull=false) Object... values)
Asynchronously append one or multiple values to a list.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the keyvalues
- the value- Returns:
- long integer-reply the length of the list after the push operation.
-
rpushx
@GloopParameter(name="redisRpushxOutput") public static Long rpushx(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, GloopExecutionContext context, @GloopParameter(allowNull=false) Object... values)
Append values to a list, only if the list exists.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the keyvalues
- the values- Returns:
- Long integer-reply the length of the list after the push operation.
-
rpushxAsync
@GloopParameter(name="redisFutureRpushxOutput") public static Future<Long> rpushxAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, GloopExecutionContext context, @GloopParameter(allowNull=false) Object... values)
Asynchronously append values to a list, only if the list exists.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the keyvalues
- the values- Returns:
- long integer-reply the length of the list after the push operation.
-
-