Package io.toro.martini.redis
Class RedisStringMethods
- java.lang.Object
-
- io.toro.martini.redis.RedisBaseMethods
-
- io.toro.martini.redis.RedisStringMethods
-
public class RedisStringMethods extends io.toro.martini.redis.RedisBaseMethodsMethods for Strings.
-
-
Constructor Summary
Constructors Constructor Description RedisStringMethods(io.toro.martini.database.DataSourceManager dataSourceManager)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Longappend(String connectionName, Object key, Object value, GloopExecutionContext context)Append a value to a key.static Future<Long>appendAsync(String connectionName, Object key, Object value, GloopExecutionContext context)Asynchronously append a value to a key.static Longbitcount(String connectionName, Object key, long start, long end, GloopExecutionContext context)Count set bits in a string.static Longbitcount(String connectionName, Object key, GloopExecutionContext context)Count set bits in a string.static Future<Long>bitcountAsync(String connectionName, Object key, long start, long end, GloopExecutionContext context)Asynchronously count set bits in a string.static Future<Long>bitcountAsync(String connectionName, Object key, GloopExecutionContext context)Asynchronously count set bits in a string.static List<Long>bitfield(String connectionName, Object key, BitFieldArgs bitFieldArgs, GloopExecutionContext context)ExecuteBITFIELDwith its subcommands.static Future<List<Long>>bitfieldAsync(String connectionName, Object key, BitFieldArgs bitFieldArgs, GloopExecutionContext context)Asynchronously executebITFIELDwith its subcommands.static LongbitopAnd(String connectionName, Object destination, GloopExecutionContext context, Object... keys)Perform bitwise AND between strings.static Future<Long>bitopAndAsync(String connectionName, Object destination, GloopExecutionContext context, Object... keys)Asynchronously perform bitwise aND between strings.static LongbitopNot(String connectionName, Object destination, Object source, GloopExecutionContext context)Perform bitwise NOT between strings.static Future<Long>bitopNotAsync(String connectionName, Object destination, Object source, GloopExecutionContext context)Asynchronously perform bitwise nOT between strings.static LongbitopOr(String connectionName, Object destination, GloopExecutionContext context, Object... keys)Perform bitwise OR between strings.static Future<Long>bitopOrAsync(String connectionName, Object destination, GloopExecutionContext context, Object... keys)Asynchronously perform bitwise oR between strings.static LongbitopXor(String connectionName, Object destination, GloopExecutionContext context, Object... keys)Perform bitwise XOR between strings.static Future<Long>bitopXorAsync(String connectionName, Object destination, GloopExecutionContext context, Object... keys)Asynchronously perform bitwise xOR between strings.static Longbitpos(String connectionName, Object key, boolean state, long start, long end, GloopExecutionContext context)Find first bit set or clear in a string.static Longbitpos(String connectionName, Object key, boolean state, long start, GloopExecutionContext context)Find first bit set or clear in a string.static Longbitpos(String connectionName, Object key, boolean state, GloopExecutionContext context)Find first bit set or clear in a string.static Future<Long>bitposAsync(String connectionName, Object key, boolean state, long start, long end, GloopExecutionContext context)Asynchronously find first bit set or clear in a string.static Future<Long>bitposAsync(String connectionName, Object key, boolean state, long start, GloopExecutionContext context)Asynchronously find first bit set or clear in a string.static Future<Long>bitposAsync(String connectionName, Object key, boolean state, GloopExecutionContext context)Asynchronously find first bit set or clear in a string.static Longdecr(String connectionName, Object key, GloopExecutionContext context)Decrement the integer value of a key by one.static Future<Long>decrAsync(String connectionName, Object key, GloopExecutionContext context)Asynchronously decrement the integer value of a key by one.static Longdecrby(String connectionName, Object key, long amount, GloopExecutionContext context)Decrement the integer value of a key by the given number.static Future<Long>decrbyAsync(String connectionName, Object key, long amount, GloopExecutionContext context)Asynchronously decrement the integer value of a key by the given number.static Objectget(String connectionName, Object key, GloopExecutionContext context)Get the value of a key.static Future<Object>getAsync(String connectionName, Object key, GloopExecutionContext context)Asynchronously get the value of a key.static Longgetbit(String connectionName, Object key, long offset, GloopExecutionContext context)Returns the bit value at offset in the string value stored at key.static Future<Long>getbitAsync(String connectionName, Object key, long offset, GloopExecutionContext context)Asynchronously returns the bit value at offset in the string value stored at key.static Objectgetrange(String connectionName, Object key, long start, long end, GloopExecutionContext context)Get a substring of the string stored at a key.static Future<Object>getrangeAsync(String connectionName, Object key, long start, long end, GloopExecutionContext context)Asynchronously get a substring of the string stored at a key.static Objectgetset(String connectionName, Object key, Object value, GloopExecutionContext context)Set the string value of a key and return its old value.static Future<Object>getsetAsync(String connectionName, Object key, Object value, GloopExecutionContext context)Asynchronously set the string value of a key and return its old value.static Longincr(String connectionName, Object key, GloopExecutionContext context)Increment the integer value of a key by one.static Future<Long>incrAsync(String connectionName, Object key, GloopExecutionContext context)Asynchronously increment the integer value of a key by one.static Longincrby(String connectionName, Object key, long amount, GloopExecutionContext context)Increment the integer value of a key by the given amount.static Future<Long>incrbyAsync(String connectionName, Object key, long amount, GloopExecutionContext context)Asynchronously increment the integer value of a key by the given amount.static Doubleincrbyfloat(String connectionName, Object key, double amount, GloopExecutionContext context)Increment the float value of a key by the given amount.static Future<Double>incrbyfloatAsync(String connectionName, Object key, double amount, GloopExecutionContext context)Asynchronously increment the float value of a key by the given amount.static Longmget(String connectionName, KeyValueStreamingChannel<Object,Object> channel, GloopExecutionContext context, Object... keys)Stream over the values of all the given keys.static GloopModelmget(String connectionName, GloopExecutionContext context, Object... keys)Get the values of all the given keys.static Future<Long>mgetAsync(String connectionName, KeyValueStreamingChannel<Object,Object> channel, GloopExecutionContext context, Object... keys)Asynchronously stream over the values of all the given keys.static Future<List<KeyValue<Object,Object>>>mgetAsync(String connectionName, GloopExecutionContext context, Object... keys)Asynchronously get the values of all the given keys.static Stringmset(String connectionName, GloopModel redisMap, GloopExecutionContext context)Set multiple keys to multiple values.static Future<String>msetAsync(String connectionName, GloopModel redisMap, GloopExecutionContext context)Asynchronously set multiple keys to multiple values.static Booleanmsetnx(String connectionName, GloopModel redisMap, GloopExecutionContext context)Set multiple keys to multiple values, only if none of the keys exist.static Future<Boolean>msetnxAsync(String connectionName, GloopModel redisMap, GloopExecutionContext context)Asynchronously set multiple keys to multiple values, only if none of the keys exist.static Stringpsetex(String connectionName, Object key, long milliseconds, Object value, GloopExecutionContext context)Set the value and expiration in milliseconds of a key.static Future<String>psetexAsync(String connectionName, Object key, long milliseconds, Object value, GloopExecutionContext context)Asynchronously set the value and expiration in milliseconds of a key.static Stringset(String connectionName, Object key, Object value, GloopExecutionContext context)Set the string value of a key.static Stringset(String connectionName, Object key, Object value, GloopModel setArgs, GloopExecutionContext context)Set the string value of a key.static Future<String>setAsync(String connectionName, Object key, Object value, GloopExecutionContext context)Asynchronously set the string value of a key.static Future<String>setAsync(String connectionName, Object key, Object value, GloopModel setArgs, GloopExecutionContext context)Asynchronously set the string value of a key.static Longsetbit(String connectionName, Object key, long offset, int value, GloopExecutionContext context)Sets or clears the bit at offset in the string value stored at key.static Future<Long>setbitAsync(String connectionName, Object key, long offset, int value, GloopExecutionContext context)Asynchronously sets or clears the bit at offset in the string value stored at key.static Stringsetex(String connectionName, Object key, long seconds, Object value, GloopExecutionContext context)Set the value and expiration of a key.static Future<String>setexAsync(String connectionName, Object key, long seconds, Object value, GloopExecutionContext context)Asynchronously set the value and expiration of a key.static Booleansetnx(String connectionName, Object key, Object value, GloopExecutionContext context)Set the value of a key, only if the key does not exist.static Future<Boolean>setnxAsync(String connectionName, Object key, Object value, GloopExecutionContext context)Asynchronously set the value of a key, only if the key does not exist.static Longsetrange(String connectionName, Object key, long offset, Object value, GloopExecutionContext context)Overwrite part of a string at key starting at the specified offset.static Future<Long>setrangeAsync(String connectionName, Object key, long offset, Object value, GloopExecutionContext context)Asynchronously overwrite part of a string at key starting at the specified offset.static Longstrlen(String connectionName, Object key, GloopExecutionContext context)Get the length of the value stored in a key.static Future<Long>strlenAsync(String connectionName, Object key, GloopExecutionContext context)Asynchronously get the length of the value stored in a key.
-
-
-
Constructor Detail
-
RedisStringMethods
@Autowired RedisStringMethods(io.toro.martini.database.DataSourceManager dataSourceManager)
-
-
Method Detail
-
append
@GloopParameter(name="redisAppendOutput") public static Long append(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) Object value, GloopExecutionContext context)
Append a value to a key.- Parameters:
connectionName- The Martini Runtime Redis connection pool namekey- the keyvalue- the value- Returns:
- Long integer-reply the length of the string after the append operation.
-
appendAsync
@GloopParameter(name="redisFutureAppendOutput") public static Future<Long> appendAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) Object value, GloopExecutionContext context)
Asynchronously append a value to a key.- Parameters:
connectionName- The Martini Runtime Redis connection pool namekey- the keyvalue- the value- Returns:
- long integer-reply the length of the string after the append operation.
-
bitcount
@GloopParameter(name="redisBitcountOutput") public static Long bitcount(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, GloopExecutionContext context)
Count set bits in a string.- Parameters:
connectionName- The Martini Runtime Redis connection pool namekey- the key- Returns:
- Long integer-reply The number of bits set to 1.
-
bitcount
@GloopParameter(name="redisBitcountOutput") public static Long bitcount(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) long start, @GloopParameter(allowNull=false) long end, GloopExecutionContext context)
Count set bits in a string.- Parameters:
connectionName- The Martini Runtime Redis connection pool namekey- the keystart- the startend- the end- Returns:
- Long integer-reply The number of bits set to 1.
-
bitcountAsync
@GloopParameter(name="redisFutureBitcountOutput") public static Future<Long> bitcountAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, GloopExecutionContext context)
Asynchronously count set bits in a string.- Parameters:
connectionName- The Martini Runtime Redis connection pool namekey- the key- Returns:
- long integer-reply the number of bits set to 1.
-
bitcountAsync
@GloopParameter(name="redisFutureBitcountOutput") public static Future<Long> bitcountAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) long start, @GloopParameter(allowNull=false) long end, GloopExecutionContext context)
Asynchronously count set bits in a string.- Parameters:
connectionName- The Martini Runtime Redis connection pool namekey- the keystart- the startend- the end- Returns:
- long integer-reply the number of bits set to 1.
-
bitfield
@GloopParameter(name="redisBitfieldOutput") public static List<Long> bitfield(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) BitFieldArgs bitFieldArgs, GloopExecutionContext context)
ExecuteBITFIELDwith its subcommands.- Parameters:
connectionName- The Martini Runtime Redis connection pool namekey- the keybitFieldArgs- the args containing subcommands, must not be null.- Returns:
- Long bulk-reply the results from the bitfield commands.
-
bitfieldAsync
@GloopParameter(name="redisFutureBitfieldOutput") public static Future<List<Long>> bitfieldAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) BitFieldArgs bitFieldArgs, GloopExecutionContext context)
Asynchronously executebITFIELDwith its subcommands.- Parameters:
connectionName- The Martini Runtime Redis connection pool namekey- the keybitFieldArgs- the args containing subcommands, must not be null.- Returns:
- long bulk-reply the results from the bitfield commands.
-
bitpos
@GloopParameter(name="redisBitposOutput") public static Long bitpos(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) boolean state, GloopExecutionContext context)
Find first bit set or clear in a string.- Parameters:
connectionName- The Martini Runtime Redis connection pool namekey- the keystate- the state- Returns:
- Long integer-reply The command returns the position of the first bit set to 1 or 0 according to the
request. If we look for set bits (the bit argument is 1) and the string is empty or composed of just
zero bytes, -1 is returned. If we look for clear bits (the bit argument is 0) and the string
only contains bit set to 1, the function returns the first bit not part of the string on the right. So if
the string is tree bytes set to the value 0xff the command
BITPOS key 0will return 24, since up to bit 23 all the bits are 1. Basically the function consider the right of the string as padded with zeros if you look for clear bits and specify no range or the start argument only.
-
bitpos
@GloopParameter(name="redisBitposOutput") public static Long bitpos(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) boolean state, @GloopParameter(allowNull=false) long start, GloopExecutionContext context)
Find first bit set or clear in a string.- Parameters:
connectionName- The Martini Runtime Redis connection pool namekey- the keystate- the bit type: longstart- the start type: long- Returns:
- Long integer-reply The command returns the position of the first bit set to 1 or 0 according to the
request. If we look for set bits (the bit argument is 1) and the string is empty or composed of just
zero bytes, -1 is returned. If we look for clear bits (the bit argument is 0) and the string
only contains bit set to 1, the function returns the first bit not part of the string on the right. So if
the string is tree bytes set to the value 0xff the command
BITPOS key 0will return 24, since up to bit 23 all the bits are 1. Basically the function consider the right of the string as padded with zeros if you look for clear bits and specify no range or the start argument only. - Since:
- 5.0.1
-
bitpos
@GloopParameter(name="redisBitposOutput") public static Long bitpos(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) boolean state, @GloopParameter(allowNull=false) long start, @GloopParameter(allowNull=false) long end, GloopExecutionContext context)
Find first bit set or clear in a string.- Parameters:
connectionName- The Martini Runtime Redis connection pool namekey- the keystate- the bit type: longstart- the start type: longend- the end type: long- Returns:
- Long integer-reply The command returns the position of the first bit set to 1 or 0 according to the
request. If we look for set bits (the bit argument is 1) and the string is empty or composed of just
zero bytes, -1 is returned. If we look for clear bits (the bit argument is 0) and the string
only contains bit set to 1, the function returns the first bit not part of the string on the right. So if
the string is tree bytes set to the value 0xff the command
BITPOS key 0will return 24, since up to bit 23 all the bits are 1. Basically the function consider the right of the string as padded with zeros if you look for clear bits and specify no range or the start argument only. However this behavior changes if you are looking for clear bits and specify a range with both start and end. If no clear bit is found in the specified range, the function returns -1 as the user specified a clear range and there are no 0 bits in that range.
-
bitposAsync
@GloopParameter(name="redisFutureBitposOutput") public static Future<Long> bitposAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) boolean state, GloopExecutionContext context)
Asynchronously find first bit set or clear in a string.- Parameters:
connectionName- The Martini Runtime Redis connection pool namekey- the keystate- the state- Returns:
- long integer-reply the command returns the position of the first bit set to 1 or 0 according to the
request. if we look for set bits (the bit argument is 1) and the string is empty or composed of just
zero bytes, -1 is returned. if we look for clear bits (the bit argument is 0) and the string
only contains bit set to 1, the function returns the first bit not part of the string on the right. so if
the string is tree bytes set to the value 0xff the command
bITPOS key 0will return 24, since up to bit 23 all the bits are 1. basically the function consider the right of the string as padded with zeros if you look for clear bits and specify no range or the start argument only.
-
bitposAsync
@GloopParameter(name="redisFutureBitposOutput") public static Future<Long> bitposAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) boolean state, @GloopParameter(allowNull=false) long start, GloopExecutionContext context)
Asynchronously find first bit set or clear in a string.- Parameters:
connectionName- The Martini Runtime Redis connection pool namekey- the keystate- the bit type: longstart- the start type: long- Returns:
- long integer-reply the command returns the position of the first bit set to 1 or 0 according to the
request. if we look for set bits (the bit argument is 1) and the string is empty or composed of just
zero bytes, -1 is returned. if we look for clear bits (the bit argument is 0) and the string
only contains bit set to 1, the function returns the first bit not part of the string on the right. so if
the string is tree bytes set to the value 0xff the command
bITPOS key 0will return 24, since up to bit 23 all the bits are 1. basically the function consider the right of the string as padded with zeros if you look for clear bits and specify no range or the start argument only. - Since:
- 5.0.1
-
bitposAsync
@GloopParameter(name="redisFutureBitposOutput") public static Future<Long> bitposAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) boolean state, @GloopParameter(allowNull=false) long start, @GloopParameter(allowNull=false) long end, GloopExecutionContext context)
Asynchronously find first bit set or clear in a string.- Parameters:
connectionName- The Martini Runtime Redis connection pool namekey- the keystate- the bit type: longstart- the start type: longend- the end type: long- Returns:
- long integer-reply the command returns the position of the first bit set to 1 or 0 according to the
request. if we look for set bits (the bit argument is 1) and the string is empty or composed of just
zero bytes, -1 is returned. if we look for clear bits (the bit argument is 0) and the string
only contains bit set to 1, the function returns the first bit not part of the string on the right. so if
the string is tree bytes set to the value 0xff the command
bITPOS key 0will return 24, since up to bit 23 all the bits are 1. basically the function consider the right of the string as padded with zeros if you look for clear bits and specify no range or the start argument only. however this behavior changes if you are looking for clear bits and specify a range with both start and end. if no clear bit is found in the specified range, the function returns -1 as the user specified a clear range and there are no 0 bits in that range.
-
bitopAnd
@GloopParameter(name="redisBitopAndOutput") public static Long bitopAnd(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object destination, GloopExecutionContext context, @GloopParameter(allowNull=false) Object... keys)
Perform bitwise AND between strings.- Parameters:
connectionName- The Martini Runtime Redis connection pool namedestination- result key of the operationkeys- operation input key names- Returns:
- Long integer-reply The size of the string stored in the destination key, that is equal to the size of the longest input string.
-
bitopAndAsync
@GloopParameter(name="redisFutureBitopAndOutput") public static Future<Long> bitopAndAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object destination, GloopExecutionContext context, @GloopParameter(allowNull=false) Object... keys)
Asynchronously perform bitwise aND between strings.- Parameters:
connectionName- The Martini Runtime Redis connection pool namedestination- result key of the operationkeys- operation input key names- Returns:
- long integer-reply the size of the string stored in the destination key, that is equal to the size of the longest input string.
-
bitopNot
@GloopParameter(name="redisBitopNotOutput") public static Long bitopNot(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object destination, @GloopParameter(allowNull=false) Object source, GloopExecutionContext context)
Perform bitwise NOT between strings.- Parameters:
connectionName- The Martini Runtime Redis connection pool namedestination- result key of the operationsource- operation input key names- Returns:
- Long integer-reply The size of the string stored in the destination key, that is equal to the size of the longest input string.
-
bitopNotAsync
@GloopParameter(name="redisFutureBitopNotOutput") public static Future<Long> bitopNotAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object destination, @GloopParameter(allowNull=false) Object source, GloopExecutionContext context)
Asynchronously perform bitwise nOT between strings.- Parameters:
connectionName- The Martini Runtime Redis connection pool namedestination- result key of the operationsource- operation input key names- Returns:
- long integer-reply the size of the string stored in the destination key, that is equal to the size of the longest input string.
-
bitopOr
@GloopParameter(name="redisBitopOrOutput") public static Long bitopOr(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object destination, GloopExecutionContext context, @GloopParameter(allowNull=false) Object... keys)
Perform bitwise OR between strings.- Parameters:
connectionName- The Martini Runtime Redis connection pool namedestination- result key of the operationkeys- operation input key names- Returns:
- Long integer-reply The size of the string stored in the destination key, that is equal to the size of the longest input string.
-
bitopOrAsync
@GloopParameter(name="redisFutureBitopOrOutput") public static Future<Long> bitopOrAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object destination, GloopExecutionContext context, @GloopParameter(allowNull=false) Object... keys)
Asynchronously perform bitwise oR between strings.- Parameters:
connectionName- The Martini Runtime Redis connection pool namedestination- result key of the operationkeys- operation input key names- Returns:
- long integer-reply the size of the string stored in the destination key, that is equal to the size of the longest input string.
-
bitopXor
@GloopParameter(name="redisBitopXorOutput") public static Long bitopXor(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object destination, GloopExecutionContext context, @GloopParameter(allowNull=false) Object... keys)
Perform bitwise XOR between strings.- Parameters:
connectionName- The Martini Runtime Redis connection pool namedestination- result key of the operationkeys- operation input key names- Returns:
- Long integer-reply The size of the string stored in the destination key, that is equal to the size of the longest input string.
-
bitopXorAsync
@GloopParameter(name="redisFutureBitopXorOutput") public static Future<Long> bitopXorAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object destination, GloopExecutionContext context, @GloopParameter(allowNull=false) Object... keys)
Asynchronously perform bitwise xOR between strings.- Parameters:
connectionName- The Martini Runtime Redis connection pool namedestination- result key of the operationkeys- operation input key names- Returns:
- long integer-reply the size of the string stored in the destination key, that is equal to the size of the longest input string.
-
decr
@GloopParameter(name="redisDecrOutput") public static Long decr(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, GloopExecutionContext context)
Decrement the integer value of a key by one.- Parameters:
connectionName- The Martini Runtime Redis connection pool namekey- the key- Returns:
- Long integer-reply the value of
keyafter the decrement
-
decrAsync
@GloopParameter(name="redisFutureDecrOutput") public static Future<Long> decrAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, GloopExecutionContext context)
Asynchronously decrement the integer value of a key by one.- Parameters:
connectionName- The Martini Runtime Redis connection pool namekey- the key- Returns:
- long integer-reply the value of
keyafter the decrement
-
decrby
@GloopParameter(name="redisDecrbyOutput") public static Long decrby(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) long amount, GloopExecutionContext context)
Decrement the integer value of a key by the given number.- Parameters:
connectionName- The Martini Runtime Redis connection pool namekey- the keyamount- the decrement type: long- Returns:
- Long integer-reply the value of
keyafter the decrement
-
decrbyAsync
@GloopParameter(name="redisFutureDecrbyOutput") public static Future<Long> decrbyAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) long amount, GloopExecutionContext context)
Asynchronously decrement the integer value of a key by the given number.- Parameters:
connectionName- The Martini Runtime Redis connection pool namekey- the keyamount- the decrement type: long- Returns:
- long integer-reply the value of
keyafter the decrement
-
get
@GloopParameter(name="redisGetOutput") public static Object get(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, GloopExecutionContext context)
Get the value of a key.- Parameters:
connectionName- The Martini Runtime Redis connection pool namekey- the key- Returns:
- V bulk-string-reply the value of
key, or null whenkeydoes not exist.
-
getAsync
@GloopParameter(name="redisFutureGetOutput") public static Future<Object> getAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, GloopExecutionContext context)
Asynchronously get the value of a key.- Parameters:
connectionName- The Martini Runtime Redis connection pool namekey- the key- Returns:
- v bulk-string-reply the value of
key, or null whenkeydoes not exist.
-
getbit
@GloopParameter(name="redisGetbitOutput") public static Long getbit(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) long offset, GloopExecutionContext context)
Returns the bit value at offset in the string value stored at key.- Parameters:
connectionName- The Martini Runtime Redis connection pool namekey- the keyoffset- the offset type: long- Returns:
- Long integer-reply the bit value stored at offset.
-
getbitAsync
@GloopParameter(name="redisFutureGetbitOutput") public static Future<Long> getbitAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) long offset, GloopExecutionContext context)
Asynchronously returns the bit value at offset in the string value stored at key.- Parameters:
connectionName- The Martini Runtime Redis connection pool namekey- the keyoffset- the offset type: long- Returns:
- long integer-reply the bit value stored at offset.
-
getrange
@GloopParameter(name="redisGetrangeOutput") public static Object getrange(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) long start, @GloopParameter(allowNull=false) long end, GloopExecutionContext context)
Get a substring of the string stored at a key.- Parameters:
connectionName- The Martini Runtime Redis connection pool namekey- the keystart- the start type: longend- the end type: long- Returns:
- V bulk-string-reply
-
getrangeAsync
@GloopParameter(name="redisFutureGetrangeOutput") public static Future<Object> getrangeAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) long start, @GloopParameter(allowNull=false) long end, GloopExecutionContext context)
Asynchronously get a substring of the string stored at a key.- Parameters:
connectionName- The Martini Runtime Redis connection pool namekey- the keystart- the start type: longend- the end type: long- Returns:
- v bulk-string-reply
-
getset
@GloopParameter(name="redisGetsetOutput") public static Object getset(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) Object value, GloopExecutionContext context)
Set the string value of a key and return its old value.- Parameters:
connectionName- The Martini Runtime Redis connection pool namekey- the keyvalue- the value- Returns:
- V bulk-string-reply the old value stored at
key, or null whenkeydid not exist.
-
getsetAsync
@GloopParameter(name="redisFutureGetsetOutput") public static Future<Object> getsetAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) Object value, GloopExecutionContext context)
Asynchronously set the string value of a key and return its old value.- Parameters:
connectionName- The Martini Runtime Redis connection pool namekey- the keyvalue- the value- Returns:
- v bulk-string-reply the old value stored at
key, or null whenkeydid not exist.
-
incr
@GloopParameter(name="redisIncrOutput") public static Long incr(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, GloopExecutionContext context)
Increment the integer value of a key by one.- Parameters:
connectionName- The Martini Runtime Redis connection pool namekey- the key- Returns:
- Long integer-reply the value of
keyafter the increment
-
incrAsync
@GloopParameter(name="redisFutureIncrOutput") public static Future<Long> incrAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, GloopExecutionContext context)
Asynchronously increment the integer value of a key by one.- Parameters:
connectionName- The Martini Runtime Redis connection pool namekey- the key- Returns:
- long integer-reply the value of
keyafter the increment
-
incrby
@GloopParameter(name="redisIncrbyOutput") public static Long incrby(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) long amount, GloopExecutionContext context)
Increment the integer value of a key by the given amount.- Parameters:
connectionName- The Martini Runtime Redis connection pool namekey- the keyamount- the increment type: long- Returns:
- Long integer-reply the value of
keyafter the increment
-
incrbyAsync
@GloopParameter(name="redisFutureIncrbyOutput") public static Future<Long> incrbyAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) long amount, GloopExecutionContext context)
Asynchronously increment the integer value of a key by the given amount.- Parameters:
connectionName- The Martini Runtime Redis connection pool namekey- the keyamount- the increment type: long- Returns:
- long integer-reply the value of
keyafter the increment
-
incrbyfloat
@GloopParameter(name="redisIncrbyfloatOutput") public static Double incrbyfloat(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) double amount, GloopExecutionContext context)
Increment the float value of a key by the given amount.- Parameters:
connectionName- The Martini Runtime Redis connection pool namekey- the keyamount- the increment type: double- Returns:
- Double bulk-string-reply the value of
keyafter the increment.
-
incrbyfloatAsync
@GloopParameter(name="redisFutureIncrbyfloatOutput") public static Future<Double> incrbyfloatAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) double amount, GloopExecutionContext context)
Asynchronously increment the float value of a key by the given amount.- Parameters:
connectionName- The Martini Runtime Redis connection pool namekey- the keyamount- the increment type: double- Returns:
- double bulk-string-reply the value of
keyafter the increment.
-
mget
@GloopObjectParameter("output{\n redisKeyValues[]{\n key:object\n value:object\n }\n}") public static GloopModel mget(@GloopParameter(allowNull=false) String connectionName, GloopExecutionContext context, @GloopParameter(allowNull=false) Object... keys)
Get the values of all the given keys.- Parameters:
connectionName- The Martini Runtime Redis connection pool namekeys- the key- Returns:
- List<V> array-reply list of values at the specified keys.
-
mget
@GloopParameter(name="redisMgetOutput") public static Long mget(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) KeyValueStreamingChannel<Object,Object> channel, GloopExecutionContext context, @GloopParameter(allowNull=false) Object... keys)
Stream over the values of all the given keys.- Parameters:
connectionName- The Martini Runtime Redis connection pool namechannel- the channelkeys- the keys- Returns:
- Long array-reply list of values at the specified keys.
-
mgetAsync
@GloopParameter(name="redisFutureMgetOutput") public static Future<List<KeyValue<Object,Object>>> mgetAsync(@GloopParameter(allowNull=false) String connectionName, GloopExecutionContext context, @GloopParameter(allowNull=false) Object... keys)
Asynchronously get the values of all the given keys.- Parameters:
connectionName- The Martini Runtime Redis connection pool namekeys- the key- Returns:
- list<V> array-reply list of values at the specified keys.
-
mgetAsync
@GloopParameter(name="redisFutureMgetOutput") public static Future<Long> mgetAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) KeyValueStreamingChannel<Object,Object> channel, GloopExecutionContext context, @GloopParameter(allowNull=false) Object... keys)
Asynchronously stream over the values of all the given keys.- Parameters:
connectionName- The Martini Runtime Redis connection pool namechannel- the channelkeys- the keys- Returns:
- long array-reply list of values at the specified keys.
-
mset
@GloopParameter(name="redisMsetOutput") public static String mset(@GloopParameter(allowNull=false) String connectionName, @GloopObjectParameter("redisMap[]{\n name:object\n value:object\n}\n") GloopModel redisMap, GloopExecutionContext context)
Set multiple keys to multiple values.- Parameters:
connectionName- The Martini Runtime Redis connection pool nameredisMap- the key/value pais- Returns:
- String simple-string-reply always
OKsinceMSETcan't fail.
-
msetAsync
@GloopParameter(name="redisFutureMsetOutput") public static Future<String> msetAsync(@GloopParameter(allowNull=false) String connectionName, @GloopObjectParameter("redisMap[]{\n name:object\n value:object\n}\n") GloopModel redisMap, GloopExecutionContext context)
Asynchronously set multiple keys to multiple values.- Parameters:
connectionName- The Martini Runtime Redis connection pool nameredisMap- the key/value pairs- Returns:
- string simple-string-reply always
oKsincemSETcan't fail.
-
msetnx
@GloopParameter(name="redisMsetnxOutput") public static Boolean msetnx(@GloopParameter(allowNull=false) String connectionName, @GloopObjectParameter("redisMap[]{\n name:object\n value:object\n}\n") GloopModel redisMap, GloopExecutionContext context)
Set multiple keys to multiple values, only if none of the keys exist.- Parameters:
connectionName- The Martini Runtime Redis connection pool nameredisMap- key/value pairs- Returns:
- Boolean integer-reply specifically:
1if the all the keys were set.0if no key was set (at least one key already existed).
-
msetnxAsync
@GloopParameter(name="redisFutureMsetnxOutput") public static Future<Boolean> msetnxAsync(@GloopParameter(allowNull=false) String connectionName, @GloopObjectParameter("redisMap[]{\n name:object\n value:object\n}\n") GloopModel redisMap, GloopExecutionContext context)
Asynchronously set multiple keys to multiple values, only if none of the keys exist.- Parameters:
connectionName- The Martini Runtime Redis connection pool nameredisMap- key/value pairs- Returns:
- boolean integer-reply specifically:
1if the all the keys were set.0if no key was set (at least one key already existed).
-
set
@GloopParameter(name="redisSetOutput") public static String set(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) Object value, GloopExecutionContext context)
Set the string value of a key.- Parameters:
connectionName- The Martini Runtime Redis connection pool namekey- the keyvalue- the value- Returns:
- String simple-string-reply
OKifSETwas executed correctly.
-
set
@GloopParameter(name="redisSetOutput") public static String set(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) Object value, @GloopObjectParameter("setArgs{\n ex:long:Set the specified expire time, in seconds\n px:long:Set the specified expire time, in milliseconds\n nx:boolean:Only set the key if it does not already exist\n xx:boolean:Only set the key if it already exists\n}") GloopModel setArgs, GloopExecutionContext context)
Set the string value of a key.- Parameters:
connectionName- The Martini Runtime Redis connection pool namekey- the keyvalue- the valuesetArgs- the setArgs- Returns:
- String simple-string-reply
OKifSETwas executed correctly.
-
setAsync
@GloopParameter(name="redisFutureSetOutput") public static Future<String> setAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) Object value, GloopExecutionContext context)
Asynchronously set the string value of a key.- Parameters:
connectionName- The Martini Runtime Redis connection pool namekey- the keyvalue- the value- Returns:
- string simple-string-reply
oKifsETwas executed correctly.
-
setAsync
@GloopParameter(name="redisFutureSetOutput") public static Future<String> setAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) Object value, @GloopObjectParameter("setArgs{\n ex:long:Set the specified expire time, in seconds\n px:long:Set the specified expire time, in milliseconds\n nx:boolean:Only set the key if it does not already exist\n xx:boolean:Only set the key if it already exists\n}") GloopModel setArgs, GloopExecutionContext context)
Asynchronously set the string value of a key.- Parameters:
connectionName- The Martini Runtime Redis connection pool namekey- the keyvalue- the valuesetArgs- the setArgs- Returns:
- string simple-string-reply
oKifsETwas executed correctly.
-
setbit
@GloopParameter(name="redisSetbitOutput") public static Long setbit(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) long offset, @GloopParameter(allowNull=false) int value, GloopExecutionContext context)
Sets or clears the bit at offset in the string value stored at key.- Parameters:
connectionName- The Martini Runtime Redis connection pool namekey- the keyoffset- the offset type: longvalue- the value type: string- Returns:
- Long integer-reply the original bit value stored at offset.
-
setbitAsync
@GloopParameter(name="redisFutureSetbitOutput") public static Future<Long> setbitAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) long offset, @GloopParameter(allowNull=false) int value, GloopExecutionContext context)
Asynchronously sets or clears the bit at offset in the string value stored at key.- Parameters:
connectionName- The Martini Runtime Redis connection pool namekey- the keyoffset- the offset type: longvalue- the value type: string- Returns:
- long integer-reply the original bit value stored at offset.
-
setex
@GloopParameter(name="redisSetexOutput") public static String setex(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) long seconds, @GloopParameter(allowNull=false) Object value, GloopExecutionContext context)
Set the value and expiration of a key.- Parameters:
connectionName- The Martini Runtime Redis connection pool namekey- the keyseconds- the seconds type: longvalue- the value- Returns:
- String simple-string-reply
-
setexAsync
@GloopParameter(name="redisFutureSetexOutput") public static Future<String> setexAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) long seconds, @GloopParameter(allowNull=false) Object value, GloopExecutionContext context)
Asynchronously set the value and expiration of a key.- Parameters:
connectionName- The Martini Runtime Redis connection pool namekey- the keyseconds- the seconds type: longvalue- the value- Returns:
- string simple-string-reply
-
psetex
@GloopParameter(name="redisPsetexOutput") public static String psetex(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) long milliseconds, @GloopParameter(allowNull=false) Object value, GloopExecutionContext context)
Set the value and expiration in milliseconds of a key.- Parameters:
connectionName- The Martini Runtime Redis connection pool namekey- the keymilliseconds- the milliseconds type: longvalue- the value- Returns:
- String simple-string-reply
-
psetexAsync
@GloopParameter(name="redisFuturePsetexOutput") public static Future<String> psetexAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) long milliseconds, @GloopParameter(allowNull=false) Object value, GloopExecutionContext context)
Asynchronously set the value and expiration in milliseconds of a key.- Parameters:
connectionName- The Martini Runtime Redis connection pool namekey- the keymilliseconds- the milliseconds type: longvalue- the value- Returns:
- string simple-string-reply
-
setnx
@GloopParameter(name="redisSetnxOutput") public static Boolean setnx(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) Object value, GloopExecutionContext context)
Set the value of a key, only if the key does not exist.- Parameters:
connectionName- The Martini Runtime Redis connection pool namekey- the keyvalue- the value- Returns:
- Boolean integer-reply specifically:
1if the key was set0if the key was not set
-
setnxAsync
@GloopParameter(name="redisFutureSetnxOutput") public static Future<Boolean> setnxAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) Object value, GloopExecutionContext context)
Asynchronously set the value of a key, only if the key does not exist.- Parameters:
connectionName- The Martini Runtime Redis connection pool namekey- the keyvalue- the value- Returns:
- boolean integer-reply specifically:
1if the key was set0if the key was not set
-
setrange
@GloopParameter(name="redisSetrangeOutput") public static Long setrange(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) long offset, @GloopParameter(allowNull=false) Object value, GloopExecutionContext context)
Overwrite part of a string at key starting at the specified offset.- Parameters:
connectionName- The Martini Runtime Redis connection pool namekey- the keyoffset- the offset type: longvalue- the value- Returns:
- Long integer-reply the length of the string after it was modified by the command.
-
setrangeAsync
@GloopParameter(name="redisFutureSetrangeOutput") public static Future<Long> setrangeAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) long offset, @GloopParameter(allowNull=false) Object value, GloopExecutionContext context)
Asynchronously overwrite part of a string at key starting at the specified offset.- Parameters:
connectionName- The Martini Runtime Redis connection pool namekey- the keyoffset- the offset type: longvalue- the value- Returns:
- long integer-reply the length of the string after it was modified by the command.
-
strlen
@GloopParameter(name="redisStrlenOutput") public static Long strlen(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, GloopExecutionContext context)
Get the length of the value stored in a key.- Parameters:
connectionName- The Martini Runtime Redis connection pool namekey- the key- Returns:
- Long integer-reply the length of the string at
key, or0whenkeydoes not exist.
-
strlenAsync
@GloopParameter(name="redisFutureStrlenOutput") public static Future<Long> strlenAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, GloopExecutionContext context)
Asynchronously get the length of the value stored in a key.- Parameters:
connectionName- The Martini Runtime Redis connection pool namekey- the key- Returns:
- long integer-reply the length of the string at
key, or0whenkeydoes not exist.
-
-