public class RedisListMethods
extends io.toro.martini.redis.RedisBaseMethods
Constructor and Description |
---|
RedisListMethods(DataSourceManager dataSourceManager) |
Modifier and Type | Method and Description |
---|---|
static io.toro.gloop.object.property.GloopModel |
blpop(String connectionName,
long timeout,
io.toro.gloop.engine.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,
io.toro.gloop.engine.GloopExecutionContext context,
Object... keys)
Asynchronously remove and get the first element in a list, or block until one is available.
|
static io.toro.gloop.object.property.GloopModel |
brpop(String connectionName,
long timeout,
io.toro.gloop.engine.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,
io.toro.gloop.engine.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,
io.toro.gloop.engine.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,
io.toro.gloop.engine.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,
io.toro.gloop.engine.GloopExecutionContext context)
Get an element from a list by its index.
|
static Future<Object> |
lindexAsync(String connectionName,
Object key,
long index,
io.toro.gloop.engine.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,
io.toro.gloop.engine.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,
io.toro.gloop.engine.GloopExecutionContext context)
Asynchronously insert an element before or after another element in a list.
|
static Long |
llen(String connectionName,
Object key,
io.toro.gloop.engine.GloopExecutionContext context)
Get the length of a list.
|
static Future<Long> |
llenAsync(String connectionName,
Object key,
io.toro.gloop.engine.GloopExecutionContext context)
Asynchronously get the length of a list.
|
static Object |
lpop(String connectionName,
Object key,
io.toro.gloop.engine.GloopExecutionContext context)
Remove and get the first element in a list.
|
static Future<Object> |
lpopAsync(String connectionName,
Object key,
io.toro.gloop.engine.GloopExecutionContext context)
Asynchronously remove and get the first element in a list.
|
static Long |
lpush(String connectionName,
Object key,
io.toro.gloop.engine.GloopExecutionContext context,
Object... values)
Prepend one or multiple values to a list.
|
static Future<Long> |
lpushAsync(String connectionName,
Object key,
io.toro.gloop.engine.GloopExecutionContext context,
Object... values)
Asynchronously prepend one or multiple values to a list.
|
static Long |
lpushx(String connectionName,
Object key,
io.toro.gloop.engine.GloopExecutionContext context,
Object... values)
Prepend values to a list, only if the list exists.
|
static Future<Long> |
lpushxAsync(String connectionName,
Object key,
io.toro.gloop.engine.GloopExecutionContext context,
Object... values)
Asynchronously prepend values to a list, only if the list exists.
|
static List<Object> |
lrange(String connectionName,
Object key,
long start,
long stop,
io.toro.gloop.engine.GloopExecutionContext context)
Get a range of elements from a list.
|
static Long |
lrange(String connectionName,
ValueStreamingChannel<Object> channel,
Object key,
long start,
long stop,
io.toro.gloop.engine.GloopExecutionContext context)
Get a range of elements from a list.
|
static Future<List<Object>> |
lrangeAsync(String connectionName,
Object key,
long start,
long stop,
io.toro.gloop.engine.GloopExecutionContext context)
Asynchronously get a range of elements from a list.
|
static Future<Long> |
lrangeAsync(String connectionName,
ValueStreamingChannel<Object> channel,
Object key,
long start,
long stop,
io.toro.gloop.engine.GloopExecutionContext context)
Asynchronously get a range of elements from a list.
|
static Long |
lrem(String connectionName,
Object key,
long count,
Object value,
io.toro.gloop.engine.GloopExecutionContext context)
Remove elements from a list.
|
static Future<Long> |
lremAsync(String connectionName,
Object key,
long count,
Object value,
io.toro.gloop.engine.GloopExecutionContext context)
Asynchronously remove elements from a list.
|
static String |
lset(String connectionName,
Object key,
long index,
Object value,
io.toro.gloop.engine.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,
io.toro.gloop.engine.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,
io.toro.gloop.engine.GloopExecutionContext context)
Trim a list to the specified range.
|
static Future<String> |
ltrimAsync(String connectionName,
Object key,
long start,
long stop,
io.toro.gloop.engine.GloopExecutionContext context)
Asynchronously trim a list to the specified range.
|
static Object |
rpop(String connectionName,
Object key,
io.toro.gloop.engine.GloopExecutionContext context)
Remove and get the last element in a list.
|
static Future<Object> |
rpopAsync(String connectionName,
Object key,
io.toro.gloop.engine.GloopExecutionContext context)
Asynchronously remove and get the last element in a list.
|
static Object |
rpoplpush(String connectionName,
Object source,
Object destination,
io.toro.gloop.engine.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,
io.toro.gloop.engine.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,
io.toro.gloop.engine.GloopExecutionContext context,
Object... values)
Append one or multiple values to a list.
|
static Future<Long> |
rpushAsync(String connectionName,
Object key,
io.toro.gloop.engine.GloopExecutionContext context,
Object... values)
Asynchronously append one or multiple values to a list.
|
static Long |
rpushx(String connectionName,
Object key,
io.toro.gloop.engine.GloopExecutionContext context,
Object... values)
Append values to a list, only if the list exists.
|
static Future<Long> |
rpushxAsync(String connectionName,
Object key,
io.toro.gloop.engine.GloopExecutionContext context,
Object... values)
Asynchronously append values to a list, only if the list exists.
|
@Autowired RedisListMethods(DataSourceManager dataSourceManager)
@GloopObjectParameter(value="output{\n redisKeyValue{\n key:object\n value:object\n }\n}") public static io.toro.gloop.object.property.GloopModel blpop(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) long timeout, io.toro.gloop.engine.GloopExecutionContext context, @GloopParameter(allowNull=false) Object... keys)
connectionName
- The Martini Runtime Redis connection pool nametimeout
- the timeout in secondskeys
- the keys@GloopParameter(name="redisFutureBlpopOutput") public static Future<KeyValue<Object,Object>> blpopAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) long timeout, io.toro.gloop.engine.GloopExecutionContext context, @GloopParameter(allowNull=false) Object... keys)
connectionName
- The Martini Runtime Redis connection pool nametimeout
- the timeout in secondskeys
- the keys@GloopObjectParameter(value="output{\n redisKeyValue{\n key:object\n value:object\n }\n}") public static io.toro.gloop.object.property.GloopModel brpop(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) long timeout, io.toro.gloop.engine.GloopExecutionContext context, @GloopParameter(allowNull=false) Object... keys)
connectionName
- The Martini Runtime Redis connection pool nametimeout
- the timeout in secondskeys
- the keys@GloopParameter(name="redisFutureBrpopOutput") public static Future<KeyValue<Object,Object>> brpopAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) long timeout, io.toro.gloop.engine.GloopExecutionContext context, @GloopParameter(allowNull=false) Object... keys)
connectionName
- The Martini Runtime Redis connection pool nametimeout
- the timeout in secondskeys
- the keys@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, io.toro.gloop.engine.GloopExecutionContext context)
connectionName
- The Martini Runtime Redis connection pool nametimeout
- the timeout in secondssource
- the source keydestination
- the destination type: keysource
and pushed to destination
. If
timeout
is reached, a@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, io.toro.gloop.engine.GloopExecutionContext context)
connectionName
- The Martini Runtime Redis connection pool nametimeout
- the timeout in secondssource
- the source keydestination
- the destination type: keysource
and pushed to destination
. if
timeout
is reached, a@GloopParameter(name="redisLindexOutput") public static Object lindex(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) long index, io.toro.gloop.engine.GloopExecutionContext context)
connectionName
- The Martini Runtime Redis connection pool namekey
- the keyindex
- the index type: longindex
is out of range.@GloopParameter(name="redisFutureLindexOutput") public static Future<Object> lindexAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) long index, io.toro.gloop.engine.GloopExecutionContext context)
connectionName
- The Martini Runtime Redis connection pool namekey
- the keyindex
- the index type: longindex
is out of range.@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, io.toro.gloop.engine.GloopExecutionContext context)
connectionName
- The Martini Runtime Redis connection pool namekey
- the keybefore
- the beforepivot
- the pivotvalue
- the value-1
when the value pivot
was not found.@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, io.toro.gloop.engine.GloopExecutionContext context)
connectionName
- The Martini Runtime Redis connection pool namekey
- the keybefore
- the beforepivot
- the pivotvalue
- the value-1
when the value pivot
was not found.@GloopParameter(name="redisLlenOutput") public static Long llen(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, io.toro.gloop.engine.GloopExecutionContext context)
connectionName
- The Martini Runtime Redis connection pool namekey
- the keykey
.@GloopParameter(name="redisFutureLlenOutput") public static Future<Long> llenAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, io.toro.gloop.engine.GloopExecutionContext context)
connectionName
- The Martini Runtime Redis connection pool namekey
- the keykey
.@GloopParameter(name="redisLpopOutput") public static Object lpop(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, io.toro.gloop.engine.GloopExecutionContext context)
connectionName
- The Martini Runtime Redis connection pool namekey
- the keykey
does not exist.@GloopParameter(name="redisFutureLpopOutput") public static Future<Object> lpopAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, io.toro.gloop.engine.GloopExecutionContext context)
connectionName
- The Martini Runtime Redis connection pool namekey
- the keykey
does not exist.@GloopParameter(name="redisLpushOutput") public static Long lpush(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, io.toro.gloop.engine.GloopExecutionContext context, @GloopParameter(allowNull=false) Object... values)
connectionName
- The Martini Runtime Redis connection pool namekey
- the keyvalues
- the value@GloopParameter(name="redisFutureLpushOutput") public static Future<Long> lpushAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, io.toro.gloop.engine.GloopExecutionContext context, @GloopParameter(allowNull=false) Object... values)
connectionName
- The Martini Runtime Redis connection pool namekey
- the keyvalues
- the value@GloopParameter(name="redisLpushxOutput") public static Long lpushx(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, io.toro.gloop.engine.GloopExecutionContext context, @GloopParameter(allowNull=false) Object... values)
connectionName
- The Martini Runtime Redis connection pool namekey
- the keyvalues
- the values@GloopParameter(name="redisFutureLpushxOutput") public static Future<Long> lpushxAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, io.toro.gloop.engine.GloopExecutionContext context, @GloopParameter(allowNull=false) Object... values)
connectionName
- The Martini Runtime Redis connection pool namekey
- the keyvalues
- the values@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, io.toro.gloop.engine.GloopExecutionContext context)
connectionName
- The Martini Runtime Redis connection pool namekey
- the keystart
- the start type: longstop
- the stop type: long@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, io.toro.gloop.engine.GloopExecutionContext context)
connectionName
- The Martini Runtime Redis connection pool namechannel
- the channelkey
- the keystart
- the start type: longstop
- the stop type: long@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, io.toro.gloop.engine.GloopExecutionContext context)
connectionName
- The Martini Runtime Redis connection pool namekey
- the keystart
- the start type: longstop
- the stop type: long@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, io.toro.gloop.engine.GloopExecutionContext context)
connectionName
- The Martini Runtime Redis connection pool namechannel
- the channelkey
- the keystart
- the start type: longstop
- the stop type: long@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, io.toro.gloop.engine.GloopExecutionContext context)
connectionName
- The Martini Runtime Redis connection pool namekey
- the keycount
- the count type: longvalue
- the value@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, io.toro.gloop.engine.GloopExecutionContext context)
connectionName
- The Martini Runtime Redis connection pool namekey
- the keycount
- the count type: longvalue
- the value@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, io.toro.gloop.engine.GloopExecutionContext context)
connectionName
- The Martini Runtime Redis connection pool namekey
- the keyindex
- the index type: longvalue
- the value@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, io.toro.gloop.engine.GloopExecutionContext context)
connectionName
- The Martini Runtime Redis connection pool namekey
- the keyindex
- the index type: longvalue
- the value@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, io.toro.gloop.engine.GloopExecutionContext context)
connectionName
- The Martini Runtime Redis connection pool namekey
- the keystart
- the start type: longstop
- the stop type: long@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, io.toro.gloop.engine.GloopExecutionContext context)
connectionName
- The Martini Runtime Redis connection pool namekey
- the keystart
- the start type: longstop
- the stop type: long@GloopParameter(name="redisRpopOutput") public static Object rpop(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, io.toro.gloop.engine.GloopExecutionContext context)
connectionName
- The Martini Runtime Redis connection pool namekey
- the keykey
does not exist.@GloopParameter(name="redisFutureRpopOutput") public static Future<Object> rpopAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, io.toro.gloop.engine.GloopExecutionContext context)
connectionName
- The Martini Runtime Redis connection pool namekey
- the keykey
does not exist.@GloopParameter(name="redisRpoplpushOutput") public static Object rpoplpush(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object source, @GloopParameter(allowNull=false) Object destination, io.toro.gloop.engine.GloopExecutionContext context)
connectionName
- The Martini Runtime Redis connection pool namesource
- the source keydestination
- the destination type: key@GloopParameter(name="redisFutureRpoplpushOutput") public static Future<Object> rpoplpushAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object source, @GloopParameter(allowNull=false) Object destination, io.toro.gloop.engine.GloopExecutionContext context)
connectionName
- The Martini Runtime Redis connection pool namesource
- the source keydestination
- the destination type: key@GloopParameter(name="redisRpushOutput") public static Long rpush(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, io.toro.gloop.engine.GloopExecutionContext context, @GloopParameter(allowNull=false) Object... values)
connectionName
- The Martini Runtime Redis connection pool namekey
- the keyvalues
- the value@GloopParameter(name="redisFutureRpushOutput") public static Future<Long> rpushAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, io.toro.gloop.engine.GloopExecutionContext context, @GloopParameter(allowNull=false) Object... values)
connectionName
- The Martini Runtime Redis connection pool namekey
- the keyvalues
- the value@GloopParameter(name="redisRpushxOutput") public static Long rpushx(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, io.toro.gloop.engine.GloopExecutionContext context, @GloopParameter(allowNull=false) Object... values)
connectionName
- The Martini Runtime Redis connection pool namekey
- the keyvalues
- the values@GloopParameter(name="redisFutureRpushxOutput") public static Future<Long> rpushxAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, io.toro.gloop.engine.GloopExecutionContext context, @GloopParameter(allowNull=false) Object... values)
connectionName
- The Martini Runtime Redis connection pool namekey
- the keyvalues
- the valuesCopyright © 2020. All rights reserved.