Class UnifiedJedis
- All Implemented Interfaces:
AutoCloseable,BloomFilterCommands,CountMinSketchCommands,CuckooFilterCommands,RedisBloomCommands,TDigestSketchCommands,TopKFilterCommands,BitBinaryCommands,BitCommands,FunctionBinaryCommands,FunctionCommands,GeoBinaryCommands,GeoCommands,HashBinaryCommands,HashCommands,HyperLogLogBinaryCommands,HyperLogLogCommands,JedisBinaryCommands,JedisCommands,KeyBinaryCommands,KeyCommands,ListBinaryCommands,ListCommands,RedisModuleCommands,SampleBinaryKeyedCommands,SampleKeyedCommands,ScriptingKeyBinaryCommands,ScriptingKeyCommands,SetBinaryCommands,SetCommands,SortedSetBinaryCommands,SortedSetCommands,StreamBinaryCommands,StreamCommands,StringBinaryCommands,StringCommands,RedisGraphCommands,RedisJsonCommands,RediSearchCommands,RedisTimeSeriesCommands
- Direct Known Subclasses:
JedisCluster,JedisPooled,JedisSentineled,JedisSharding
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CommandObjectsprotected final CommandExecutorprivate final GraphCommandObjectsprotected final ConnectionProvider -
Constructor Summary
ConstructorsConstructorDescriptionUnifiedJedis(String url) UnifiedJedis(URI uri) UnifiedJedis(URI uri, JedisClientConfig config) UnifiedJedis(Set<HostAndPort> jedisClusterNodes, JedisClientConfig clientConfig, int maxAttempts) UnifiedJedis(Set<HostAndPort> jedisClusterNodes, JedisClientConfig clientConfig, int maxAttempts, Duration maxTotalRetriesDuration) UnifiedJedis(Set<HostAndPort> jedisClusterNodes, JedisClientConfig clientConfig, org.apache.commons.pool2.impl.GenericObjectPoolConfig<Connection> poolConfig, int maxAttempts, Duration maxTotalRetriesDuration) UnifiedJedis(Connection connection) The constructor to directly use aConnection.UnifiedJedis(CommandExecutor executor) The constructor to use a customCommandExecutor.UnifiedJedis(HostAndPort hostAndPort) UnifiedJedis(HostAndPort hostAndPort, JedisClientConfig clientConfig) UnifiedJedis(JedisSocketFactory socketFactory) The constructor to directly use a customJedisSocketFactory.UnifiedJedis(ClusterConnectionProvider provider, int maxAttempts, Duration maxTotalRetriesDuration) UnifiedJedis(ConnectionProvider provider) UnifiedJedis(ConnectionProvider provider, int maxAttempts, Duration maxTotalRetriesDuration) UnifiedJedis(ShardedConnectionProvider provider) UnifiedJedis(ShardedConnectionProvider provider, Pattern tagPattern) -
Method Summary
Modifier and TypeMethodDescriptionlongappend(byte[] key, byte[] value) longAppend Command If the key already exists and is a string, this command appends the provided value at the end of the string.booleanBF.ADD {key} {item}longbooleanBF.EXISTS {key} {item}BF.INSERT {key} ITEMS {item ...}bfInsert(String key, BFInsertParams insertParams, String... items) BF.INSERT {key} [CAPACITY {cap}] [ERROR {error}] [EXPANSION {expansion}] [NOCREATE] [NONSCALING] ITEMS {item ...}bfLoadChunk(String key, long iterator, byte[] data) BF.LOADCHUNK {key} {iterator} {data}BF.MADD {key} {item ...}BF.MEXISTS {key} {item ...}BF.RESERVE {key} {error_rate} {capacity}bfReserve(String key, double errorRate, long capacity, BFReserveParams reserveParams) BF.RESERVE {key} {error_rate} {capacity} [EXPANSION {expansion}] [NONSCALING]bfScanDump(String key, long iterator) BF.SCANDUMP {key} {iterator}longbitcount(byte[] key) longbitcount(byte[] key, long start, long end) longbitcount(byte[] key, long start, long end, BitCountOption option) longBitcount Command Count the number of set bits (population counting) in a string.longBitcount Command Count the number of set bits (population counting) in a string only in an interval start and end.longbitcount(String key, long start, long end, BitCountOption option) bitfield(byte[] key, byte[]... arguments) Bitfield Command The command treats a Redis string as an array of bits, and is capable of addressing specific integer fields of varying bit widths and arbitrary non (necessary) aligned offset.bitfieldReadonly(byte[] key, byte[]... arguments) bitfieldReadonly(String key, String... arguments) The readonly version ofBITFIELDlonglongBitop Command Perform a bitwise operation between multiple keys (containing string values) and store the result in the destKey.longbitpos(byte[] key, boolean value) longbitpos(byte[] key, boolean value, BitPosParams params) longBitpos Command Return the position of the first bit set to 1 or 0 in a string.longbitpos(String key, boolean value, BitPosParams params) Bitpos Command Return the position of the first bit set to 1 or 0 in a string.byte[]blmove(byte[] srcKey, byte[] dstKey, ListDirection from, ListDirection to, double timeout) blmove(String srcKey, String dstKey, ListDirection from, ListDirection to, double timeout) Pop an element from a list, push it to another list and return it; or block until one is availableblmpop(long timeout, ListDirection direction, byte[]... keys) blmpop(long timeout, ListDirection direction, int count, byte[]... keys) blmpop(long timeout, ListDirection direction, int count, String... keys) blmpop(long timeout, ListDirection direction, String... keys) List<byte[]> blpop(double timeout, byte[]... keys) The blocking version ofListCommands.lpop(String)LPOP} because it blocks the connection when there are no elements to pop from any of the given lists.List<byte[]> blpop(int timeout, byte[]... keys) The blocking version ofListCommands.lpop(String)LPOP} because it blocks the connection when there are no elements to pop from any of the given lists.final <T> TbroadcastCommand(CommandObject<T> commandObject) List<byte[]> brpop(double timeout, byte[]... keys) The blocking version ofListCommands.rpop(String)RPOP} because it blocks the connection when there are no elements to pop from any of the given lists.List<byte[]> brpop(int timeout, byte[]... keys) The blocking version ofListCommands.rpop(String)RPOP} because it blocks the connection when there are no elements to pop from any of the given lists.byte[]brpoplpush(byte[] source, byte[] destination, int timeout) brpoplpush(String source, String destination, int timeout) The blocking variant ofListCommands.rpoplpush(String, String).bzmpop(long timeout, SortedSetOption option, byte[]... keys) bzmpop(long timeout, SortedSetOption option, int count, byte[]... keys) bzmpop(long timeout, SortedSetOption option, int count, String... keys) bzmpop(long timeout, SortedSetOption option, String... keys) List<byte[]> bzpopmax(double timeout, byte[]... keys) The blocking version ofZPOPMAXList<byte[]> bzpopmin(double timeout, byte[]... keys) The blocking version ofZPOPMINbooleanCF.ADD Adds an item to the cuckoo filter, creating the filter if it does not existbooleanCF.ADDNX Adds an item to the cuckoo filter, only if it does not exist yetlongCF.COUNT Returns the number of times an item may be in the filter.booleanCF.DEL Deletes an item once from the filter.booleanCF.EXISTS Check if an item exists in a Cuckoo FilterCF.INFO Return information about filterCF.INSERT Adds one or more items to a cuckoo filter, creating it if it does not exist yet.cfInsert(String key, CFInsertParams insertParams, String... items) CF.INSERT Adds one or more items to a cuckoo filter, using the passed optionscfInsertNx(String key, String... items) CF.INSERTNX Adds one or more items to a cuckoo filter, only if it does not exist yetcfInsertNx(String key, CFInsertParams insertParams, String... items) CF.INSERTNX Adds one or more items to a cuckoo filter, using the passed optionscfLoadChunk(String key, long iterator, byte[] data) CF.LOADCHUNK Restores a filter previously saved using SCANDUMP.CF.MEXISTS {key} {item ...}CF.RESERVE Creates a Cuckoo Filter under key with the given parameterscfReserve(String key, long capacity, CFReserveParams reserveParams) CF.RESERVE Creates a Cuckoo Filter under key with the given parameterscfScanDump(String key, long iterator) CF.SCANDUMP Begins an incremental save of the cuckoo filter.private <T> TcheckAndBroadcastCommand(CommandObject<T> commandObject) voidclose()CMS.INCRBY Increases the count of one or more item.CMS.INFO Returns width, depth and total count of the sketch.cmsInitByDim(String key, long width, long depth) CMS.INITBYDIM Initializes a Count-Min Sketch to dimensions specified by user.cmsInitByProb(String key, double error, double probability) CMS.INITBYPROB Initializes a Count-Min Sketch to accommodate requested capacity.CMS.MERGE Merges several sketches into one sketch.CMS.MERGE Merges several sketches into one sketch.CMS.QUERY Returns count for item.booleancopy(byte[] srcKey, byte[] dstKey, boolean replace) booleanCopy Command Copy the value stored at the source key to the destination key.longdbSize()longdecr(byte[] key) longDecr Command Decrement the number stored at key by one.longdecrBy(byte[] key, long decrement) longDecrBy Command DECRBY work just likeDECRbut instead to decrement by 1 the decrement is integer.longdel(byte[] key) longdel(byte[]... keys) longDel Command Remove the specified key.longRemove the specified keys.byte[]dump(byte[] key) byte[]Dump Command Serialize the value stored at key in a Redis-specific format and return it to the user.eval(byte[] script) eval(byte[] script, byte[] sampleKey) eval(byte[] script, int keyCount, byte[]... params) Eval Command Use to evaluate scripts using the Lua interpreter built into Redis starting from version 2.6.0.Eval Command Use to evaluate scripts using the Lua interpreter built into Redis starting from version 2.6.0.Eval Command Use to evaluate scripts using the Lua interpreter built into Redis starting from version 2.6.0.evalReadonly(byte[] script, List<byte[]> keys, List<byte[]> args) Readonly version ofEVALevalsha(byte[] sha1) evalsha(byte[] sha1, byte[] sampleKey) evalsha(byte[] sha1, int keyCount, byte[]... params) EvalSha Command Similar toEVAL, but the script cached on the server side by its SHA1 digest.EvalSha Command Similar toScriptingKeyCommands.eval(String, int, String...)EVAL}, but the script cached on the server side by its SHA1 digest.EvalSha Command Similar toScriptingKeyCommands.eval(String, List, List)EVAL}, but the script cached on the server side by its SHA1 digest.evalshaReadonly(byte[] sha1, List<byte[]> keys, List<byte[]> args) Readonly version ofEVALfinal <T> TexecuteCommand(CommandObject<T> commandObject) booleanexists(byte[] key) longexists(byte[]... keys) booleanExists Command Test if the specified key exist.longExists Command Test if the specified keys exist.longexpire(byte[] key, long seconds) longexpire(byte[] key, long seconds, ExpiryOption expiryOption) longExpire Command Set a timeout on the specified key.longexpire(String key, long seconds, ExpiryOption expiryOption) Similar toEXPIREbut with optional expiry setting.longexpireAt(byte[] key, long unixTime) longexpireAt(byte[] key, long unixTime, ExpiryOption expiryOption) longExpireAt Command EXPIREAT works exactly likeEXPIREbut instead to get the number of seconds representing the Time To Live of the key as a second argument (that is a relative way of specifying the TTL), it takes an absolute one in the form of a UNIX timestamp (Number of seconds elapsed since 1 Gen 1970).longexpireAt(String key, long unixTime, ExpiryOption expiryOption) longexpireTime(byte[] key) longexpireTime(String key) ExpireTime Command Returns the absolute Unix timestamp (since January 1, 1970) in seconds at which the given key will expire.Invoke a function.Invoke a function.fcallReadonly(byte[] name, List<byte[]> keys, List<byte[]> args) This is a read-only variant of theFCALLcommand that cannot execute commands that modify data.flushAll()flushDB()ftAggregate(String indexName, AggregationBuilder aggr) ftAggregateIteration(String indexName, AggregationBuilder aggr) CURSORmust be set.ftAliasAdd(String aliasName, String indexName) ftAliasDel(String aliasName) ftAliasUpdate(String aliasName, String indexName) ftAlter(String indexName, Iterable<SchemaField> schemaFields) ftConfigGet(String option) ftConfigGet(String indexName, String option) ftConfigSet(String option, String value) ftConfigSet(String indexName, String option, String value) ftCreate(String indexName, FTCreateParams createParams, Iterable<SchemaField> schemaFields) ftCreate(String indexName, IndexOptions indexOptions, Schema schema) ftCursorDel(String indexName, long cursorId) ftCursorRead(String indexName, long cursorId, int count) longlongftDictAddBySampleKey(String indexName, String dictionary, String... terms) longlongftDictDelBySampleKey(String indexName, String dictionary, String... terms) ftDictDump(String dictionary) ftDictDumpBySampleKey(String indexName, String dictionary) ftDropIndex(String indexName) ftDropIndexDD(String indexName) ftExplainCLI(String indexName, Query query) ftList()ftProfileAggregate(String indexName, FTProfileParams profileParams, AggregationBuilder aggr) ftProfileSearch(String indexName, FTProfileParams profileParams, String query, FTSearchParams searchParams) ftProfileSearch(String indexName, FTProfileParams profileParams, Query query) ftSearch(String indexName, String query, FTSearchParams params) ftSearchIteration(int batchSize, String indexName, String query, FTSearchParams params) FTSearchParams.limit(int, int)will be ignored.ftSearchIteration(int batchSize, String indexName, Query query) Query.limit(java.lang.Integer, java.lang.Integer)will be ignored.ftSpellCheck(String index, String query) ftSpellCheck(String index, String query, FTSpellCheckParams spellCheckParams) longlongftSugAddIncr(String key, String string, double score) booleanftSugGetWithScores(String key, String prefix) ftSugGetWithScores(String key, String prefix, boolean fuzzy, int max) longftSynUpdate(String indexName, String synonymGroupId, String... terms) functionDelete(byte[] libraryName) This command deletes the library called library-name and all functions in it.functionDelete(String libraryName) This command deletes the library called library-name and all functions in it.byte[]Return the serialized payload of loaded libraries.Deletes all the libraries, unless called with the optional mode argument, the 'lazyfree-lazy-user-flush' configuration directive sets the effective behavior.functionFlush(FlushMode mode) Deletes all the libraries, unless called with the optional mode argument, the 'lazyfree-lazy-user-flush' configuration directive sets the effective behavior.Kill a function that is currently executing.Return information about the functions and libraries.functionList(byte[] libraryNamePattern) Return information about the functions and libraries.functionList(String libraryNamePattern) Return information about the functions and libraries.Return information about the functions and libraries.Similar toFUNCTION LISTbut include the libraries source implementation in the reply.functionListWithCode(byte[] libraryNamePattern) Similar toFUNCTION LISTbut include the libraries source implementation in the reply.functionListWithCode(String libraryNamePattern) Similar toFUNCTION LISTbut include the libraries source implementation in the reply.Similar toFUNCTION LISTbut include the libraries source implementation in the reply.functionLoad(byte[] functionCode) Load a library to Redis.functionLoad(String functionCode) Load a library to Redis.functionLoadReplace(byte[] functionCode) Load a library to Redis.functionLoadReplace(String functionCode) Load a library to Redis.functionRestore(byte[] serializedValue) Restore libraries from the serialized payload.functionRestore(byte[] serializedValue, FunctionRestorePolicy policy) Restore libraries from the serialized payload.Return information about the function that's currently running and information about the available execution engines.Return information about the function that's currently running and information about the available execution engines.longgeoadd(byte[] key, double longitude, double latitude, byte[] member) longgeoadd(byte[] key, Map<byte[], GeoCoordinate> memberCoordinateMap) longgeoadd(byte[] key, GeoAddParams params, Map<byte[], GeoCoordinate> memberCoordinateMap) longAdds the specified geospatial item (longitude, latitude, member) to the specified key.longgeoadd(String key, Map<String, GeoCoordinate> memberCoordinateMap) Adds the specified geospatial items (in memberCoordinateMap) to the specified key.longgeoadd(String key, GeoAddParams params, Map<String, GeoCoordinate> memberCoordinateMap) Adds the specified geospatial items (in memberCoordinateMap) to the specified key.geodist(byte[] key, byte[] member1, byte[] member2) Return the distance between two members in the geospatial index represented by the sorted set.Return the distance between two members in the geospatial index represented by the sorted set.List<byte[]> geohash(byte[] key, byte[]... members) Return valid Geohash strings representing the position of the given members.geopos(byte[] key, byte[]... members) Return the positions (longitude,latitude) of all the specified members.georadius(byte[] key, double longitude, double latitude, double radius, GeoUnit unit, GeoRadiusParam param) Return the members of a sorted set populated with geospatial information using GEOADD, which are within the borders of the area specified with the center location and the radius.georadius(String key, double longitude, double latitude, double radius, GeoUnit unit, GeoRadiusParam param) Return the members of a sorted set populated with geospatial information using GEOADD, which are within the borders of the area specified with the center location and the radius.georadiusByMember(byte[] key, byte[] member, double radius, GeoUnit unit) georadiusByMember(byte[] key, byte[] member, double radius, GeoUnit unit, GeoRadiusParam param) georadiusByMember(String key, String member, double radius, GeoUnit unit) This command is exactly likeGEORADIUSwith the sole difference that instead of taking, as the center of the area to query, a longitude and latitude value, it takes the name of a member already existing inside the geospatial index represented by the sorted set.georadiusByMember(String key, String member, double radius, GeoUnit unit, GeoRadiusParam param) This command is exactly likeGEORADIUSwith the sole difference that instead of taking, as the center of the area to query, a longitude and latitude value, it takes the name of a member already existing inside the geospatial index represented by the sorted set.georadiusByMemberReadonly(byte[] key, byte[] member, double radius, GeoUnit unit) georadiusByMemberReadonly(byte[] key, byte[] member, double radius, GeoUnit unit, GeoRadiusParam param) georadiusByMemberReadonly(String key, String member, double radius, GeoUnit unit) Readonly version ofGEORADIUSBYMEMBERgeoradiusByMemberReadonly(String key, String member, double radius, GeoUnit unit, GeoRadiusParam param) Readonly version ofGEORADIUSBYMEMBERlonggeoradiusByMemberStore(byte[] key, byte[] member, double radius, GeoUnit unit, GeoRadiusParam param, GeoRadiusStoreParam storeParam) longgeoradiusByMemberStore(String key, String member, double radius, GeoUnit unit, GeoRadiusParam param, GeoRadiusStoreParam storeParam) This command is exactly likeGEORADIUSBYMEMBERbut storing the results at the destination key (provided withstoreParam).georadiusReadonly(byte[] key, double longitude, double latitude, double radius, GeoUnit unit) georadiusReadonly(byte[] key, double longitude, double latitude, double radius, GeoUnit unit, GeoRadiusParam param) georadiusReadonly(String key, double longitude, double latitude, double radius, GeoUnit unit) Readonly version ofGEORADIUS,georadiusReadonly(String key, double longitude, double latitude, double radius, GeoUnit unit, GeoRadiusParam param) Readonly version ofGEORADIUS,longgeoradiusStore(byte[] key, double longitude, double latitude, double radius, GeoUnit unit, GeoRadiusParam param, GeoRadiusStoreParam storeParam) longgeoradiusStore(String key, double longitude, double latitude, double radius, GeoUnit unit, GeoRadiusParam param, GeoRadiusStoreParam storeParam) This command is exactly likeGEORADIUSbut storing the results at the destination key (provided withstoreParam).geosearch(byte[] key, GeoCoordinate coord, double width, double height, GeoUnit unit) geosearch(byte[] key, GeoCoordinate coord, double radius, GeoUnit unit) geosearch(byte[] key, GeoSearchParam params) Return the members of a sorted set populated with geospatial information using GEOADD, which are within the borders of the area specified by a given shape.Return the members of a sorted set populated with geospatial information using GEOADD, which are within the borders of the area specified by a given shape.geosearch(String key, GeoCoordinate coord, double width, double height, GeoUnit unit) Return the members of a sorted set populated with geospatial information using GEOADD, which are within the borders of the area specified by a given shape.geosearch(String key, GeoCoordinate coord, double radius, GeoUnit unit) Return the members of a sorted set populated with geospatial information using GEOADD, which are within the borders of the area specified by a given shape.geosearch(String key, GeoSearchParam params) Return the members of a sorted set populated with geospatial information using GEOADD, which are within the borders of the area specified by a given shape.longgeosearchStore(byte[] dest, byte[] src, byte[] member, double width, double height, GeoUnit unit) longgeosearchStore(byte[] dest, byte[] src, byte[] member, double radius, GeoUnit unit) longgeosearchStore(byte[] dest, byte[] src, GeoCoordinate coord, double width, double height, GeoUnit unit) longgeosearchStore(byte[] dest, byte[] src, GeoCoordinate coord, double radius, GeoUnit unit) longgeosearchStore(byte[] dest, byte[] src, GeoSearchParam params) longgeosearchStore(String dest, String src, String member, double width, double height, GeoUnit unit) This command is exactly likeGEOSEARCHbut storing the results at dest.longgeosearchStore(String dest, String src, String member, double radius, GeoUnit unit) This command is exactly likeGEOSEARCHbut storing the results at dest.longgeosearchStore(String dest, String src, GeoCoordinate coord, double width, double height, GeoUnit unit) This command is exactly likeGEOSEARCHbut storing the results at dest.longgeosearchStore(String dest, String src, GeoCoordinate coord, double radius, GeoUnit unit) This command is exactly likeGEOSEARCHbut storing the results at dest.longgeosearchStore(String dest, String src, GeoSearchParam params) This command is exactly likeGEOSEARCHbut storing the results at dest.longgeosearchStoreStoreDist(byte[] dest, byte[] src, GeoSearchParam params) longgeosearchStoreStoreDist(String dest, String src, GeoSearchParam params) This command is exactly likeGEOSEARCHSTOREbut storing the results with their destinations from the center point.byte[]get(byte[] key) Get Command Get the value of the specified key.booleangetbit(byte[] key, long offset) booleanGetBit Command Returns the bit value at offset in the string value stored at key.byte[]getDel(byte[] key) GetDel Command Get the value of key and delete the key.byte[]getEx(byte[] key, GetExParams params) getEx(String key, GetExParams params) GetEx Command Get the value of key and optionally set its expiration.byte[]getrange(byte[] key, long startOffset, long endOffset) GetRange Command Return the substring of the string value stored at key, determined by the offsets start and end (both are inclusive).byte[]getSet(byte[] key, byte[] value) GetSet Command GETSET is an atomic set this value and return the old value command.graphConfigGet(String configName) graphConfigSet(String configName, Object value) graphDelete(String name) Deletes the entire graphgraphExplain(String graphName, String query) Constructs a query execution plan but does not run it.Lists all graph keys in the keyspace.graphProfile(String graphName, String query) Executes a query and produces an execution plan augmented with metrics for each operation's execution.graphQuery(String name, String query) Execute a Cypher query.graphQuery(String name, String query, long timeout) Execute a Cypher query with timeout.Executes a cypher query with parameters.Executes a cypher query with parameters and timeout.graphReadonlyQuery(String name, String query) Execute a Cypher read-only query.graphReadonlyQuery(String name, String query, long timeout) Execute a Cypher read-only query with timeout.Executes a cypher read-only query with parameters.Executes a cypher read-only query with parameters and timeout.graphSlowlog(String graphName) Returns a list containing up to 10 of the slowest queries issued against the given graph ID.longhdel(byte[] key, byte[]... field) longbooleanhexists(byte[] key, byte[] field) booleanbyte[]hget(byte[] key, byte[] field) Map<byte[], byte[]> hgetAll(byte[] key) longhincrBy(byte[] key, byte[] field, long value) longdoublehincrByFloat(byte[] key, byte[] field, double value) doublehincrByFloat(String key, String field, double value) Set<byte[]> hkeys(byte[] key) longhlen(byte[] key) longList<byte[]> hmget(byte[] key, byte[]... fields) byte[]hrandfield(byte[] key) List<byte[]> hrandfield(byte[] key, long count) hrandfield(String key) hrandfield(String key, long count) Map<byte[], byte[]> hrandfieldWithValues(byte[] key, long count) hrandfieldWithValues(String key, long count) ScanResult<Map.Entry<byte[], byte[]>> hscan(byte[] key, byte[] cursor, ScanParams params) hscan(String key, String cursor, ScanParams params) longhset(byte[] key, byte[] field, byte[] value) longlonglonglonghsetnx(byte[] key, byte[] field, byte[] value) longlonghsetObject(String key, String field, Object value) longhsetObject(String key, Map<String, Object> hash) longhstrlen(byte[] key, byte[] field) longList<byte[]> hvals(byte[] key) longincr(byte[] key) longIncr Command Increment the number stored at key by one.longincrBy(byte[] key, long increment) longIncrBy Command INCRBY work just likeINCRbut instead to increment by 1 the increment is integer.doubleincrByFloat(byte[] key, double increment) doubleincrByFloat(String key, double increment) IncrByFloat Command INCRBYFLOAT work just likeStringCommands.incrBy(String, long)INCRBY} but increments by floats instead of integers.jsonArrAppend(String key, Path2 path, Object... objects) jsonArrAppend(String key, Path path, Object... pojos) jsonArrAppendWithEscape(String key, Path2 path, Object... objects) jsonArrIndex(String key, Path2 path, Object scalar) longjsonArrIndex(String key, Path path, Object scalar) jsonArrIndexWithEscape(String key, Path2 path, Object scalar) jsonArrInsert(String key, Path2 path, int index, Object... objects) longjsonArrInsert(String key, Path path, int index, Object... pojos) jsonArrInsertWithEscape(String key, Path2 path, int index, Object... objects) jsonArrLen(String key) jsonArrLen(String key, Path path) jsonArrLen(String key, Path2 path) jsonArrPop(String key) <T> TjsonArrPop(String key, Class<T> clazz) <T> TjsonArrPop(String key, Class<T> clazz, Path path) <T> TjsonArrPop(String key, Class<T> clazz, Path path, int index) jsonArrPop(String key, Path path) jsonArrPop(String key, Path2 path) jsonArrPop(String key, Path2 path, int index) jsonArrPop(String key, Path path, int index) jsonArrTrim(String key, Path2 path, int start, int stop) jsonArrTrim(String key, Path path, int start, int stop) longlonglonglongjsonDebugMemory(String key) longjsonDebugMemory(String key, Path path) jsonDebugMemory(String key, Path2 path) longlonglong<T> T<T> TjsonGetAsPlainString(String key, Path path) List<org.json.JSONArray> <T> List<T> org.json.JSONArrayjsonNumIncrBy(String key, Path2 path, double value) doublejsonNumIncrBy(String key, Path path, double value) jsonObjKeys(String key) jsonObjKeys(String key, Path path) jsonObjKeys(String key, Path2 path) jsonObjLen(String key) jsonObjLen(String key, Path path) jsonObjLen(String key, Path2 path) Deprecated.Deprecated.Deprecated.jsonSet(String key, Path2 path, Object pojo, JsonSetParams params) jsonSet(String key, Path path, Object pojo, JsonSetParams params) jsonSetWithEscape(String key, Path2 path, Object object) jsonSetWithEscape(String key, Path2 path, Object pojo, JsonSetParams params) jsonSetWithPlainString(String key, Path path, String string) longjsonStrAppend(String key, Object string) jsonStrAppend(String key, Path2 path, Object string) longjsonStrAppend(String key, Path path, Object string) jsonStrLen(String key) jsonStrLen(String key, Path path) jsonStrLen(String key, Path2 path) jsonToggle(String key, Path path) jsonToggle(String key, Path2 path) Class<?> Class<?> Set<byte[]> keys(byte[] pattern) Keys Command Returns all the keys matching the glob-style pattern as space separated strings.Calculate the longest common subsequence of keyA and keyB.Calculate the longest common subsequence of keyA and keyB.byte[]lindex(byte[] key, long index) Returns the element at index in the list stored at key.longlinsert(byte[] key, ListPosition where, byte[] pivot, byte[] value) longlinsert(String key, ListPosition where, String pivot, String value) Inserts element in the list stored at key either before or after the reference value pivot.longllen(byte[] key) longReturn the length of the list stored at the specified key.byte[]lmove(byte[] srcKey, byte[] dstKey, ListDirection from, ListDirection to) lmove(String srcKey, String dstKey, ListDirection from, ListDirection to) Pop an element from a list, push it to another list and return itlmpop(ListDirection direction, byte[]... keys) lmpop(ListDirection direction, int count, byte[]... keys) lmpop(ListDirection direction, int count, String... keys) lmpop(ListDirection direction, String... keys) byte[]lpop(byte[] key) List<byte[]> lpop(byte[] key, int count) Atomically return and remove the first (LPOP) or last (RPOP) element of the list.Atomically return and remove the first (LPOP) or last (RPOP) element of the list.lpos(byte[] key, byte[] element) lpos(byte[] key, byte[] element, LPosParams params) lpos(byte[] key, byte[] element, LPosParams params, long count) Returns the index of the first matching element inside a redis list.lpos(String key, String element, LPosParams params) In case there are multiple matches Rank option specifies the "rank" of the element to return.lpos(String key, String element, LPosParams params, long count) Returns the index of matching elements inside a Redis list.longlpush(byte[] key, byte[]... args) longAdd the string value to the head (LPUSH) or tail (RPUSH) of the list stored at key.longlpushx(byte[] key, byte[]... args) longInserts specified values at the head of the list stored at key.List<byte[]> lrange(byte[] key, long start, long stop) Return the specified elements of the list stored at the specified key.longlrem(byte[] key, long count, byte[] value) longRemove the first count occurrences of the value element from the list.lset(byte[] key, long index, byte[] value) Set a new value as the element at index position of the List at key.ltrim(byte[] key, long start, long stop) Trim an existing list so that it will contain only the specified range of elements specified.memoryUsage(byte[] key) memoryUsage(byte[] key, int samples) memoryUsage(String key) Memory Usage Command Report the number of bytes that a key and its value require to be stored in RAM.memoryUsage(String key, int samples) Memory Usage Command Report the number of bytes that a key and its value require to be stored in RAM.List<byte[]> mget(byte[]... keys) MGet Command Get the values of all the specified keys.migrate(String host, int port, int timeout, MigrateParams params, byte[]... keys) migrate(String host, int port, int timeout, MigrateParams params, String... keys) Migrate Command Atomically transfer a key from a source Redis instance to a destination Redis instance.Migrate Command Atomically transfer a key from a source Redis instance to a destination Redis instance.mset(byte[]... keysvalues) MSet Command Set the the respective keys to the respective values.longmsetnx(byte[]... keysvalues) longMSetNX Command Set the respective keys to the respective values.multi()byte[]objectEncoding(byte[] key) objectEncoding(String key) Object Encoding Command Return the internal encoding for the Redis object stored at key.objectFreq(byte[] key) objectFreq(String key) Object Freq Command Return the logarithmic access frequency counter of a Redis object stored at key.objectIdletime(byte[] key) objectIdletime(String key) Object IdleTime Command Return the time in seconds since the last access to the value stored at key.objectRefcount(byte[] key) objectRefcount(String key) Object Refcount Command Return the reference count of the stored at key.longpersist(byte[] key) longPersist Command Undo aexpireat turning the expire key into a normal key.longpexpire(byte[] key, long milliseconds) longpexpire(byte[] key, long milliseconds, ExpiryOption expiryOption) longPExpire Command This command works exactly likeEXPIREbut the time to live of the key is specified in milliseconds instead of seconds.longpexpire(String key, long milliseconds, ExpiryOption expiryOption) Similar toEXPIREbut with optional expiry setting.longpexpireAt(byte[] key, long millisecondsTimestamp) longpexpireAt(byte[] key, long millisecondsTimestamp, ExpiryOption expiryOption) longPExpireAt Command This command works exactly likeEXPIREATbut Unix time at which the key will expire is specified in milliseconds instead of seconds.longpexpireAt(String key, long millisecondsTimestamp, ExpiryOption expiryOption) longpexpireTime(byte[] key) longpexpireTime(String key) PExpireTime Command Similar toEXPIRETIMEbut returns the absolute Unix expiration timestamp in milliseconds instead of seconds.longpfadd(byte[] key, byte[]... elements) longlongpfcount(byte[] key) longpfcount(byte[]... keys) longlongpfmerge(byte[] destkey, byte[]... sourcekeys) ping()psetex(byte[] key, long milliseconds, byte[] value) PSetEx Command PSETEX works exactly likeSETEXwith the sole difference that the expire time is specified in milliseconds instead of seconds.voidpsubscribe(BinaryJedisPubSub jedisPubSub, byte[]... patterns) voidpsubscribe(JedisPubSub jedisPubSub, String... patterns) longpttl(byte[] key) longPTTL Command The PTTL command returns the remaining time to live in milliseconds of a key that has anEXPIREset.longpublish(byte[] channel, byte[] message) longbyte[]RandomKey Command Return a randomly selected key from the currently selected DB.rename(byte[] oldkey, byte[] newkey) longrenamenx(byte[] oldkey, byte[] newkey) longRenameNX Command Rename oldkey into newkey but fails if the destination key newkey already exists.restore(byte[] key, long ttl, byte[] serializedValue) restore(byte[] key, long ttl, byte[] serializedValue, RestoreParams params) Restore Command Create a key associated with a value that is obtained by deserializing the provided serialized value (obtained viaDUMP).restore(String key, long ttl, byte[] serializedValue, RestoreParams params) Restore Command Create a key associated with a value that is obtained by deserializing the provided serialized value (obtained viaDUMP).byte[]rpop(byte[] key) List<byte[]> rpop(byte[] key, int count) Atomically return and remove the first (LPOP) or last (RPOP) element of the list.Atomically return and remove the first (LPOP) or last (RPOP) element of the list.byte[]rpoplpush(byte[] srckey, byte[] dstkey) Atomically return and remove the last (tail) element of the srckey list, and push the element as the first (head) element of the dstkey list.longrpush(byte[] key, byte[]... args) longAdd the string value to the head (LPUSH) or tail (RPUSH) of the list stored at key.longrpushx(byte[] key, byte[]... args) longInserts specified values at the tail of the list stored at key.longsadd(byte[] key, byte[]... members) longAdd the specified member to the set value stored at key.ScanResult<byte[]> scan(byte[] cursor) ScanResult<byte[]> scan(byte[] cursor, ScanParams params) ScanResult<byte[]> scan(byte[] cursor, ScanParams params, byte[] type) scan(String cursor, ScanParams params) scan(String cursor, ScanParams params, String type) scanIteration(int batchCount, String match) scanIteration(int batchCount, String match, String type) longscard(byte[] key) longReturn the set cardinality (number of elements).scriptExists(byte[] sha1, byte[] sampleKey) scriptExists(byte[] sampleKey, byte[]... sha1s) scriptExists(String sha1, String sampleKey) scriptExists(String sampleKey, String... sha1s) scriptExists(List<String> sha1s) scriptFlush(byte[] sampleKey) scriptFlush(byte[] sampleKey, FlushMode flushMode) scriptFlush(String sampleKey) scriptFlush(String sampleKey, FlushMode flushMode) scriptKill(byte[] sampleKey) scriptKill(String sampleKey) byte[]scriptLoad(byte[] script, byte[] sampleKey) scriptLoad(String script) scriptLoad(String script, String sampleKey) Set<byte[]> sdiff(byte[]... keys) Return the difference between the Sets stored atkeyslongsdiffstore(byte[] dstkey, byte[]... keys) longsdiffstore(String dstkey, String... keys) This command works exactly likeSDIFFbut instead of being returned the resulting set is stored in dstkey.sendBlockingCommand(byte[] sampleKey, ProtocolCommand cmd, byte[]... args) sendBlockingCommand(String sampleKey, ProtocolCommand cmd, String... args) sendBlockingCommand(ProtocolCommand cmd, byte[]... args) sendBlockingCommand(ProtocolCommand cmd, String... args) sendCommand(byte[] sampleKey, ProtocolCommand cmd, byte[]... args) sendCommand(String sampleKey, ProtocolCommand cmd, String... args) sendCommand(ProtocolCommand cmd, byte[]... args) sendCommand(ProtocolCommand cmd, String... args) set(byte[] key, byte[] value) Set Command Set the string value as value of the key.Set Command Set the string value as value of the key.booleansetbit(byte[] key, long offset, boolean value) booleanSetBit Command Sets or clears the bit at offset in the string value stored at key.voidsetex(byte[] key, long seconds, byte[] value) byte[]WARNING:SetParams.get()MUST NOT be used with this method.WARNING:SetParams.get()MUST NOT be used with this method.voidsetJsonObjectMapper(JsonObjectMapper jsonObjectMapper) longsetnx(byte[] key, byte[] value) longSetNE Command SETNX works exactly likeSETwith the only difference that if the key already exists no operation is performed.longsetrange(byte[] key, long offset, byte[] value) longSetRange Command GETRANGE overwrite part of the string stored at key, starting at the specified offset, for the entire length of value.Set<byte[]> sinter(byte[]... keys) Return the members of a set resulting from the intersection of all the sets hold at the specified keys.longsintercard(byte[]... keys) This command works exactly likeSINTERbut instead of returning the result set, it returns just the cardinality of the result.longsintercard(int limit, byte[]... keys) This command works exactly likeSINTERbut instead of returning the result set, it returns just the cardinality of the result.longsintercard(int limit, String... keys) This command works exactly likeSINTERbut instead of returning the result set, it returns just the cardinality of the result.longsintercard(String... keys) This command works exactly likeSINTERbut instead of returning the result set, it returns just the cardinality of the result.longsinterstore(byte[] dstkey, byte[]... keys) longsinterstore(String dstkey, String... keys) This command works exactly likeSINTERbut instead of being returned the resulting set is stored as dstkey.booleansismember(byte[] key, byte[] member) booleanReturn true if member is a member of the set stored at key, otherwise false is returned.Set<byte[]> smembers(byte[] key) Return all the members (elements) of the set value stored at key.smismember(byte[] key, byte[]... members) smismember(String key, String... members) Returns whether each member is a member of the set stored at key.longsmove(byte[] srckey, byte[] dstkey, byte[] member) longMove the specified member from the set at srckey to the set at dstkey.List<byte[]> sort(byte[] key) longsort(byte[] key, byte[] dstkey) List<byte[]> sort(byte[] key, SortingParams sortingParams) longsort(byte[] key, SortingParams sortingParams, byte[] dstkey) Sort Command Sort a Set or a List.longSimilar toSORTbut store the result indstkey.sort(String key, SortingParams sortingParams) Sort a Set or a List accordingly to the specified parameters.longsort(String key, SortingParams sortingParams, String dstkey) Similar toSORTbut store the result indstkey.List<byte[]> sortReadonly(byte[] key, SortingParams sortingParams) sortReadonly(String key, SortingParams sortingParams) Read-only variant of theSORTcommand.byte[]spop(byte[] key) Set<byte[]> spop(byte[] key, long count) Remove a random element from a Set returning it as return value.By default, the commandSetCommands.spop(String)pops a single member from the set.byte[]srandmember(byte[] key) List<byte[]> srandmember(byte[] key, int count) srandmember(String key) Return a random element from a Set, without removing the element.srandmember(String key, int count) Return a random elements from a Set, without removing the elements.longsrem(byte[] key, byte[]... members) longRemove the specified member from the set value stored at key.ScanResult<byte[]> sscan(byte[] key, byte[] cursor, ScanParams params) sscan(String key, String cursor, ScanParams params) strAlgoLCSKeys(byte[] keyA, byte[] keyB, StrAlgoLCSParams params) strAlgoLCSKeys(String keyA, String keyB, StrAlgoLCSParams params) Calculate the longest common subsequence of keyA and keyB.strAlgoLCSStrings(byte[] strA, byte[] strB, StrAlgoLCSParams params) strAlgoLCSStrings(String strA, String strB, StrAlgoLCSParams params) longstrlen(byte[] key) longStrLen Command Return the length of the string value stored at key.voidsubscribe(BinaryJedisPubSub jedisPubSub, byte[]... channels) voidsubscribe(JedisPubSub jedisPubSub, String... channels) byte[]substr(byte[] key, int start, int end) SubStr Command Return a subset of the string from offset start to offset end (both offsets are inclusive).Set<byte[]> sunion(byte[]... keys) Return the members of a set resulting from the union of all the sets hold at the specified keys.longsunionstore(byte[] dstkey, byte[]... keys) longsunionstore(String dstkey, String... keys) This command works exactly likeSUNIONbut instead of being returned the resulting set is stored as dstkey.tdigestAdd(String key, double... values) TDIGEST.ADD key value weight [ value weight ...]tdigestByRank(String key, long... ranks) tdigestByRevRank(String key, long... ranks) tdigestCDF(String key, double... values) TDIGEST.CDF key value [value ...]tdigestCreate(String key) TDIGEST.CREATE keytdigestCreate(String key, int compression) TDIGEST.CREATE key [compression]tdigestInfo(String key) TDIGEST.INFO keydoubletdigestMax(String key) TDIGEST.MAX keytdigestMerge(String destinationKey, String... sourceKeys) TDIGEST.MERGE destination-key numkeys source-key [source-key ...]tdigestMerge(TDigestMergeParams mergeParams, String destinationKey, String... sourceKeys) TDIGEST.MERGE destination-key numkeys source-key [source-key ...] [COMPRESSION compression] [OVERRIDE]doubletdigestMin(String key) TDIGEST.MIN keytdigestQuantile(String key, double... quantiles) TDIGEST.QUANTILE key quantile [quantile ...]tdigestRank(String key, double... values) tdigestReset(String key) TDIGEST.RESET keytdigestRevRank(String key, double... values) doubletdigestTrimmedMean(String key, double lowCutQuantile, double highCutQuantile) TDIGEST.TRIMMED_MEAN key low_cut_quantile high_cut_quantileTOPK.ADD {key} {item ...}Deprecated.topkIncrBy(String key, Map<String, Long> itemIncrements) TOPK.INCRBY {key} {item} {increment} [{item} {increment} ...]TOPK.INFO {key}TOPK.LIST {key}topkListWithCount(String key) TOPK.LIST {key} WITHCOUNTTOPK.QUERY {key} {item ...}topkReserve(String key, long topk) TOPK.RESERVE {key} {topk}topkReserve(String key, long topk, long width, long depth, double decay) TOPK.RESERVE {key} {topk} [{width} {depth} {decay}]longtouch(byte[] key) longtouch(byte[]... keys) longTouch Command Alters the last access time of a key.longTouch Command Alters the last access time of a key(s).longTS.ADD key * valuelongTS.ADD key timestamp valuelongtsAdd(String key, long timestamp, double value, TSCreateParams createParams) TS.ADD key timestamp value [RETENTION retentionTime] [ENCODING [COMPRESSED|UNCOMPRESSED]] [CHUNK_SIZE size] [ON_DUPLICATE policy] [LABELS label value..]tsAlter(String key, TSAlterParams alterParams) TS.ALTER key [RETENTION retentionTime] [LABELS label value..]TS.CREATE keytsCreate(String key, TSCreateParams createParams) TS.CREATE key [RETENTION retentionTime] [ENCODING [UNCOMPRESSED|COMPRESSED]] [CHUNK_SIZE size] [DUPLICATE_POLICY policy] [LABELS label value..]tsCreateRule(String sourceKey, String destKey, AggregationType aggregationType, long timeBucket) TS.CREATERULE sourceKey destKey AGGREGATION aggregationType timeBuckettsCreateRule(String sourceKey, String destKey, AggregationType aggregationType, long bucketDuration, long alignTimestamp) TS.CREATERULE sourceKey destKey AGGREGATION aggregationType bucketDuration [alignTimestamp]longlonglongTS.DEL key fromTimestamp toTimestamptsDeleteRule(String sourceKey, String destKey) TS.DELETERULE sourceKey destKeyTS.GET keytsGet(String key, TSGetParams getParams) TS.GET key [LATEST]longlongtsInfoDebug(String key) TS.MADD key timestamp value [key timestamp value ...]tsMGet(TSMGetParams multiGetParams, String... filters) TS.MGET [LATEST] [ WITHLABELS | SELECTED_LABELS label...] FILTER filter...TS.MRANGE fromTimestamp toTimestamp FILTER filter...tsMRange(TSMRangeParams multiRangeParams) TS.MRANGE fromTimestamp toTimestamp [LATEST] [FILTER_BY_TS ts...] [FILTER_BY_VALUE min max] [WITHLABELS | SELECTED_LABELS label...] [COUNT count] [[ALIGN value] AGGREGATION aggregator bucketDuration [BUCKETTIMESTAMP bt] [EMPTY]] FILTER filter... [GROUPBY label REDUCE reducer]tsMRevRange(long fromTimestamp, long toTimestamp, String... filters) TS.MREVRANGE fromTimestamp toTimestamp FILTER filter...tsMRevRange(TSMRangeParams multiRangeParams) TS.MREVRANGE fromTimestamp toTimestamp [LATEST] [FILTER_BY_TS TS...] [FILTER_BY_VALUE min max] [WITHLABELS | SELECTED_LABELS label...] [COUNT count] [[ALIGN value] AGGREGATION aggregator bucketDuration [BUCKETTIMESTAMP bt] [EMPTY]] FILTER filter... [GROUPBY label REDUCE reducer]tsQueryIndex(String... filters) TS.QUERYINDEX filter...TS.RANGE key fromTimestamp toTimestamptsRange(String key, TSRangeParams rangeParams) TS.RANGE key fromTimestamp toTimestamp [LATEST] [FILTER_BY_TS ts...] [FILTER_BY_VALUE min max] [COUNT count] [[ALIGN value] AGGREGATION aggregator bucketDuration [BUCKETTIMESTAMP bt] [EMPTY]]tsRevRange(String key, long fromTimestamp, long toTimestamp) TS.REVRANGE key fromTimestamp toTimestamptsRevRange(String key, TSRangeParams rangeParams) TS.REVRANGE key fromTimestamp toTimestamp [LATEST] [FILTER_BY_TS TS...] [FILTER_BY_VALUE min max] [COUNT count] [[ALIGN value] AGGREGATION aggregator bucketDuration [BUCKETTIMESTAMP bt] [EMPTY]]longttl(byte[] key) longTTL Command The TTL command returns the remaining time to live in seconds of a key that has anEXPIREset.type(byte[] key) Type Command Return the type of the value stored at key in form of a string.longunlink(byte[] key) longunlink(byte[]... keys) longUnlink Command This command is very similar toDEL: it removes the specified key.longSimilar toSORTbut can be used with multiple keys.waitAOF(byte[] sampleKey, long numLocal, long numReplicas, long timeout) longwaitReplicas(byte[] sampleKey, int replicas, long timeout) longwaitReplicas(String sampleKey, int replicas, long timeout) longxack(byte[] key, byte[] group, byte[]... ids) longxack(String key, String group, StreamEntryID... ids) XACK key group ID [ID ...]byte[]xadd(byte[] key, XAddParams params, Map<byte[], byte[]> hash) XADD key ID field string [field string ...]xautoclaim(byte[] key, byte[] groupName, byte[] consumerName, long minIdleTime, byte[] start, XAutoClaimParams params) xautoclaim(String key, String group, String consumerName, long minIdleTime, StreamEntryID start, XAutoClaimParams params) XAUTOCLAIM key group consumer min-idle-time start [COUNT count]xautoclaimJustId(byte[] key, byte[] groupName, byte[] consumerName, long minIdleTime, byte[] start, XAutoClaimParams params) xautoclaimJustId(String key, String group, String consumerName, long minIdleTime, StreamEntryID start, XAutoClaimParams params) XAUTOCLAIM key group consumer min-idle-time start [COUNT count] JUSTIDList<byte[]> xclaim(byte[] key, byte[] group, byte[] consumerName, long minIdleTime, XClaimParams params, byte[]... ids) xclaim(String key, String group, String consumerName, long minIdleTime, XClaimParams params, StreamEntryID... ids) XCLAIM key group consumer min-idle-time <ID-1> ... <ID-N> [IDLE <milliseconds>] [TIME <mstime>] [RETRYCOUNT <count>] [FORCE]List<byte[]> xclaimJustId(byte[] key, byte[] group, byte[] consumerName, long minIdleTime, XClaimParams params, byte[]... ids) xclaimJustId(String key, String group, String consumerName, long minIdleTime, XClaimParams params, StreamEntryID... ids) XCLAIM key group consumer min-idle-time <ID-1> ... <ID-N> [IDLE <milliseconds>] [TIME <mstime>] [RETRYCOUNT <count>] [FORCE] JUSTIDlongxdel(byte[] key, byte[]... ids) longxdel(String key, StreamEntryID... ids) XDEL key ID [ID ...]xgroupCreate(byte[] key, byte[] groupName, byte[] id, boolean makeStream) xgroupCreate(String key, String groupName, StreamEntryID id, boolean makeStream) XGROUP CREATE key groupName <id or $>booleanxgroupCreateConsumer(byte[] key, byte[] groupName, byte[] consumerName) booleanxgroupCreateConsumer(String key, String groupName, String consumerName) XGROUP CREATECONSUMER key groupName consumerNamelongxgroupDelConsumer(byte[] key, byte[] groupName, byte[] consumerName) longxgroupDelConsumer(String key, String groupName, String consumerName) XGROUP DELCONSUMER key groupName consumerNamelongxgroupDestroy(byte[] key, byte[] groupName) longxgroupDestroy(String key, String groupName) XGROUP DESTROY key groupNamexgroupSetID(byte[] key, byte[] groupName, byte[] id) xgroupSetID(String key, String groupName, StreamEntryID id) XGROUP SETID key groupName <id or $>xinfoConsumers(byte[] key, byte[] group) xinfoConsumers(String key, String group) Introspection command used in order to retrieve different information about consumers in the groupxinfoGroup(byte[] key) Deprecated.xinfoGroup(String key) Deprecated.xinfoGroups(byte[] key) xinfoGroups(String key) Introspection command used in order to retrieve different information about groups in the streamxinfoStream(byte[] key) xinfoStream(String key) Introspection command used in order to retrieve different information about the streamxinfoStreamFull(byte[] key) Introspection command used in order to retrieve all information about the streamxinfoStreamFull(byte[] key, int count) Introspection command used in order to retrieve all information about the streamxinfoStreamFull(String key) Introspection command used in order to retrieve all information about the streamxinfoStreamFull(String key, int count) Introspection command used in order to retrieve all information about the streamlongxlen(byte[] key) longXLEN keyxpending(byte[] key, byte[] groupName) xpending(byte[] key, byte[] groupName, byte[] start, byte[] end, int count, byte[] consumerName) xpending(byte[] key, byte[] groupName, XPendingParams params) XPENDING key groupxpending(String key, String groupName, XPendingParams params) XPENDING key group [[IDLE min-idle-time] start end count [consumer]]xpending(String key, String groupName, StreamEntryID start, StreamEntryID end, int count, String consumerName) XPENDING key group [start end count] [consumer]xrange(byte[] key, byte[] start, byte[] end) xrange(byte[] key, byte[] start, byte[] end, int count) xrange(String key, StreamEntryID start, StreamEntryID end) XRANGE key start endxrange(String key, StreamEntryID start, StreamEntryID end, int count) XRANGE key start end COUNT countxread(XReadParams xReadParams, Map.Entry<byte[], byte[]>... streams) xread(XReadParams xReadParams, Map<String, StreamEntryID> streams) XREAD [COUNT count] [BLOCK milliseconds] STREAMS key [key ...] ID [ID ...]xreadGroup(byte[] groupName, byte[] consumer, XReadGroupParams xReadGroupParams, Map.Entry<byte[], byte[]>... streams) xreadGroup(String groupName, String consumer, XReadGroupParams xReadGroupParams, Map<String, StreamEntryID> streams) XREAD [COUNT count] [BLOCK milliseconds] STREAMS key [key ...] ID [ID ...]xrevrange(byte[] key, byte[] end, byte[] start) xrevrange(byte[] key, byte[] end, byte[] start, int count) xrevrange(String key, StreamEntryID end, StreamEntryID start) XREVRANGE key end startxrevrange(String key, StreamEntryID end, StreamEntryID start, int count) XREVRANGE key end start COUNT countlongxtrim(byte[] key, long maxLen, boolean approximateLength) longxtrim(byte[] key, XTrimParams params) longXTRIM key MAXLEN [~] countlongxtrim(String key, XTrimParams params) XTRIM key MAXLEN|MINID [=|~] threshold [LIMIT count]longzadd(byte[] key, double score, byte[] member) longzadd(byte[] key, double score, byte[] member, ZAddParams params) longlongzadd(byte[] key, Map<byte[], Double> scoreMembers, ZAddParams params) longAdd the specified member having the specified score to the sorted set stored at key.longzadd(String key, double score, String member, ZAddParams params) Similar toZADDbut can be used with optional params.longSimilar toZADDbut for multiple members.longSimilar toZADDbut can be used with optional params, and fits for multiple members.zaddIncr(byte[] key, double score, byte[] member, ZAddParams params) zaddIncr(String key, double score, String member, ZAddParams params) Increments the score of member in the sorted set stored at key by increment.longzcard(byte[] key) longReturn the sorted set cardinality (number of elements).longzcount(byte[] key, byte[] min, byte[] max) longzcount(byte[] key, double min, double max) longReturn the number of elements in the sorted set at key with a score between min and max.longSimilar toZCOUNTbut with exclusive range.Set<byte[]> zdiff(byte[]... keys) Compute the difference between all the sets in the given keys.longzdiffStore(byte[] dstkey, byte[]... keys) longzdiffStore(String dstkey, String... keys) Compute the difference between all the sets in the given keys.zdiffWithScores(byte[]... keys) zdiffWithScores(String... keys) Compute the difference between all the sets in the given keys.doublezincrby(byte[] key, double increment, byte[] member) zincrby(byte[] key, double increment, byte[] member, ZIncrByParams params) doubleIf member already exists in the sorted set adds the increment to its score and updates the position of the element in the sorted set accordingly.zincrby(String key, double increment, String member, ZIncrByParams params) Similar toZINCRBYbut can be used with optionals params.Set<byte[]> Compute the intersection between all the sets in the given keys.longzintercard(byte[]... keys) Similar toZINTER, but instead of returning the result set, it returns just the cardinality of the result.longzintercard(long limit, byte[]... keys) Similar toZINTER, but instead of returning the result set, it returns just the cardinality of the result.longzintercard(long limit, String... keys) Similar toZINTER, but instead of returning the result set, it returns just the cardinality of the result.longzintercard(String... keys) Similar toZINTER, but instead of returning the result set, it returns just the cardinality of the result.longzinterstore(byte[] dstkey, byte[]... sets) longzinterstore(byte[] dstkey, ZParams params, byte[]... sets) longzinterstore(String dstkey, String... sets) Compute the intersection between all the sets in the given keys.longzinterstore(String dstkey, ZParams params, String... sets) Compute the intersection between all the sets in the given keys.zinterWithScores(ZParams params, byte[]... keys) zinterWithScores(ZParams params, String... keys) Compute the intersection between all the sets in the given keys.longzlexcount(byte[] key, byte[] min, byte[] max) longReturn the number of elements in the sorted set at key with a value between min and max, when all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering.zmpop(SortedSetOption option, byte[]... keys) zmpop(SortedSetOption option, int count, byte[]... keys) zmpop(SortedSetOption option, int count, String... keys) zmpop(SortedSetOption option, String... keys) zmscore(byte[] key, byte[]... members) Return the scores associated with the specified members in the sorted set stored at key.zpopmax(byte[] key) zpopmax(byte[] key, int count) Remove and return the member with the highest score in the sorted set stored at key.Remove and return up to count members with the highest scores in the sorted set stored at key.zpopmin(byte[] key) zpopmin(byte[] key, int count) Remove and return the member with the lowest score in the sorted set stored at key.Remove and return up to count members with the lowest scores in the sorted set stored at key.byte[]zrandmember(byte[] key) List<byte[]> zrandmember(byte[] key, long count) zrandmember(String key) Return a random element from the sorted set value stored at key.zrandmember(String key, long count) Return an array of distinct elements.zrandmemberWithScores(byte[] key, long count) zrandmemberWithScores(String key, long count) Similar toZRANDMEMBERbut the replay will include the scores with the result.List<byte[]> zrange(byte[] key, long start, long stop) List<byte[]> zrange(byte[] key, ZRangeParams zRangeParams) Returns the specified range of elements in the sorted set stored at key.zrange(String key, ZRangeParams zRangeParams) Similar toZRANGEbut can be used with additional params.List<byte[]> zrangeByLex(byte[] key, byte[] min, byte[] max) List<byte[]> zrangeByLex(byte[] key, byte[] min, byte[] max, int offset, int count) zrangeByLex(String key, String min, String max) Return all the elements in the sorted set at key with a value between min and max, when all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering.zrangeByLex(String key, String min, String max, int offset, int count) Similar toZRANGEbut with limit option.List<byte[]> zrangeByScore(byte[] key, byte[] min, byte[] max) List<byte[]> zrangeByScore(byte[] key, byte[] min, byte[] max, int offset, int count) List<byte[]> zrangeByScore(byte[] key, double min, double max) List<byte[]> zrangeByScore(byte[] key, double min, double max, int offset, int count) zrangeByScore(String key, double min, double max) Return all the elements in the sorted set at key with a score between min and max (including elements with score equal to min or max).zrangeByScore(String key, double min, double max, int offset, int count) Similar toZRANGEbut with exclusive range.zrangeByScore(String key, String min, String max) Similar toZRANGEbut with exclusive range.zrangeByScore(String key, String min, String max, int offset, int count) Similar toZRANGEbut with limit option,zrangeByScoreWithScores(byte[] key, byte[] min, byte[] max) zrangeByScoreWithScores(byte[] key, byte[] min, byte[] max, int offset, int count) zrangeByScoreWithScores(byte[] key, double min, double max) zrangeByScoreWithScores(byte[] key, double min, double max, int offset, int count) zrangeByScoreWithScores(String key, double min, double max) Similar toZRANGEbut return with scores.zrangeByScoreWithScores(String key, double min, double max, int offset, int count) Similar toZRANGEbut with limit option, and return with scores.zrangeByScoreWithScores(String key, String min, String max) Similar toZRANGEbut with exclusive range, and return with scores.zrangeByScoreWithScores(String key, String min, String max, int offset, int count) Similar toZRANGEbut with exclusive range, with limit options and return with scores.longzrangestore(byte[] dest, byte[] src, ZRangeParams zRangeParams) longzrangestore(String dest, String src, ZRangeParams zRangeParams) Similar toZRANGEbut stores the result indest.zrangeWithScores(byte[] key, long start, long stop) zrangeWithScores(byte[] key, ZRangeParams zRangeParams) zrangeWithScores(String key, long start, long stop) Returns the specified range of elements in the sorted set stored at key with the scores.zrangeWithScores(String key, ZRangeParams zRangeParams) Similar toZRANGEbut can be used with additional params.zrank(byte[] key, byte[] member) Return the rank (or index) of member in the sorted set at key, with scores being ordered from low to high.zrankWithScore(byte[] key, byte[] member) zrankWithScore(String key, String member) Returns the rank and the score of member in the sorted set stored at key, with the scores ordered from low to high.longzrem(byte[] key, byte[]... members) longRemove the specified member from the sorted set value stored at key.longzremrangeByLex(byte[] key, byte[] min, byte[] max) longzremrangeByLex(String key, String min, String max) Remove all elements in the sorted set stored at key between the lexicographical range specified by min and max, when all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering.longzremrangeByRank(byte[] key, long start, long stop) longzremrangeByRank(String key, long start, long stop) Remove all elements in the sorted set at key with rank between start and end.longzremrangeByScore(byte[] key, byte[] min, byte[] max) longzremrangeByScore(byte[] key, double min, double max) longzremrangeByScore(String key, double min, double max) Remove all the elements in the sorted set at key with a score between min and max (including elements with score equal to min or max).longzremrangeByScore(String key, String min, String max) Similar toZREMRANGEbut with limit option.List<byte[]> zrevrange(byte[] key, long start, long stop) Returns the specified range of elements in the sorted set stored at key.List<byte[]> zrevrangeByLex(byte[] key, byte[] max, byte[] min) List<byte[]> zrevrangeByLex(byte[] key, byte[] max, byte[] min, int offset, int count) zrevrangeByLex(String key, String max, String min) Return all the elements in the sorted set at key with a value between max and min, when all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering.zrevrangeByLex(String key, String max, String min, int offset, int count) Similar toZRANGEbut with limit option.List<byte[]> zrevrangeByScore(byte[] key, byte[] max, byte[] min) List<byte[]> zrevrangeByScore(byte[] key, byte[] max, byte[] min, int offset, int count) List<byte[]> zrevrangeByScore(byte[] key, double max, double min) List<byte[]> zrevrangeByScore(byte[] key, double max, double min, int offset, int count) zrevrangeByScore(String key, double max, double min) Return all the elements in the sorted set at key with a score between max and min (including elements with score equal to max or min).zrevrangeByScore(String key, double max, double min, int offset, int count) Similar toZRANGEbut with limit option,zrevrangeByScore(String key, String max, String min) Similar toZREVRANGEbut with exclusive range.zrevrangeByScore(String key, String max, String min, int offset, int count) Similar toZREVRANGEbut with limit option,zrevrangeByScoreWithScores(byte[] key, byte[] max, byte[] min) zrevrangeByScoreWithScores(byte[] key, byte[] max, byte[] min, int offset, int count) zrevrangeByScoreWithScores(byte[] key, double max, double min) zrevrangeByScoreWithScores(byte[] key, double max, double min, int offset, int count) zrevrangeByScoreWithScores(String key, double max, double min) Similar toZREVRANGEbut return with scores.zrevrangeByScoreWithScores(String key, double max, double min, int offset, int count) Similar toZREVRANGEbut with limit options and return with scores.zrevrangeByScoreWithScores(String key, String max, String min) Similar toZREVRANGEbut with exclusive range, and return with scores.zrevrangeByScoreWithScores(String key, String max, String min, int offset, int count) Similar toZREVRANGEbut with exclusive range, with limit options and return with scores.zrevrangeWithScores(byte[] key, long start, long stop) zrevrangeWithScores(String key, long start, long stop) Similar toZREVRANGEbut the reply will include the scores of the returned elements.zrevrank(byte[] key, byte[] member) Return the rank (or index) of member in the sorted set at key, with scores being ordered from high to low.zrevrankWithScore(byte[] key, byte[] member) zrevrankWithScore(String key, String member) Returns the rank and the score of member in the sorted set stored at key, with the scores ordered from high to low.zscan(byte[] key, byte[] cursor, ScanParams params) zscan(String key, String cursor, ScanParams params) zscore(byte[] key, byte[] member) Return the score of the specified element of the sorted set at key.Set<byte[]> Compute the union between all the sets in the given keys.longzunionstore(byte[] dstkey, byte[]... sets) longzunionstore(byte[] dstkey, ZParams params, byte[]... sets) longzunionstore(String dstkey, String... sets) Compute the union between all the sets in the given keys.longzunionstore(String dstkey, ZParams params, String... sets) Compute the union between all the sets in the given keys.zunionWithScores(ZParams params, byte[]... keys) zunionWithScores(ZParams params, String... keys) Compute the union between all the sets in the given keys.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface redis.clients.jedis.bloom.commands.CountMinSketchCommands
cmsIncrByMethods inherited from interface redis.clients.jedis.commands.HashBinaryCommands
hscanMethods inherited from interface redis.clients.jedis.commands.HashCommands
hscanMethods inherited from interface redis.clients.jedis.search.RediSearchCommands
ftAlter, ftAlter, ftCreate, ftCreate, ftCreate, ftSearchMethods inherited from interface redis.clients.jedis.json.RedisJsonCommands
jsonMGet, jsonMGet, jsonSet, jsonSet, jsonSetLegacy, jsonSetLegacy, jsonSetWithEscape, jsonSetWithEscapeMethods inherited from interface redis.clients.jedis.commands.SetBinaryCommands
sscanMethods inherited from interface redis.clients.jedis.commands.SetCommands
sscanMethods inherited from interface redis.clients.jedis.commands.SortedSetBinaryCommands
zscanMethods inherited from interface redis.clients.jedis.commands.SortedSetCommands
zscanMethods inherited from interface redis.clients.jedis.commands.StreamBinaryCommands
xaddMethods inherited from interface redis.clients.jedis.commands.StreamCommands
xaddMethods inherited from interface redis.clients.jedis.bloom.commands.TopKFilterCommands
topkIncrBy
-
Field Details
-
provider
-
executor
-
commandObjects
-
graphCommandObjects
-
broadcastAndRoundRobinConfig
-
-
Constructor Details
-
UnifiedJedis
public UnifiedJedis() -
UnifiedJedis
-
UnifiedJedis
-
UnifiedJedis
-
UnifiedJedis
-
UnifiedJedis
-
UnifiedJedis
-
UnifiedJedis
The constructor to directly use a customJedisSocketFactory.WARNING: Using this constructor means a
NullPointerExceptionwill be occurred ifprovideris accessed. -
UnifiedJedis
The constructor to directly use aConnection.WARNING: Using this constructor means a
NullPointerExceptionwill be occurred ifprovideris accessed. -
UnifiedJedis
public UnifiedJedis(Set<HostAndPort> jedisClusterNodes, JedisClientConfig clientConfig, int maxAttempts) -
UnifiedJedis
public UnifiedJedis(Set<HostAndPort> jedisClusterNodes, JedisClientConfig clientConfig, int maxAttempts, Duration maxTotalRetriesDuration) -
UnifiedJedis
public UnifiedJedis(Set<HostAndPort> jedisClusterNodes, JedisClientConfig clientConfig, org.apache.commons.pool2.impl.GenericObjectPoolConfig<Connection> poolConfig, int maxAttempts, Duration maxTotalRetriesDuration) -
UnifiedJedis
public UnifiedJedis(ClusterConnectionProvider provider, int maxAttempts, Duration maxTotalRetriesDuration) -
UnifiedJedis
-
UnifiedJedis
-
UnifiedJedis
-
UnifiedJedis
The constructor to use a customCommandExecutor.WARNING: Using this constructor means a
NullPointerExceptionwill be occurred ifprovideris accessed.
-
-
Method Details
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
executeCommand
-
broadcastCommand
-
checkAndBroadcastCommand
-
setBroadcastAndRoundRobinConfig
-
ping
-
flushDB
-
flushAll
-
configSet
-
exists
Description copied from interface:KeyCommandsExists Command Test if the specified key exist.Time complexity: O(1)
- Specified by:
existsin interfaceKeyCommands- Parameters:
key-- Returns:
trueif the key exists,falseotherwise
-
exists
Description copied from interface:KeyCommandsExists Command Test if the specified keys exist.Time complexity: O(N)
- Specified by:
existsin interfaceKeyCommands- Parameters:
keys-- Returns:
- The number of keys that exist from those specified as
keys.
-
persist
Description copied from interface:KeyCommands- Specified by:
persistin interfaceKeyCommands- Parameters:
key-- Returns:
- 1 if the key is now persist. 0 otherwise (only happens when key not set)
-
type
Description copied from interface:KeyCommandsType Command Return the type of the value stored at key in form of a string. The type can be one of "none", "string", "list", "set". "none" is returned if the key does not exist.Time complexity: O(1)
- Specified by:
typein interfaceKeyCommands- Parameters:
key-- Returns:
- "none" if the key does not exist, "string" if the key contains a String value, "list" if the key contains a List value, "set" if the key contains a Set value, "zset" if the key contains a Sorted Set value, "hash" if the key contains a Hash value
-
exists
public boolean exists(byte[] key) - Specified by:
existsin interfaceKeyBinaryCommands
-
exists
public long exists(byte[]... keys) - Specified by:
existsin interfaceKeyBinaryCommands
-
persist
public long persist(byte[] key) - Specified by:
persistin interfaceKeyBinaryCommands
-
type
- Specified by:
typein interfaceKeyBinaryCommands
-
dump
Description copied from interface:KeyCommandsDump Command Serialize the value stored at key in a Redis-specific format and return it to the user.Time complexity: O(1) to access the key and additional O(N*M) to serialize it where N is the number of Redis objects composing the value and M their average size.
- Specified by:
dumpin interfaceKeyCommands- Parameters:
key-- Returns:
- The serialized value
-
restore
Description copied from interface:KeyCommandsRestore Command Create a key associated with a value that is obtained by deserializing the provided serialized value (obtained viaDUMP).Time complexity: O(1) to access the key and additional O(N*M) to serialize it where N is the number of Redis objects composing the value and M their average size.
- Specified by:
restorein interfaceKeyCommands- Parameters:
key-ttl- If ttl is 0 the key is created without any expire, otherwise the specified expire time (in milliseconds) is set.serializedValue-- Returns:
- OK
-
restore
Description copied from interface:KeyCommandsRestore Command Create a key associated with a value that is obtained by deserializing the provided serialized value (obtained viaDUMP).Time complexity: O(1) to access the key and additional O(N*M) to serialize it where N is the number of Redis objects composing the value and M their average size.
- Specified by:
restorein interfaceKeyCommands- Parameters:
key-ttl- If ttl is 0 the key is created without any expire, otherwise the specified expire time (in milliseconds) is set.serializedValue-params-RestoreParams- Returns:
- OK
-
dump
public byte[] dump(byte[] key) - Specified by:
dumpin interfaceKeyBinaryCommands
-
restore
- Specified by:
restorein interfaceKeyBinaryCommands
-
restore
- Specified by:
restorein interfaceKeyBinaryCommands
-
expire
Description copied from interface:KeyCommandsExpire Command Set a timeout on the specified key. After the timeout the key will be automatically deleted by the server. A key with an associated timeout is said to be volatile in Redis terminology.Volatile keys are stored on disk like the other keys, the timeout is persistent too like all the other aspects of the dataset. Saving a dataset containing expires and stopping the server does not stop the flow of time as Redis stores on disk the time when the key will no longer be available as Unix time, and not the remaining seconds.
Since Redis 2.1.3 you can update the value of the timeout of a key already having an expire set. It is also possible to undo the expire at all turning the key into a normal key using the
PERSISTcommand.Time complexity: O(1)
- Specified by:
expirein interfaceKeyCommands- Parameters:
key-seconds- time to expire- Returns:
- 1 if the timeout was set, 0 otherwise. Since the key already has an associated timeout (this may happen only in Redis versions < 2.1.3, Redis >= 2.1.3 will happily update the timeout), or the key does not exist.
-
expire
Description copied from interface:KeyCommandsSimilar toEXPIREbut with optional expiry setting.- Specified by:
expirein interfaceKeyCommands- Parameters:
key-seconds- time to expireexpiryOption- can be NX, XX, GT or LT- Returns:
- 1 if the timeout was set, 0 otherwise. Since the key already has an associated timeout (this may happen only in Redis versions < 2.1.3, Redis >= 2.1.3 will happily update the timeout), or the key does not exist.
- See Also:
-
pexpire
Description copied from interface:KeyCommandsPExpire Command This command works exactly likeEXPIREbut the time to live of the key is specified in milliseconds instead of seconds.Time complexity: O(1)
- Specified by:
pexpirein interfaceKeyCommands- Parameters:
key-milliseconds- time to expire- Returns:
- 1 if the timeout was set, 0 otherwise. e.g. key doesn't exist, or operation skipped due to the provided arguments.
-
pexpire
Description copied from interface:KeyCommandsSimilar toEXPIREbut with optional expiry setting.- Specified by:
pexpirein interfaceKeyCommands- Parameters:
key-milliseconds- time to expireexpiryOption- can be NX, XX, GT or LT- Returns:
- 1 if the timeout was set, 0 otherwise. e.g. key doesn't exist, or operation skipped due to the provided arguments.
- See Also:
-
expireTime
Description copied from interface:KeyCommandsExpireTime Command Returns the absolute Unix timestamp (since January 1, 1970) in seconds at which the given key will expire.The command returns -1 if the key exists but has no associated expiration time, and -2 if the key does not exist.
Time complexity: O(1)
- Specified by:
expireTimein interfaceKeyCommands- Parameters:
key-- Returns:
- Expiration Unix timestamp in seconds, or a negative value in order to signal an error: -1 if the key exists but has no associated expiration time, and -2 if the key does not exist.
-
pexpireTime
Description copied from interface:KeyCommandsPExpireTime Command Similar toEXPIRETIMEbut returns the absolute Unix expiration timestamp in milliseconds instead of seconds.Time complexity: O(1)
- Specified by:
pexpireTimein interfaceKeyCommands- Parameters:
key-- Returns:
- Expiration Unix timestamp in milliseconds, or a negative value in order to signal an error: -1 if the key exists but has no associated expiration time, and -2 if the key does not exist.
- See Also:
-
expireAt
Description copied from interface:KeyCommandsExpireAt Command EXPIREAT works exactly likeEXPIREbut instead to get the number of seconds representing the Time To Live of the key as a second argument (that is a relative way of specifying the TTL), it takes an absolute one in the form of a UNIX timestamp (Number of seconds elapsed since 1 Gen 1970).EXPIREAT was introduced in order to implement the Append Only File persistence mode so that EXPIRE commands are automatically translated into EXPIREAT commands for the append only file. Of course EXPIREAT can also used by programmers that need a way to simply specify that a given key should expire at a given time in the future.
Time complexity: O(1)
- Specified by:
expireAtin interfaceKeyCommands- Parameters:
key-unixTime- time to expire- Returns:
- 1 if the timeout was set, 0 otherwise. e.g. key doesn't exist, or operation skipped due to the provided arguments.
-
expireAt
Description copied from interface:KeyCommands- Specified by:
expireAtin interfaceKeyCommands- Parameters:
key-unixTime- time to expireexpiryOption- can be NX, XX, GT or LT- Returns:
- 1 if the timeout was set, 0 otherwise. e.g. key doesn't exist, or operation skipped due to the provided arguments.
- See Also:
-
pexpireAt
Description copied from interface:KeyCommandsPExpireAt Command This command works exactly likeEXPIREATbut Unix time at which the key will expire is specified in milliseconds instead of seconds.Time complexity: O(1)
- Specified by:
pexpireAtin interfaceKeyCommands- Parameters:
key-millisecondsTimestamp- time to expire- Returns:
- 1 if the timeout was set, 0 otherwise. e.g. key doesn't exist, or operation skipped due to the provided arguments.
-
pexpireAt
Description copied from interface:KeyCommands- Specified by:
pexpireAtin interfaceKeyCommands- Parameters:
key-millisecondsTimestamp- time to expireexpiryOption- can be NX, XX, GT or LT- Returns:
- 1 if the timeout was set, 0 otherwise. e.g. key doesn't exist, or operation skipped due to the provided arguments.
- See Also:
-
expire
public long expire(byte[] key, long seconds) - Specified by:
expirein interfaceKeyBinaryCommands
-
expire
- Specified by:
expirein interfaceKeyBinaryCommands
-
pexpire
public long pexpire(byte[] key, long milliseconds) - Specified by:
pexpirein interfaceKeyBinaryCommands
-
pexpire
- Specified by:
pexpirein interfaceKeyBinaryCommands
-
expireTime
public long expireTime(byte[] key) - Specified by:
expireTimein interfaceKeyBinaryCommands
-
pexpireTime
public long pexpireTime(byte[] key) - Specified by:
pexpireTimein interfaceKeyBinaryCommands
-
expireAt
public long expireAt(byte[] key, long unixTime) - Specified by:
expireAtin interfaceKeyBinaryCommands
-
expireAt
- Specified by:
expireAtin interfaceKeyBinaryCommands
-
pexpireAt
public long pexpireAt(byte[] key, long millisecondsTimestamp) - Specified by:
pexpireAtin interfaceKeyBinaryCommands
-
pexpireAt
- Specified by:
pexpireAtin interfaceKeyBinaryCommands
-
ttl
Description copied from interface:KeyCommandsTTL Command The TTL command returns the remaining time to live in seconds of a key that has anEXPIREset. This introspection capability allows a Redis connection to check how many seconds a given key will continue to be part of the dataset.Time complexity: O(1)
- Specified by:
ttlin interfaceKeyCommands- Parameters:
key-- Returns:
- TTL in seconds, or a negative value in order to signal an error
-
pttl
Description copied from interface:KeyCommandsPTTL Command The PTTL command returns the remaining time to live in milliseconds of a key that has anEXPIREset.Time complexity: O(1)
- Specified by:
pttlin interfaceKeyCommands- Parameters:
key-- Returns:
- TTL in milliseconds, or a negative value in order to signal an error
-
touch
Description copied from interface:KeyCommandsTouch Command Alters the last access time of a key. A key is ignored if it does not exist.Time complexity: O(N) where N is the number of keys that will be touched.
- Specified by:
touchin interfaceKeyCommands- Parameters:
key-- Returns:
- The number of keys that were touched
-
touch
Description copied from interface:KeyCommandsTouch Command Alters the last access time of a key(s). A key is ignored if it does not exist.Time complexity: O(N) where N is the number of keys that will be touched.
- Specified by:
touchin interfaceKeyCommands- Parameters:
keys-- Returns:
- The number of keys that were touched
-
ttl
public long ttl(byte[] key) - Specified by:
ttlin interfaceKeyBinaryCommands
-
pttl
public long pttl(byte[] key) - Specified by:
pttlin interfaceKeyBinaryCommands
-
touch
public long touch(byte[] key) - Specified by:
touchin interfaceKeyBinaryCommands
-
touch
public long touch(byte[]... keys) - Specified by:
touchin interfaceKeyBinaryCommands
-
sort
Description copied from interface:KeyCommandsSort Command Sort a Set or a List.Sort the elements contained in the List, Set, or Sorted Set values at key. By default, sorting is numeric with elements being compared as double precision floating point numbers. This is the simplest form of SORT.
- Specified by:
sortin interfaceKeyCommands- Parameters:
key-- Returns:
- Assuming the Set/List at key contains a list of numbers, the return value will be the list of numbers ordered from the smallest to the biggest number.
- See Also:
-
sort
Description copied from interface:KeyCommandsSort a Set or a List accordingly to the specified parameters.examples:
Given are the following sets and key/values:
x = [1, 2, 3] y = [a, b, c] k1 = z k2 = y k3 = x w1 = 9 w2 = 8 w3 = 7
Sort Order:sort(x) or sort(x, sp.asc()) -> [1, 2, 3] sort(x, sp.desc()) -> [3, 2, 1] sort(y) -> [c, a, b] sort(y, sp.alpha()) -> [a, b, c] sort(y, sp.alpha().desc()) -> [c, a, b]
Limit (e.g. for Pagination):sort(x, sp.limit(0, 2)) -> [1, 2] sort(y, sp.alpha().desc().limit(1, 2)) -> [b, a]
Sorting by external keys:sort(x, sb.by(w*)) -> [3, 2, 1] sort(x, sb.by(w*).desc()) -> [1, 2, 3]
Getting external keys:sort(x, sp.by(w*).get(k*)) -> [x, y, z] sort(x, sp.by(w*).get(#).get(k*)) -> [3, x, 2, y, 1, z]
- Specified by:
sortin interfaceKeyCommands- Parameters:
key-sortingParams-SortingParams- Returns:
- A list of sorted elements
-
sort
Description copied from interface:KeyCommandsSimilar toSORTbut store the result indstkey.- Specified by:
sortin interfaceKeyCommands- Parameters:
key-dstkey-- Returns:
- The number of elements stored at dstkey.
- See Also:
-
sort
Description copied from interface:KeyCommandsSimilar toSORTbut store the result indstkey.- Specified by:
sortin interfaceKeyCommands- Parameters:
key-sortingParams-SortingParamsdstkey-- Returns:
- The number of elements stored at dstkey
- See Also:
-
sortReadonly
Description copied from interface:KeyCommandsRead-only variant of theSORTcommand. It is exactly like the original SORT but refuses the STORE option and can safely be used in read-only replicas.- Specified by:
sortReadonlyin interfaceKeyCommands- Parameters:
key- the key to sortsortingParams-SortingParams- Returns:
- list of sorted elements.
-
sort
- Specified by:
sortin interfaceKeyBinaryCommands
-
sort
- Specified by:
sortin interfaceKeyBinaryCommands
-
sort
public long sort(byte[] key, byte[] dstkey) - Specified by:
sortin interfaceKeyBinaryCommands
-
sortReadonly
- Specified by:
sortReadonlyin interfaceKeyBinaryCommands
-
sort
- Specified by:
sortin interfaceKeyBinaryCommands
-
del
Description copied from interface:KeyCommandsDel Command Remove the specified key. If a given key does not exist, no operation is performed.Time complexity: O(1)
- Specified by:
delin interfaceKeyCommands- Parameters:
key-- Returns:
- 1 if the key was removed, 0 if the key does not exist
-
del
Description copied from interface:KeyCommandsRemove the specified keys. If a given key does not exist, no operation is performed.Time complexity: O(N)
- Specified by:
delin interfaceKeyCommands- Parameters:
keys-- Returns:
- An integer greater than 0 if one or more keys were removed, 0 if none of the specified keys existed
-
unlink
Description copied from interface:KeyCommandsUnlink Command This command is very similar toDEL: it removes the specified key. Just like DEL a key is ignored if it does not exist. However, the command performs the actual memory reclaiming in a different thread, so it is not blocking, while DEL is. This is where the command name comes from: the command just unlinks the keys from the keyspace. The actual removal will happen later asynchronously.Time complexity: O(1) for each key removed regardless of its size. Then the command does O(N) work in a different thread in order to reclaim memory, where N is the number of allocations the deleted objects where composed of.
- Specified by:
unlinkin interfaceKeyCommands- Parameters:
key-- Returns:
- The number of keys that were unlinked
-
unlink
Description copied from interface:KeyCommandsSimilar toSORTbut can be used with multiple keys.- Specified by:
unlinkin interfaceKeyCommands- Parameters:
keys-- Returns:
- The number of keys that were unlinked
- See Also:
-
del
public long del(byte[] key) - Specified by:
delin interfaceKeyBinaryCommands
-
del
public long del(byte[]... keys) - Specified by:
delin interfaceKeyBinaryCommands
-
unlink
public long unlink(byte[] key) - Specified by:
unlinkin interfaceKeyBinaryCommands
-
unlink
public long unlink(byte[]... keys) - Specified by:
unlinkin interfaceKeyBinaryCommands
-
memoryUsage
Description copied from interface:KeyCommandsMemory Usage Command Report the number of bytes that a key and its value require to be stored in RAM.Time complexity: O(1)
- Specified by:
memoryUsagein interfaceKeyCommands- Parameters:
key-- Returns:
- The memory usage in bytes
-
memoryUsage
Description copied from interface:KeyCommandsMemory Usage Command Report the number of bytes that a key and its value require to be stored in RAM.Time complexity: O(1)
- Specified by:
memoryUsagein interfaceKeyCommands- Parameters:
key-samples- the number of sampled nested values. By default, this option is set to 5. To sample the all the nested values, use 0.- Returns:
- The memory usage in bytes
-
memoryUsage
- Specified by:
memoryUsagein interfaceKeyBinaryCommands
-
memoryUsage
- Specified by:
memoryUsagein interfaceKeyBinaryCommands
-
copy
Description copied from interface:KeyCommandsCopy Command Copy the value stored at the source key to the destination key.- Specified by:
copyin interfaceKeyCommands- Parameters:
srcKey- the source key.dstKey- the destination key.replace- removes the destination key before copying the value to it, in order to avoid error.- Returns:
trueif source was copied,falseotherwise
-
rename
Description copied from interface:KeyCommandsRename Command Atomically renames the keyoldkeytonewkey. If the source and destination name are the same an error is returned. Ifnewkeyalready exists it is overwritten.Time complexity: O(1)
- Specified by:
renamein interfaceKeyCommands- Parameters:
oldkey-newkey-- Returns:
- OK
-
renamenx
Description copied from interface:KeyCommandsRenameNX Command Rename oldkey into newkey but fails if the destination key newkey already exists.Time complexity: O(1)
- Specified by:
renamenxin interfaceKeyCommands- Parameters:
oldkey-newkey-- Returns:
- 1 if the key was renamed, 0 if the target key already exist
-
copy
public boolean copy(byte[] srcKey, byte[] dstKey, boolean replace) - Specified by:
copyin interfaceKeyBinaryCommands
-
rename
- Specified by:
renamein interfaceKeyBinaryCommands
-
renamenx
public long renamenx(byte[] oldkey, byte[] newkey) - Specified by:
renamenxin interfaceKeyBinaryCommands
-
dbSize
public long dbSize() -
keys
Description copied from interface:KeyCommandsKeys Command Returns all the keys matching the glob-style pattern as space separated strings. For example if you have in the database the keys "foo" and "foobar" the command "KEYS foo*" will return "foo foobar".Note that while the time complexity for this operation is O(n) the constant times are pretty low. For example Redis running on an entry level laptop can scan a 1 million keys database in 40 milliseconds. Still it's better to consider this one of the slow commands that may ruin the DB performance if not used with care.
In other words this command is intended only for debugging and special operations like creating a script to change the DB schema. Don't use it in your normal code. Use Redis Sets in order to group together a subset of objects.
Glob style patterns examples:
- h?llo will match hello hallo hhllo
- h*llo will match hllo heeeello
- h[ae]llo will match hello and hallo, but not hillo
Use \ to escape special chars if you want to match them verbatim.
Time complexity: O(n) (with n being the number of keys in the DB, and assuming keys and pattern of limited length)
- Specified by:
keysin interfaceKeyCommands- Parameters:
pattern-- Returns:
- List of keys matching the pattern.
-
scan
- Specified by:
scanin interfaceKeyCommands
-
scan
- Specified by:
scanin interfaceKeyCommands
-
scan
- Specified by:
scanin interfaceKeyCommands
-
scanIteration
- Parameters:
batchCount- COUNT for each batch executionmatch- pattern- Returns:
- scan iteration
-
scanIteration
- Parameters:
batchCount- COUNT for each batch executionmatch- patterntype- key type- Returns:
- scan iteration
-
keys
- Specified by:
keysin interfaceKeyBinaryCommands
-
scan
- Specified by:
scanin interfaceKeyBinaryCommands
-
scan
- Specified by:
scanin interfaceKeyBinaryCommands
-
scan
- Specified by:
scanin interfaceKeyBinaryCommands
-
randomKey
Description copied from interface:KeyCommandsRandomKey Command Return a randomly selected key from the currently selected DB.Time complexity: O(1)
- Specified by:
randomKeyin interfaceKeyCommands- Returns:
- The random key, or
nilwhen the database is empty
-
randomBinaryKey
public byte[] randomBinaryKey()- Specified by:
randomBinaryKeyin interfaceKeyBinaryCommands
-
set
Description copied from interface:StringCommandsSet Command Set the string value as value of the key. The string can't be longer than 1073741824 bytes (1 GB).Time complexity: O(1)
- Specified by:
setin interfaceStringCommands- Parameters:
key-value-- Returns:
- OK
-
set
Description copied from interface:StringCommandsSet Command Set the string value as value of the key. Can be used with optional params.Time complexity: O(1)
- Specified by:
setin interfaceStringCommands- Parameters:
key-value-params-SetParams- Returns:
- simple-string-reply
OKifSETwas executed correctly, ornullif theSEToperation was not performed because the user specified the NX or XX option but the condition was not met.
-
get
Description copied from interface:StringCommandsGet Command Get the value of the specified key. If the key does not exist the special value 'nil' is returned. If the value stored at key is not a string an error is returned because GET can only handle string values.Time complexity: O(1)
- Specified by:
getin interfaceStringCommands- Parameters:
key-- Returns:
- The value stored in key
-
setGet
Description copied from interface:StringCommandsWARNING:SetParams.get()MUST NOT be used with this method.- Specified by:
setGetin interfaceStringCommands
-
getDel
Description copied from interface:StringCommandsGetDel Command Get the value of key and delete the key. This command is similar to GET, except for the fact that it also deletes the key on success (if and only if the key's value type is a string).Time complexity: O(1)
- Specified by:
getDelin interfaceStringCommands- Parameters:
key-- Returns:
- The value stored in key
-
getEx
Description copied from interface:StringCommandsGetEx Command Get the value of key and optionally set its expiration. GETEX is similar toGET, but is a write command with additional options: EX seconds -- Set the specified expire time, in seconds. PX milliseconds -- Set the specified expire time, in milliseconds. EXAT timestamp-seconds -- Set the specified Unix time at which the key will expire, in seconds. PXAT timestamp-milliseconds -- Set the specified Unix time at which the key will expire, in milliseconds. PERSIST -- Remove the time to live associated with the key.Time complexity: O(1)
- Specified by:
getExin interfaceStringCommands- Parameters:
key-params-GetExParams- Returns:
- The value stored in key
-
set
- Specified by:
setin interfaceStringBinaryCommands
-
set
- Specified by:
setin interfaceStringBinaryCommands
-
get
public byte[] get(byte[] key) - Specified by:
getin interfaceStringBinaryCommands
-
setGet
Description copied from interface:StringBinaryCommandsWARNING:SetParams.get()MUST NOT be used with this method.- Specified by:
setGetin interfaceStringBinaryCommands
-
getDel
public byte[] getDel(byte[] key) - Specified by:
getDelin interfaceStringBinaryCommands
-
getEx
- Specified by:
getExin interfaceStringBinaryCommands
-
setbit
Description copied from interface:BitCommandsSetBit Command Sets or clears the bit at offset in the string value stored at key.Time complexity: O(1)
- Specified by:
setbitin interfaceBitCommands- Parameters:
key-offset-value-- Returns:
- The original bit value stored at offset
-
getbit
Description copied from interface:BitCommandsGetBit Command Returns the bit value at offset in the string value stored at key.Time complexity: O(1)
- Specified by:
getbitin interfaceBitCommands- Parameters:
key-offset-- Returns:
- The bit value stored at offset
-
setrange
Description copied from interface:StringCommandsSetRange Command GETRANGE overwrite part of the string stored at key, starting at the specified offset, for the entire length of value. If the offset is larger than the current length of the string at key, the string is padded with zero-bytes to make offset fit. Non-existing keys are considered as empty strings, so this command will make sure it holds a string large enough to be able to set value at offset.Time complexity: O(1)
- Specified by:
setrangein interfaceStringCommands- Parameters:
key-offset-value-- Returns:
- The length of the string after it was modified by the command
-
getrange
Description copied from interface:StringCommandsGetRange Command Return the substring of the string value stored at key, determined by the offsets start and end (both are inclusive). Negative offsets can be used in order to provide an offset starting from the end of the string. So -1 means the last character, -2 the penultimate and so forth.Time complexity: O(N) where N is the length of the returned string
- Specified by:
getrangein interfaceStringCommands- Parameters:
key-startOffset-endOffset-- Returns:
- The substring
-
setbit
public boolean setbit(byte[] key, long offset, boolean value) - Specified by:
setbitin interfaceBitBinaryCommands
-
getbit
public boolean getbit(byte[] key, long offset) - Specified by:
getbitin interfaceBitBinaryCommands
-
setrange
public long setrange(byte[] key, long offset, byte[] value) - Specified by:
setrangein interfaceStringBinaryCommands
-
getrange
public byte[] getrange(byte[] key, long startOffset, long endOffset) - Specified by:
getrangein interfaceStringBinaryCommands
-
getSet
Description copied from interface:StringCommandsGetSet Command GETSET is an atomic set this value and return the old value command. Set key to the string value and return the old value stored at key. The string can't be longer than 1073741824 byte (1 GB).Time complexity: O(1)
- Specified by:
getSetin interfaceStringCommands- Parameters:
key-value-- Returns:
- The old value that was stored in key
-
setnx
Description copied from interface:StringCommandsSetNE Command SETNX works exactly likeSETwith the only difference that if the key already exists no operation is performed. SETNX actually means "SET if Not Exists".Time complexity: O(1)
- Specified by:
setnxin interfaceStringCommands- Parameters:
key-value-- Returns:
- 1 if the key was set, 0 otherwise
-
setex
Description copied from interface:StringCommandsSetEx Command The command is exactly equivalent to the following group of commands:SET+EXPIRE. The operation is atomic.Time complexity: O(1)
- Specified by:
setexin interfaceStringCommands- Parameters:
key-seconds-value-- Returns:
- OK
-
psetex
Description copied from interface:StringCommandsPSetEx Command PSETEX works exactly likeSETEXwith the sole difference that the expire time is specified in milliseconds instead of seconds.Time complexity: O(1)
- Specified by:
psetexin interfaceStringCommands- Parameters:
key-milliseconds-value-- Returns:
- OK
-
getSet
public byte[] getSet(byte[] key, byte[] value) - Specified by:
getSetin interfaceStringBinaryCommands
-
setnx
public long setnx(byte[] key, byte[] value) - Specified by:
setnxin interfaceStringBinaryCommands
-
setex
- Specified by:
setexin interfaceStringBinaryCommands
-
psetex
- Specified by:
psetexin interfaceStringBinaryCommands
-
incr
Description copied from interface:StringCommandsIncr Command Increment the number stored at key by one. If the key does not exist or contains a value of a wrong type, set the key to the value of "0" before to perform the increment operation.INCR commands are limited to 64 bit signed integers.
Note: this is actually a string operation, that is, in Redis there are not "integer" types. Simply the string stored at the key is parsed as a base 10 64 bit signed integer, incremented, and then converted back as a string.
Time complexity: O(1)
- Specified by:
incrin interfaceStringCommands- Parameters:
key- the key to increment- Returns:
- The value of the key after the increment
-
incrBy
Description copied from interface:StringCommandsIncrBy Command INCRBY work just likeINCRbut instead to increment by 1 the increment is integer.INCR commands are limited to 64 bit signed integers.
Note: this is actually a string operation, that is, in Redis there are not "integer" types. Simply the string stored at the key is parsed as a base 10 64 bit signed integer, incremented, and then converted back as a string.
Time complexity: O(1)
- Specified by:
incrByin interfaceStringCommands- Parameters:
key- the key to incrementincrement- the value to increment by- Returns:
- The value of the key after the increment
-
incrByFloat
Description copied from interface:StringCommandsIncrByFloat Command INCRBYFLOAT work just likeStringCommands.incrBy(String, long)INCRBY} but increments by floats instead of integers.INCRBYFLOAT commands are limited to double precision floating point values.
Note: this is actually a string operation, that is, in Redis there are not "double" types. Simply the string stored at the key is parsed as a base double precision floating point value, incremented, and then converted back as a string. There is no DECRYBYFLOAT but providing a negative value will work as expected.
Time complexity: O(1)
- Specified by:
incrByFloatin interfaceStringCommands- Parameters:
key- the key to incrementincrement- the value to increment by- Returns:
- The value of the key after the increment
-
decr
Description copied from interface:StringCommandsDecr Command Decrement the number stored at key by one. If the key does not exist or contains a value of a wrong type, set the key to the value of "0" before to perform the decrement operation.DECR commands are limited to 64 bit signed integers.
Note: this is actually a string operation, that is, in Redis there are not "integer" types. Simply the string stored at the key is parsed as a base 10 64 bit signed integer, incremented, and then converted back as a string.
Time complexity: O(1)
- Specified by:
decrin interfaceStringCommands- Parameters:
key- the key to decrement- Returns:
- The value of the key after the decrement
-
decrBy
Description copied from interface:StringCommandsDecrBy Command DECRBY work just likeDECRbut instead to decrement by 1 the decrement is integer.DECRBY commands are limited to 64 bit signed integers.
Note: this is actually a string operation, that is, in Redis there are not "integer" types. Simply the string stored at the key is parsed as a base 10 64 bit signed integer, incremented, and then converted back as a string.
Time complexity: O(1)
- Specified by:
decrByin interfaceStringCommands- Parameters:
key- the key to decrementdecrement- the value to decrement by- Returns:
- The value of the key after the decrement
-
incr
public long incr(byte[] key) - Specified by:
incrin interfaceStringBinaryCommands
-
incrBy
public long incrBy(byte[] key, long increment) - Specified by:
incrByin interfaceStringBinaryCommands
-
incrByFloat
public double incrByFloat(byte[] key, double increment) - Specified by:
incrByFloatin interfaceStringBinaryCommands
-
decr
public long decr(byte[] key) - Specified by:
decrin interfaceStringBinaryCommands
-
decrBy
public long decrBy(byte[] key, long decrement) - Specified by:
decrByin interfaceStringBinaryCommands
-
mget
Description copied from interface:StringCommandsMGet Command Get the values of all the specified keys. If one or more keys don't exist or is not of type String, a 'nil' value is returned instead of the value of the specified key, but the operation never fails.Time complexity: O(1) for every key
- Specified by:
mgetin interfaceStringCommands- Parameters:
keys-- Returns:
- Multi bulk reply
-
mset
Description copied from interface:StringCommandsMSet Command Set the the respective keys to the respective values. MSET will replace old values with new values, whileMSETNXwill not perform any operation at all even if just a single key already exists.Because of this semantic MSETNX can be used in order to set different keys representing different fields of an unique logic object in a way that ensures that either all the fields or none at all are set.
Both MSET and MSETNX are atomic operations. This means that for instance if the keys A and B are modified, another connection talking to Redis can either see the changes to both A and B at once, or no modification at all.
- Specified by:
msetin interfaceStringCommands- Parameters:
keysvalues- pairs of keys and their values e.g mset("foo", "foovalue", "bar", "barvalue")- Returns:
- OK
-
msetnx
Description copied from interface:StringCommandsMSetNX Command Set the respective keys to the respective values.MSETwill replace old values with new values, while MSETNX will not perform any operation at all even if just a single key already exists.Because of this semantic MSETNX can be used in order to set different keys representing different fields of an unique logic object in a way that ensures that either all the fields or none at all are set.
Both MSET and MSETNX are atomic operations. This means that for instance if the keys A and B are modified, another connection talking to Redis can either see the changes to both A and B at once, or no modification at all.
- Specified by:
msetnxin interfaceStringCommands- Parameters:
keysvalues- pairs of keys and their values e.g msetnx("foo", "foovalue", "bar", "barvalue")- Returns:
- 1 if the all the keys were set, 0 if no key was set (at least one key already existed)
-
mget
- Specified by:
mgetin interfaceStringBinaryCommands
-
mset
- Specified by:
msetin interfaceStringBinaryCommands
-
msetnx
public long msetnx(byte[]... keysvalues) - Specified by:
msetnxin interfaceStringBinaryCommands
-
append
Description copied from interface:StringCommandsAppend Command If the key already exists and is a string, this command appends the provided value at the end of the string. If the key does not exist it is created and set as an empty string, so APPEND will be very similar to SET in this special case.Time complexity: O(1). The amortized time complexity is O(1) assuming the appended value is small and the already present value is of any size, since the dynamic string library used by Redis will double the free space available on every reallocation.
- Specified by:
appendin interfaceStringCommands- Parameters:
key- the key to append tovalue- the value to append- Returns:
- The total length of the string after the append operation.
-
substr
Description copied from interface:StringCommandsSubStr Command Return a subset of the string from offset start to offset end (both offsets are inclusive). Negative offsets can be used in order to provide an offset starting from the end of the string. So -1 means the last char, -2 the penultimate and so forth.The function handles out of range requests without raising an error, but just limiting the resulting range to the actual length of the string.
Time complexity: O(start+n) (with start being the start index and n the total length of the requested range). Note that the lookup part of this command is O(1) so for small strings this is actually an O(1) command.
- Specified by:
substrin interfaceStringCommands- Parameters:
key-start-end-- Returns:
- The substring
-
strlen
Description copied from interface:StringCommandsStrLen Command Return the length of the string value stored at key.- Specified by:
strlenin interfaceStringCommands- Parameters:
key-- Returns:
- The length of the string at key, or 0 when key does not exist
-
append
public long append(byte[] key, byte[] value) - Specified by:
appendin interfaceStringBinaryCommands
-
substr
public byte[] substr(byte[] key, int start, int end) - Specified by:
substrin interfaceStringBinaryCommands
-
strlen
public long strlen(byte[] key) - Specified by:
strlenin interfaceStringBinaryCommands
-
bitcount
Description copied from interface:BitCommandsBitcount Command Count the number of set bits (population counting) in a string.- Specified by:
bitcountin interfaceBitCommands- Parameters:
key-- Returns:
- The number of bits set to 1
-
bitcount
Description copied from interface:BitCommandsBitcount Command Count the number of set bits (population counting) in a string only in an interval start and end.Like for the GETRANGE command start and end can contain negative values in order to index bytes starting from the end of the string, where -1 is the last byte, -2 is the penultimate, and so forth.
- Specified by:
bitcountin interfaceBitCommands- Parameters:
key-start- byte start indexend- byte end index- Returns:
- The number of bits set to 1
-
bitcount
- Specified by:
bitcountin interfaceBitCommands- Parameters:
key-start- byte start indexend- byte end indexoption- indicate BYTE or BIT- Returns:
- The number of bits set to 1
- See Also:
-
bitpos
Description copied from interface:BitCommandsBitpos Command Return the position of the first bit set to 1 or 0 in a string.- Specified by:
bitposin interfaceBitCommands- Parameters:
key-value- the bit value- Returns:
- The position of the first bit set to 1 or 0 according to the request
-
bitpos
Description copied from interface:BitCommandsBitpos Command Return the position of the first bit set to 1 or 0 in a string.- Specified by:
bitposin interfaceBitCommands- Parameters:
key-value- the bit valueparams-BitPosParams- Returns:
- The position of the first bit set to 1 or 0 according to the request
-
bitcount
public long bitcount(byte[] key) - Specified by:
bitcountin interfaceBitBinaryCommands
-
bitcount
public long bitcount(byte[] key, long start, long end) - Specified by:
bitcountin interfaceBitBinaryCommands
-
bitcount
- Specified by:
bitcountin interfaceBitBinaryCommands
-
bitpos
public long bitpos(byte[] key, boolean value) - Specified by:
bitposin interfaceBitBinaryCommands
-
bitpos
- Specified by:
bitposin interfaceBitBinaryCommands
-
bitfield
Description copied from interface:BitCommandsBitfield Command The command treats a Redis string as an array of bits, and is capable of addressing specific integer fields of varying bit widths and arbitrary non (necessary) aligned offset.- Specified by:
bitfieldin interfaceBitCommands- Parameters:
key-arguments- may be used with optional arguments- Returns:
- A List of results
-
bitfieldReadonly
Description copied from interface:BitCommandsThe readonly version ofBITFIELD- Specified by:
bitfieldReadonlyin interfaceBitCommands
-
bitfield
- Specified by:
bitfieldin interfaceBitBinaryCommands
-
bitfieldReadonly
- Specified by:
bitfieldReadonlyin interfaceBitBinaryCommands
-
bitop
Description copied from interface:BitCommandsBitop Command Perform a bitwise operation between multiple keys (containing string values) and store the result in the destKey.- Specified by:
bitopin interfaceBitCommands- Parameters:
op- can be AND, OR, XOR or NOTdestKey-srcKeys-- Returns:
- The size of the string stored in the destKey
-
bitop
- Specified by:
bitopin interfaceBitBinaryCommands
-
strAlgoLCSKeys
Description copied from interface:StringCommandsCalculate the longest common subsequence of keyA and keyB.- Specified by:
strAlgoLCSKeysin interfaceStringCommands- Parameters:
keyA-keyB-params-- Returns:
- According to StrAlgoLCSParams to decide to return content to fill LCSMatchResult.
-
strAlgoLCSKeys
- Specified by:
strAlgoLCSKeysin interfaceStringBinaryCommands
-
lcs
Description copied from interface:StringCommandsCalculate the longest common subsequence of keyA and keyB.- Specified by:
lcsin interfaceStringCommands- Parameters:
keyA-keyB-params-- Returns:
- According to LCSParams to decide to return content to fill LCSMatchResult.
-
lcs
Description copied from interface:StringBinaryCommandsCalculate the longest common subsequence of keyA and keyB.- Specified by:
lcsin interfaceStringBinaryCommands- Parameters:
keyA-keyB-params-- Returns:
- According to LCSParams to decide to return content to fill LCSMatchResult.
-
rpush
Description copied from interface:ListCommandsAdd the string value to the head (LPUSH) or tail (RPUSH) of the list stored at key. If the key does not exist an empty list is created just before the append operation. If the key exists but is not a List an error is returned.Time complexity: O(1)
- Specified by:
rpushin interfaceListCommands- Parameters:
key-string- data to push- Returns:
- The number of elements inside the list after the push operation
-
lpush
Description copied from interface:ListCommandsAdd the string value to the head (LPUSH) or tail (RPUSH) of the list stored at key. If the key does not exist an empty list is created just before the append operation. If the key exists but is not a List an error is returned.Time complexity: O(1)
- Specified by:
lpushin interfaceListCommands- Parameters:
key-string- data to push- Returns:
- The number of elements inside the list after the push operation
-
llen
Description copied from interface:ListCommandsReturn the length of the list stored at the specified key. If the key does not exist zero is returned (the same behaviour as for empty lists). If the value stored at key is not a list an error is returned.Time complexity: O(1)
- Specified by:
llenin interfaceListCommands- Parameters:
key-- Returns:
- The length of the list
-
lrange
Description copied from interface:ListCommandsReturn the specified elements of the list stored at the specified key. Start and end are zero-based indexes. 0 is the first element of the list (the list head), 1 the next element and so on.For example LRANGE foobar 0 2 will return the first three elements of the list.
start and end can also be negative numbers indicating offsets from the end of the list. For example -1 is the last element of the list, -2 the penultimate element and so on.
Consistency with range functions in various programming languages
Note that if you have a list of numbers from 0 to 100, LRANGE 0 10 will return 11 elements, that is, rightmost item is included. This may or may not be consistent with behavior of range-related functions in your programming language of choice (think Ruby's Range.new, Array#slice or Python's range() function).
LRANGE behavior is consistent with one of Tcl.
Out-of-range indexes
Indexes out of range will not produce an error: if start is over the end of the list, or start > end, an empty list is returned. If end is over the end of the list Redis will threat it just like the last element of the list.
Time complexity: O(start+n) (with n being the length of the range and start being the start offset)
- Specified by:
lrangein interfaceListCommands- Parameters:
key-start-stop-- Returns:
- A list of elements in the specified range
-
ltrim
Description copied from interface:ListCommandsTrim an existing list so that it will contain only the specified range of elements specified. Start and end are zero-based indexes. 0 is the first element of the list (the list head), 1 the next element and so on.For example LTRIM foobar 0 2 will modify the list stored at foobar key so that only the first three elements of the list will remain.
start and end can also be negative numbers indicating offsets from the end of the list. For example -1 is the last element of the list, -2 the penultimate element and so on.
Indexes out of range will not produce an error: if start is over the end of the list, or start > end, an empty list is left as value. If end over the end of the list Redis will threat it just like the last element of the list.
Hint: the obvious use of LTRIM is together with LPUSH/RPUSH. For example:
lpush("mylist", "someelement"); ltrim("mylist", 0, 99); *The above two commands will push elements in the list taking care that the list will not grow without limits. This is very useful when using Redis to store logs for example. It is important to note that when used in this way LTRIM is an O(1) operation because in the average case just one element is removed from the tail of the list.
Time complexity: O(n) (with n being len of list - len of range)
- Specified by:
ltrimin interfaceListCommands- Parameters:
key-start-stop-- Returns:
- OK
-
lindex
Description copied from interface:ListCommandsReturns the element at index in the list stored at key. 0 is the first element, 1 the second and so on. Negative indexes are supported, for example -1 is the last element, -2 the penultimate and so on.If the value stored at key is not of list type an error is returned. If the index is out of range a 'nil' reply is returned.
Note that even if the average time complexity is O(n) asking for the first or the last element of the list is O(1).
Time complexity: O(n) (with n being the length of the list)
- Specified by:
lindexin interfaceListCommands- Parameters:
key-index-- Returns:
- The requested element
-
rpush
public long rpush(byte[] key, byte[]... args) - Specified by:
rpushin interfaceListBinaryCommands
-
lpush
public long lpush(byte[] key, byte[]... args) - Specified by:
lpushin interfaceListBinaryCommands
-
llen
public long llen(byte[] key) - Specified by:
llenin interfaceListBinaryCommands
-
lrange
- Specified by:
lrangein interfaceListBinaryCommands
-
ltrim
- Specified by:
ltrimin interfaceListBinaryCommands
-
lindex
public byte[] lindex(byte[] key, long index) - Specified by:
lindexin interfaceListBinaryCommands
-
lset
Description copied from interface:ListCommandsSet a new value as the element at index position of the List at key.Out of range indexes will generate an error.
Similarly to other list commands accepting indexes, the index can be negative to access elements starting from the end of the list. So -1 is the last element, -2 is the penultimate, and so forth.
Time Complexity O(N) when N being the length of the list. For the first or last elements of the list is O(1)
- Specified by:
lsetin interfaceListCommands- Parameters:
key-index-value-- Returns:
- OK
-
lrem
Description copied from interface:ListCommandsRemove the first count occurrences of the value element from the list. If count is zero all the elements are removed. If count is negative elements are removed from tail to head, instead to go from head to tail that is the normal behaviour. So for example LREM with count -2 and hello as value to remove against the list (a,b,c,hello,x,hello,hello) will leave the list (a,b,c,hello,x). The number of removed elements is returned as an integer, see below for more information about the returned value. Note that non existing keys are considered like empty lists by LREM, so LREM against non existing keys will always return 0.Time complexity: O(N) (with N being the length of the list)
- Specified by:
lremin interfaceListCommands- Parameters:
key-count-value-- Returns:
- The number of removed elements if the operation succeeded
-
lpop
Description copied from interface:ListCommandsAtomically return and remove the first (LPOP) or last (RPOP) element of the list. For example if the list contains the elements "a","b","c" LPOP will return "a" and the list will become "b","c".If the key does not exist or the list is already empty the special value 'nil' is returned.
- Specified by:
lpopin interfaceListCommands- Parameters:
key-- Returns:
- The popped element
-
lpop
Description copied from interface:ListCommandsAtomically return and remove the first (LPOP) or last (RPOP) element of the list. For example if the list contains the elements "a","b","c" LPOP will return "a" and the list will become "b","c".- Specified by:
lpopin interfaceListCommands- Parameters:
key-count-- Returns:
- A list of popped elements, or 'nil' when key does not exist
-
lset
- Specified by:
lsetin interfaceListBinaryCommands
-
lrem
public long lrem(byte[] key, long count, byte[] value) - Specified by:
lremin interfaceListBinaryCommands
-
lpop
public byte[] lpop(byte[] key) - Specified by:
lpopin interfaceListBinaryCommands
-
lpop
- Specified by:
lpopin interfaceListBinaryCommands
-
lpos
Description copied from interface:ListCommandsReturns the index of the first matching element inside a redis list. If the element is found, its index (the zero-based position in the list) is returned. Otherwise, if no match is found, 'nil' is returned.Time complexity: O(N) where N is the number of elements in the list
- Specified by:
lposin interfaceListCommands- Parameters:
key-element-- Returns:
- The index of first matching element in the list. Value will be 'nil' when the element is not present in the list
-
lpos
Description copied from interface:ListCommandsIn case there are multiple matches Rank option specifies the "rank" of the element to return. A rank of 1 returns the first match, 2 to return the second match, and so forth. If list `foo` has elements ("a","b","c","1","2","3","c","c"), The function call to get the index of second occurrence of "c" will be as follows lpos("foo","c", LPosParams.lPosParams().rank(2)).Maxlen option compares the element provided only with a given maximum number of list items. A value of 1000 will make sure that the command performs only 1000 comparisons. The comparison is made for the first part or the last part depending on the fact we use a positive or negative rank. Following is how we could use the Maxlen option lpos("foo", "b", LPosParams.lPosParams().rank(1).maxlen(2)).
- Specified by:
lposin interfaceListCommands- Parameters:
key-element-params-LPosParams- Returns:
- The integer representing the matching element, or 'nil' if there is no match
-
lpos
Description copied from interface:ListCommandsReturns the index of matching elements inside a Redis list. If the element is found, its index (the zero-based position in the list) is returned. Otherwise, if no match is found, nil is returned.Time complexity: O(N) where N is the number of elements in the list
- Specified by:
lposin interfaceListCommands- Parameters:
key-element-params-LPosParamscount-- Returns:
- A list containing position of the matching elements inside the list
-
lpos
- Specified by:
lposin interfaceListBinaryCommands
-
lpos
- Specified by:
lposin interfaceListBinaryCommands
-
lpos
- Specified by:
lposin interfaceListBinaryCommands
-
rpop
Description copied from interface:ListCommandsAtomically return and remove the first (LPOP) or last (RPOP) element of the list. For example if the list contains the elements "a","b","c" LPOP will return "a" and the list will become "b","c".- Specified by:
rpopin interfaceListCommands- Parameters:
key-- Returns:
- The popped element
-
rpop
Description copied from interface:ListCommandsAtomically return and remove the first (LPOP) or last (RPOP) element of the list. For example if the list contains the elements "a","b","c" LPOP will return "a" and the list will become "b","c".- Specified by:
rpopin interfaceListCommands- Parameters:
key-count- return up to count elements- Returns:
- A list of count popped elements, or 'nil' when key does not exist.
-
rpop
public byte[] rpop(byte[] key) - Specified by:
rpopin interfaceListBinaryCommands
-
rpop
- Specified by:
rpopin interfaceListBinaryCommands
-
linsert
Description copied from interface:ListCommandsInserts element in the list stored at key either before or after the reference value pivot.When key does not exist, it is considered an empty list and no operation is performed.
- Specified by:
linsertin interfaceListCommands- Parameters:
key-where- can be BEFORE or AFTERpivot- reference valuevalue- the value- Returns:
- The length of the list after the insert operation, or -1 when the value pivot was not found
-
lpushx
Description copied from interface:ListCommandsInserts specified values at the head of the list stored at key. In contrary toLPUSH, no operation will be performed when key does not yet exist.- Specified by:
lpushxin interfaceListCommands- Parameters:
key-strings- the strings to push- Returns:
- The length of the list after the push operation
-
rpushx
Description copied from interface:ListCommandsInserts specified values at the tail of the list stored at key. In contrary toRPUSH, no operation will be performed when key does not yet exist.- Specified by:
rpushxin interfaceListCommands- Parameters:
key-strings- the strings to push- Returns:
- The length of the list after the push operation
-
linsert
- Specified by:
linsertin interfaceListBinaryCommands
-
lpushx
public long lpushx(byte[] key, byte[]... args) - Specified by:
lpushxin interfaceListBinaryCommands
-
rpushx
public long rpushx(byte[] key, byte[]... args) - Specified by:
rpushxin interfaceListBinaryCommands
-
blpop
- Specified by:
blpopin interfaceListCommands- See Also:
-
blpop
- Specified by:
blpopin interfaceListCommands- See Also:
-
brpop
- Specified by:
brpopin interfaceListCommands- See Also:
-
brpop
- Specified by:
brpopin interfaceListCommands- See Also:
-
blpop
Description copied from interface:ListCommandsThe blocking version ofListCommands.lpop(String)LPOP} because it blocks the connection when there are no elements to pop from any of the given lists. An element is popped from the head of the first list that is non-empty, with the given keys being checked in the order that they are given.- Specified by:
blpopin interfaceListCommands- Parameters:
timeout- the timeout argument is interpreted as a double value specifying the maximum number of seconds to block. A timeout of zero can be used to block indefinitely.keys-
-
blpop
Description copied from interface:ListCommandsThe blocking version ofListCommands.lpop(String)LPOP} because it blocks the connection when there are no elements to pop from any of the given lists. An element is popped from the head of the first list that is non-empty, with the given keys being checked in the order that they are given.- Specified by:
blpopin interfaceListCommands- Parameters:
timeout- the timeout argument is interpreted as a double value specifying the maximum number of seconds to block. A timeout of zero can be used to block indefinitely.keys-
-
brpop
Description copied from interface:ListCommandsThe blocking version ofListCommands.rpop(String)RPOP} because it blocks the connection when there are no elements to pop from any of the given lists. An element is popped from the tail of the first list that is non-empty, with the given keys being checked in the order that they are given.- Specified by:
brpopin interfaceListCommands- Parameters:
timeout- the timeout argument is interpreted as a double value specifying the maximum number of seconds to block. A timeout of zero can be used to block indefinitely.keys-
-
brpop
Description copied from interface:ListCommandsThe blocking version ofListCommands.rpop(String)RPOP} because it blocks the connection when there are no elements to pop from any of the given lists. An element is popped from the tail of the first list that is non-empty, with the given keys being checked in the order that they are given.- Specified by:
brpopin interfaceListCommands- Parameters:
timeout- the timeout argument is interpreted as a double value specifying the maximum number of seconds to block. A timeout of zero can be used to block indefinitely.keys-
-
blpop
- Specified by:
blpopin interfaceListBinaryCommands
-
blpop
- Specified by:
blpopin interfaceListBinaryCommands
-
brpop
- Specified by:
brpopin interfaceListBinaryCommands
-
brpop
- Specified by:
brpopin interfaceListBinaryCommands
-
rpoplpush
Description copied from interface:ListCommandsAtomically return and remove the last (tail) element of the srckey list, and push the element as the first (head) element of the dstkey list. For example if the source list contains the elements "a","b","c" and the destination list contains the elements "foo","bar" after an RPOPLPUSH command the content of the two lists will be "a","b" and "c","foo","bar".If the key does not exist or the list is already empty the special value 'nil' is returned. If the srckey and dstkey are the same the operation is equivalent to removing the last element from the list and pushing it as first element of the list, so it's a "list rotation" command.
Time complexity: O(1)
- Specified by:
rpoplpushin interfaceListCommands- Parameters:
srckey-dstkey-- Returns:
- Bulk reply
-
brpoplpush
Description copied from interface:ListCommandsThe blocking variant ofListCommands.rpoplpush(String, String). When source is empty, Redis will block the connection until another client pushes to it or until timeout is reached. A timeout of zero can be used to block indefinitely.Time complexity: O(1)
- Specified by:
brpoplpushin interfaceListCommands- Parameters:
source-destination-timeout- the timeout argument is interpreted as a double value specifying the maximum number of seconds to block. A timeout of zero can be used to block indefinitely.- Returns:
- The element being popped from source and pushed to destination
-
rpoplpush
public byte[] rpoplpush(byte[] srckey, byte[] dstkey) - Specified by:
rpoplpushin interfaceListBinaryCommands
-
brpoplpush
public byte[] brpoplpush(byte[] source, byte[] destination, int timeout) - Specified by:
brpoplpushin interfaceListBinaryCommands
-
lmove
Description copied from interface:ListCommandsPop an element from a list, push it to another list and return it- Specified by:
lmovein interfaceListCommands- Parameters:
srcKey-dstKey-from- can be LEFT or RIGHTto- can be LEFT or RIGHT- Returns:
- The element being popped and pushed
-
blmove
public String blmove(String srcKey, String dstKey, ListDirection from, ListDirection to, double timeout) Description copied from interface:ListCommandsPop an element from a list, push it to another list and return it; or block until one is available- Specified by:
blmovein interfaceListCommands- Parameters:
srcKey-dstKey-from- can be LEFT or RIGHTto- can be LEFT or RIGHTtimeout- the timeout argument is interpreted as a double value specifying the maximum number of seconds to block. A timeout of zero can be used to block indefinitely.- Returns:
- The element being popped and pushed
-
lmove
- Specified by:
lmovein interfaceListBinaryCommands
-
blmove
public byte[] blmove(byte[] srcKey, byte[] dstKey, ListDirection from, ListDirection to, double timeout) - Specified by:
blmovein interfaceListBinaryCommands
-
lmpop
- Specified by:
lmpopin interfaceListCommands
-
lmpop
- Specified by:
lmpopin interfaceListCommands
-
blmpop
- Specified by:
blmpopin interfaceListCommands
-
blmpop
public KeyValue<String,List<String>> blmpop(long timeout, ListDirection direction, int count, String... keys) - Specified by:
blmpopin interfaceListCommands
-
lmpop
- Specified by:
lmpopin interfaceListBinaryCommands
-
lmpop
- Specified by:
lmpopin interfaceListBinaryCommands
-
blmpop
- Specified by:
blmpopin interfaceListBinaryCommands
-
blmpop
public KeyValue<byte[],List<byte[]>> blmpop(long timeout, ListDirection direction, int count, byte[]... keys) - Specified by:
blmpopin interfaceListBinaryCommands
-
hset
- Specified by:
hsetin interfaceHashCommands
-
hset
- Specified by:
hsetin interfaceHashCommands
-
hget
- Specified by:
hgetin interfaceHashCommands
-
hsetnx
- Specified by:
hsetnxin interfaceHashCommands
-
hmset
- Specified by:
hmsetin interfaceHashCommands
-
hmget
- Specified by:
hmgetin interfaceHashCommands
-
hset
public long hset(byte[] key, byte[] field, byte[] value) - Specified by:
hsetin interfaceHashBinaryCommands
-
hset
- Specified by:
hsetin interfaceHashBinaryCommands
-
hget
public byte[] hget(byte[] key, byte[] field) - Specified by:
hgetin interfaceHashBinaryCommands
-
hsetnx
public long hsetnx(byte[] key, byte[] field, byte[] value) - Specified by:
hsetnxin interfaceHashBinaryCommands
-
hmset
- Specified by:
hmsetin interfaceHashBinaryCommands
-
hmget
- Specified by:
hmgetin interfaceHashBinaryCommands
-
hincrBy
- Specified by:
hincrByin interfaceHashCommands
-
hincrByFloat
- Specified by:
hincrByFloatin interfaceHashCommands
-
hexists
- Specified by:
hexistsin interfaceHashCommands
-
hdel
- Specified by:
hdelin interfaceHashCommands
-
hlen
- Specified by:
hlenin interfaceHashCommands
-
hincrBy
public long hincrBy(byte[] key, byte[] field, long value) - Specified by:
hincrByin interfaceHashBinaryCommands
-
hincrByFloat
public double hincrByFloat(byte[] key, byte[] field, double value) - Specified by:
hincrByFloatin interfaceHashBinaryCommands
-
hexists
public boolean hexists(byte[] key, byte[] field) - Specified by:
hexistsin interfaceHashBinaryCommands
-
hdel
public long hdel(byte[] key, byte[]... field) - Specified by:
hdelin interfaceHashBinaryCommands
-
hlen
public long hlen(byte[] key) - Specified by:
hlenin interfaceHashBinaryCommands
-
hkeys
- Specified by:
hkeysin interfaceHashCommands
-
hvals
- Specified by:
hvalsin interfaceHashCommands
-
hgetAll
- Specified by:
hgetAllin interfaceHashCommands
-
hkeys
- Specified by:
hkeysin interfaceHashBinaryCommands
-
hvals
- Specified by:
hvalsin interfaceHashBinaryCommands
-
hgetAll
- Specified by:
hgetAllin interfaceHashBinaryCommands
-
hrandfield
- Specified by:
hrandfieldin interfaceHashCommands
-
hrandfield
- Specified by:
hrandfieldin interfaceHashCommands
-
hrandfieldWithValues
- Specified by:
hrandfieldWithValuesin interfaceHashCommands
-
hscan
- Specified by:
hscanin interfaceHashCommands
-
hstrlen
- Specified by:
hstrlenin interfaceHashCommands
-
hrandfield
public byte[] hrandfield(byte[] key) - Specified by:
hrandfieldin interfaceHashBinaryCommands
-
hrandfield
- Specified by:
hrandfieldin interfaceHashBinaryCommands
-
hrandfieldWithValues
- Specified by:
hrandfieldWithValuesin interfaceHashBinaryCommands
-
hscan
- Specified by:
hscanin interfaceHashBinaryCommands
-
hstrlen
public long hstrlen(byte[] key, byte[] field) - Specified by:
hstrlenin interfaceHashBinaryCommands
-
sadd
Description copied from interface:SetCommandsAdd the specified member to the set value stored at key. If member is already a member of the set no operation is performed. If key does not exist a new set with the specified member as sole member is created. If the key exists but does not hold a set value an error is returned.Time complexity O(1)
- Specified by:
saddin interfaceSetCommands- Parameters:
key-members-- Returns:
- The number of elements that were added to the set, not including all the elements already present in the set
-
smembers
Description copied from interface:SetCommandsReturn all the members (elements) of the set value stored at key. This is just syntax glue forSINTER.Time complexity O(N)
- Specified by:
smembersin interfaceSetCommands- Parameters:
key-- Returns:
- All elements of the set
-
srem
Description copied from interface:SetCommandsRemove the specified member from the set value stored at key. If member was not a member of the set no operation is performed. If key does not hold a set value an error is returned.Time complexity O(1)
- Specified by:
sremin interfaceSetCommands- Parameters:
key-members-- Returns:
- The number of members that were removed from the set, not including non-existing members
-
spop
Description copied from interface:SetCommandsRemove a random element from a Set returning it as return value. If the Set is empty or the key does not exist, a nil object is returned.The
SetCommands.srandmember(String)command does a similar work but the returned element is not removed from the Set.Time complexity O(1)
- Specified by:
spopin interfaceSetCommands- Parameters:
key-- Returns:
- The removed member, or nil when key does not exist
-
spop
Description copied from interface:SetCommandsBy default, the commandSetCommands.spop(String)pops a single member from the set. In this command, the reply will consist of up to count members, depending on the set's cardinality.The
SetCommands.srandmember(String)command does a similar work but the returned element is not removed from the Set.Time complexity O(N), where N is the value of the passed count
- Specified by:
spopin interfaceSetCommands- Parameters:
key-count-- Returns:
- The removed members
-
scard
Description copied from interface:SetCommandsReturn the set cardinality (number of elements). If the key does not exist 0 is returned, like for empty sets.- Specified by:
scardin interfaceSetCommands- Parameters:
key-- Returns:
- The cardinality (number of elements) of the set
-
sismember
Description copied from interface:SetCommandsReturn true if member is a member of the set stored at key, otherwise false is returned.Time complexity O(1)
- Specified by:
sismemberin interfaceSetCommands- Parameters:
key-member-- Returns:
trueif the element is a member of the set,falseotherwise
-
smismember
Description copied from interface:SetCommandsReturns whether each member is a member of the set stored at key.Time complexity O(N) where N is the number of elements being checked for membership
- Specified by:
smismemberin interfaceSetCommands- Parameters:
key-members-- Returns:
- List representing the membership of the given elements, in the same order as they are requested
-
sadd
public long sadd(byte[] key, byte[]... members) - Specified by:
saddin interfaceSetBinaryCommands
-
smembers
- Specified by:
smembersin interfaceSetBinaryCommands
-
srem
public long srem(byte[] key, byte[]... members) - Specified by:
sremin interfaceSetBinaryCommands
-
spop
public byte[] spop(byte[] key) - Specified by:
spopin interfaceSetBinaryCommands
-
spop
- Specified by:
spopin interfaceSetBinaryCommands
-
scard
public long scard(byte[] key) - Specified by:
scardin interfaceSetBinaryCommands
-
sismember
public boolean sismember(byte[] key, byte[] member) - Specified by:
sismemberin interfaceSetBinaryCommands
-
smismember
- Specified by:
smismemberin interfaceSetBinaryCommands
-
srandmember
Description copied from interface:SetCommandsReturn a random element from a Set, without removing the element. If the Set is empty or the key does not exist, a nil object is returned.The
SPOPcommand does a similar work but the returned element is popped (removed) from the Set.Time complexity O(1)
- Specified by:
srandmemberin interfaceSetCommands- Parameters:
key-- Returns:
- The randomly selected element
-
srandmember
Description copied from interface:SetCommandsReturn a random elements from a Set, without removing the elements. If the Set is empty or the key does not exist, an empty list is returned.The
SPOPcommand does a similar work but the returned element is popped (removed) from the Set.Time complexity O(1)
- Specified by:
srandmemberin interfaceSetCommands- Parameters:
key-count- if positive, return an array of distinct elements. If negative the behavior changes and the command is allowed to return the same element multiple times- Returns:
- A list of randomly selected elements
-
sscan
- Specified by:
sscanin interfaceSetCommands
-
srandmember
public byte[] srandmember(byte[] key) - Specified by:
srandmemberin interfaceSetBinaryCommands
-
srandmember
- Specified by:
srandmemberin interfaceSetBinaryCommands
-
sscan
- Specified by:
sscanin interfaceSetBinaryCommands
-
sdiff
Description copied from interface:SetCommandsReturn the difference between the Sets stored atkeysExample:
key1 = [x, a, b, c] key2 = [c] key3 = [a, d] SDIFF key1,key2,key3 => [x, b]
Non existing keys are considered like empty sets.Time complexity O(N) with N being the total number of elements of all the sets
- Specified by:
sdiffin interfaceSetCommands- Parameters:
keys- group of sets- Returns:
- The members of a set resulting from the difference between the sets
-
sdiffstore
Description copied from interface:SetCommandsThis command works exactly likeSDIFFbut instead of being returned the resulting set is stored in dstkey.- Specified by:
sdiffstorein interfaceSetCommands- Parameters:
dstkey-keys- group of sets- Returns:
- The number of elements in the resulting set
-
sinter
Description copied from interface:SetCommandsReturn the members of a set resulting from the intersection of all the sets hold at the specified keys. Like inLRANGEthe result is sent to the connection as a multi-bulk reply (see the protocol specification for more information). If just a single key is specified, then this command produces the same result asSMEMBERS. Actually SMEMBERS is just syntax sugar for SINTER.Non existing keys are considered like empty sets, so if one of the keys is missing an empty set is returned (since the intersection with an empty set always is an empty set).
Time complexity O(N*M) worst case where N is the cardinality of the smallest set and M the number of sets
- Specified by:
sinterin interfaceSetCommands- Parameters:
keys- group of sets- Returns:
- A set with members of the resulting set
-
sinterstore
Description copied from interface:SetCommandsThis command works exactly likeSINTERbut instead of being returned the resulting set is stored as dstkey.Time complexity O(N*M) worst case where N is the cardinality of the smallest set and M the number of sets
- Specified by:
sinterstorein interfaceSetCommands- Parameters:
dstkey-keys- group of sets- Returns:
- The number of elements in the resulting set
-
sintercard
Description copied from interface:SetCommandsThis command works exactly likeSINTERbut instead of returning the result set, it returns just the cardinality of the result. LIMIT defaults to 0 and means unlimitedTime complexity O(N*M) worst case where N is the cardinality of the smallest
- Specified by:
sintercardin interfaceSetCommands- Parameters:
keys- group of sets- Returns:
- The cardinality of the set which would result from the intersection of all the given sets
-
sintercard
Description copied from interface:SetCommandsThis command works exactly likeSINTERbut instead of returning the result set, it returns just the cardinality of the result.Time complexity O(N*M) worst case where N is the cardinality of the smallest
- Specified by:
sintercardin interfaceSetCommands- Parameters:
limit- If the intersection cardinality reaches limit partway through the computation, the algorithm will exit and yield limit as the cardinality.keys- group of sets- Returns:
- The cardinality of the set which would result from the intersection of all the given sets
-
sunion
Description copied from interface:SetCommandsReturn the members of a set resulting from the union of all the sets hold at the specified keys. Like inLRANGEthe result is sent to the connection as a multi-bulk reply (see the protocol specification for more information). If just a single key is specified, then this command produces the same result asSMEMBERS.Non existing keys are considered like empty sets.
Time complexity O(N) where N is the total number of elements in all the provided sets
- Specified by:
sunionin interfaceSetCommands- Parameters:
keys- group of sets- Returns:
- A set with members of the resulting set
-
sunionstore
Description copied from interface:SetCommandsThis command works exactly likeSUNIONbut instead of being returned the resulting set is stored as dstkey. Any existing value in dstkey will be over-written.Time complexity O(N) where N is the total number of elements in all the provided sets
- Specified by:
sunionstorein interfaceSetCommands- Parameters:
dstkey-keys- group of sets- Returns:
- The number of elements in the resulting set
-
smove
Description copied from interface:SetCommandsMove the specified member from the set at srckey to the set at dstkey. This operation is atomic, in every given moment the element will appear to be in the source or destination set for accessing clients.If the source set does not exist or does not contain the specified element no operation is performed and zero is returned, otherwise the element is removed from the source set and added to the destination set. On success one is returned, even if the element was already present in the destination set.
An error is raised if the source or destination keys contain a non Set value.
Time complexity O(1)
- Specified by:
smovein interfaceSetCommands- Parameters:
srckey-dstkey-member-- Returns:
- 1 if the element was moved, 0 if no operation was performed
-
sdiff
- Specified by:
sdiffin interfaceSetBinaryCommands
-
sdiffstore
public long sdiffstore(byte[] dstkey, byte[]... keys) - Specified by:
sdiffstorein interfaceSetBinaryCommands
-
sinter
- Specified by:
sinterin interfaceSetBinaryCommands
-
sinterstore
public long sinterstore(byte[] dstkey, byte[]... keys) - Specified by:
sinterstorein interfaceSetBinaryCommands
-
sintercard
public long sintercard(byte[]... keys) Description copied from interface:SetBinaryCommandsThis command works exactly likeSINTERbut instead of returning the result set, it returns just the cardinality of the result. LIMIT defaults to 0 and means unlimitedTime complexity O(N*M) worst case where N is the cardinality of the smallest
- Specified by:
sintercardin interfaceSetBinaryCommands- Parameters:
keys-- Returns:
- The cardinality of the set which would result from the intersection of all the given sets
-
sintercard
public long sintercard(int limit, byte[]... keys) Description copied from interface:SetBinaryCommandsThis command works exactly likeSINTERbut instead of returning the result set, it returns just the cardinality of the result.Time complexity O(N*M) worst case where N is the cardinality of the smallest
- Specified by:
sintercardin interfaceSetBinaryCommands- Parameters:
limit- If the intersection cardinality reaches limit partway through the computation, the algorithm will exit and yield limit as the cardinality.keys-- Returns:
- The cardinality of the set which would result from the intersection of all the given sets
-
sunion
- Specified by:
sunionin interfaceSetBinaryCommands
-
sunionstore
public long sunionstore(byte[] dstkey, byte[]... keys) - Specified by:
sunionstorein interfaceSetBinaryCommands
-
smove
public long smove(byte[] srckey, byte[] dstkey, byte[] member) - Specified by:
smovein interfaceSetBinaryCommands
-
zadd
Description copied from interface:SortedSetCommandsAdd the specified member having the specified score to the sorted set stored at key. If member is already a member of the sorted set the score is updated, and the element reinserted in the right position to ensure sorting. If key does not exist a new sorted set with the specified member as sole member is created. If the key exists but does not hold a sorted set value an error is returned.The score value can be the string representation of a double precision floating point number.
Time complexity O(log(N)) with N being the number of elements in the sorted set
- Specified by:
zaddin interfaceSortedSetCommands- Parameters:
key-score-member-- Returns:
- 1 if the new element was added, 0 if the element was already a member of the sorted set and the score was updated
-
zadd
Description copied from interface:SortedSetCommandsSimilar toZADDbut can be used with optional params.- Specified by:
zaddin interfaceSortedSetCommands- Parameters:
key-score-member-params-ZAddParams- Returns:
- 1 if the new element was added, 0 if the element was already a member of the sorted set and the score was updated
- See Also:
-
zadd
Description copied from interface:SortedSetCommandsSimilar toZADDbut for multiple members.- Specified by:
zaddin interfaceSortedSetCommands- Parameters:
key-scoreMembers-- Returns:
- The number of elements added to the sorted set (excluding score updates).
- See Also:
-
zadd
Description copied from interface:SortedSetCommandsSimilar toZADDbut can be used with optional params, and fits for multiple members.- Specified by:
zaddin interfaceSortedSetCommands- Parameters:
key-scoreMembers-params-ZAddParams- Returns:
- The number of elements added to the sorted set (excluding score updates).
- See Also:
-
zaddIncr
Description copied from interface:SortedSetCommandsIncrements the score of member in the sorted set stored at key by increment. If member does not exist in the sorted set, it is added with increment as its score (as if its previous score was 0.0). If key does not exist, a new sorted set with the specified member as its sole member is created.The score value should be the string representation of a numeric value, and accepts double precision floating point numbers. It is possible to provide a negative value to decrement the score.
Time complexity O(log(N)) with N being the number of elements in the sorted set
- Specified by:
zaddIncrin interfaceSortedSetCommands- Parameters:
key-score-member-params-ZAddParams- Returns:
- 1 if the new element was added, 0 if the element was already a member of the sorted set and the score was updated
-
zadd
public long zadd(byte[] key, double score, byte[] member) - Specified by:
zaddin interfaceSortedSetBinaryCommands
-
zadd
- Specified by:
zaddin interfaceSortedSetBinaryCommands
-
zadd
- Specified by:
zaddin interfaceSortedSetBinaryCommands
-
zadd
- Specified by:
zaddin interfaceSortedSetBinaryCommands
-
zaddIncr
- Specified by:
zaddIncrin interfaceSortedSetBinaryCommands
-
zrem
Description copied from interface:SortedSetCommandsRemove the specified member from the sorted set value stored at key. If member was not a member of the set no operation is performed. If key does not hold a set value an error is returned.Time complexity O(log(N)) with N being the number of elements in the sorted set
- Specified by:
zremin interfaceSortedSetCommands- Parameters:
key-members-- Returns:
- 1 if the new element was removed, 0 if the new element was not a member of the set
-
zincrby
Description copied from interface:SortedSetCommandsIf member already exists in the sorted set adds the increment to its score and updates the position of the element in the sorted set accordingly. If member does not already exist in the sorted set it is added with increment as score (that is, like if the previous score was virtually zero). If key does not exist a new sorted set with the specified member as sole member is created. If the key exists but does not hold a sorted set value an error is returned.The score value can be the string representation of a double precision floating point number. It's possible to provide a negative value to perform a decrement.
For an introduction to sorted sets check the Introduction to Redis data types page.
Time complexity O(log(N)) with N being the number of elements in the sorted set
- Specified by:
zincrbyin interfaceSortedSetCommands- Parameters:
key-increment-member-- Returns:
- The new score
-
zincrby
Description copied from interface:SortedSetCommandsSimilar toZINCRBYbut can be used with optionals params.- Specified by:
zincrbyin interfaceSortedSetCommands- Parameters:
key-increment-member-params-ZIncrByParams- Returns:
- The new score for key
- See Also:
-
zrank
Description copied from interface:SortedSetCommandsReturn the rank (or index) of member in the sorted set at key, with scores being ordered from low to high.When the given member does not exist in the sorted set, the special value 'nil' is returned. The returned rank (or index) of the member is 0-based for both commands.
Time complexity O(log(N))
- Specified by:
zrankin interfaceSortedSetCommands- Parameters:
key-member-- Returns:
- The rank of the element as an integer reply if the element exists. A nil bulk reply if there is no such element
-
zrevrank
Description copied from interface:SortedSetCommandsReturn the rank (or index) of member in the sorted set at key, with scores being ordered from high to low.When the given member does not exist in the sorted set, the special value 'nil' is returned. The returned rank (or index) of the member is 0-based for both commands.
Time complexity O(log(N))
- Specified by:
zrevrankin interfaceSortedSetCommands- Parameters:
key-member-- Returns:
- The rank of the element as an integer reply if the element exists. A nil bulk reply if there is no such element
-
zrankWithScore
Description copied from interface:SortedSetCommandsReturns the rank and the score of member in the sorted set stored at key, with the scores ordered from low to high.- Specified by:
zrankWithScorein interfaceSortedSetCommands- Parameters:
key- the keymember- the member- Returns:
- the KeyValue contains rank and score.
-
zrevrankWithScore
Description copied from interface:SortedSetCommandsReturns the rank and the score of member in the sorted set stored at key, with the scores ordered from high to low.- Specified by:
zrevrankWithScorein interfaceSortedSetCommands- Parameters:
key- the keymember- the member- Returns:
- the KeyValue contains rank and score.
-
zrem
public long zrem(byte[] key, byte[]... members) - Specified by:
zremin interfaceSortedSetBinaryCommands
-
zincrby
public double zincrby(byte[] key, double increment, byte[] member) - Specified by:
zincrbyin interfaceSortedSetBinaryCommands
-
zincrby
- Specified by:
zincrbyin interfaceSortedSetBinaryCommands
-
zrank
- Specified by:
zrankin interfaceSortedSetBinaryCommands
-
zrevrank
- Specified by:
zrevrankin interfaceSortedSetBinaryCommands
-
zrankWithScore
- Specified by:
zrankWithScorein interfaceSortedSetBinaryCommands
-
zrevrankWithScore
- Specified by:
zrevrankWithScorein interfaceSortedSetBinaryCommands
-
zrandmember
Description copied from interface:SortedSetCommandsReturn a random element from the sorted set value stored at key.Time complexity O(N) where N is the number of elements returned
- Specified by:
zrandmemberin interfaceSortedSetCommands- Parameters:
key-- Returns:
- Random String from the set
-
zrandmember
Description copied from interface:SortedSetCommandsReturn an array of distinct elements. The array's length is either count or the sorted set's cardinality (ZCARD), whichever is lower.Time complexity O(N) where N is the number of elements returned
- Specified by:
zrandmemberin interfaceSortedSetCommands- Parameters:
key-count- choose up to count elements- Returns:
- A list of distinct Strings from the set
-
zrandmemberWithScores
Description copied from interface:SortedSetCommandsSimilar toZRANDMEMBERbut the replay will include the scores with the result.- Specified by:
zrandmemberWithScoresin interfaceSortedSetCommands- Parameters:
key-count- choose up to count elements- Returns:
- A List of distinct Strings with their scores
- See Also:
-
zcard
Description copied from interface:SortedSetCommandsReturn the sorted set cardinality (number of elements). If the key does not exist 0 is returned, like for empty sorted sets.Time complexity O(1)
- Specified by:
zcardin interfaceSortedSetCommands- Parameters:
key-- Returns:
- The cardinality (number of elements) of the set as an integer
-
zscore
Description copied from interface:SortedSetCommandsReturn the score of the specified element of the sorted set at key. If the specified element does not exist in the sorted set, or the key does not exist at all, a special 'nil' value is returned.Time complexity O(1)
- Specified by:
zscorein interfaceSortedSetCommands- Parameters:
key-member-- Returns:
- The score
-
zmscore
Description copied from interface:SortedSetCommandsReturn the scores associated with the specified members in the sorted set stored at key. For every member that does not exist in the sorted set, a nil value is returned.Time complexity O(N) where N is the number of members being requested
- Specified by:
zmscorein interfaceSortedSetCommands- Parameters:
key-members-- Returns:
- The scores
-
zrandmember
public byte[] zrandmember(byte[] key) - Specified by:
zrandmemberin interfaceSortedSetBinaryCommands
-
zrandmember
- Specified by:
zrandmemberin interfaceSortedSetBinaryCommands
-
zrandmemberWithScores
- Specified by:
zrandmemberWithScoresin interfaceSortedSetBinaryCommands
-
zcard
public long zcard(byte[] key) - Specified by:
zcardin interfaceSortedSetBinaryCommands
-
zscore
- Specified by:
zscorein interfaceSortedSetBinaryCommands
-
zmscore
- Specified by:
zmscorein interfaceSortedSetBinaryCommands
-
zpopmax
Description copied from interface:SortedSetCommandsRemove and return the member with the highest score in the sorted set stored at key.Time complexity O(log(N)) with N being the number of elements in the sorted set
- Specified by:
zpopmaxin interfaceSortedSetCommands- Parameters:
key-- Returns:
- The popped element and the score
-
zpopmax
Description copied from interface:SortedSetCommandsRemove and return up to count members with the highest scores in the sorted set stored at key.Time complexity O(log(N)*M) with N being the number of elements in the sorted set, and M being the number of elements popped.
- Specified by:
zpopmaxin interfaceSortedSetCommands- Parameters:
key-count- the number of elements to pop- Returns:
- A List of popped elements and scores
-
zpopmin
Description copied from interface:SortedSetCommandsRemove and return the member with the lowest score in the sorted set stored at key.Time complexity O(log(N)) with N being the number of elements in the sorted set
- Specified by:
zpopminin interfaceSortedSetCommands- Parameters:
key-- Returns:
- The popped element and the score
-
zpopmin
Description copied from interface:SortedSetCommandsRemove and return up to count members with the lowest scores in the sorted set stored at key.Time complexity O(log(N)*M) with N being the number of elements in the sorted set, and M being the number of elements popped.
- Specified by:
zpopminin interfaceSortedSetCommands- Parameters:
key-count- the number of elements to pop- Returns:
- A List of popped elements and scores
-
zcount
Description copied from interface:SortedSetCommandsReturn the number of elements in the sorted set at key with a score between min and max.Time complexity O(log(N)) with N being the number of elements in the sorted set.
- Specified by:
zcountin interfaceSortedSetCommands- Parameters:
key- the key to querymin- minimum scoremax- maximum score- Returns:
- The number of elements in the specified score range.
-
zcount
Description copied from interface:SortedSetCommandsSimilar toZCOUNTbut with exclusive range.- Specified by:
zcountin interfaceSortedSetCommands- See Also:
-
zpopmax
- Specified by:
zpopmaxin interfaceSortedSetBinaryCommands
-
zpopmax
- Specified by:
zpopmaxin interfaceSortedSetBinaryCommands
-
zpopmin
- Specified by:
zpopminin interfaceSortedSetBinaryCommands
-
zpopmin
- Specified by:
zpopminin interfaceSortedSetBinaryCommands
-
zcount
public long zcount(byte[] key, double min, double max) - Specified by:
zcountin interfaceSortedSetBinaryCommands
-
zcount
public long zcount(byte[] key, byte[] min, byte[] max) - Specified by:
zcountin interfaceSortedSetBinaryCommands
-
zrange
Description copied from interface:SortedSetCommandsReturns the specified range of elements in the sorted set stored at key.Time complexity O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements returned.
- Specified by:
zrangein interfaceSortedSetCommands- Parameters:
key- the key to querystart- the minimum indexstop- the maximum index- Returns:
- A List of Strings in the specified range
-
zrevrange
Description copied from interface:SortedSetCommandsReturns the specified range of elements in the sorted set stored at key. The elements are considered to be ordered from the highest to the lowest score. Descending lexicographical order is used for elements with equal score.Time complexity O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements returned.
- Specified by:
zrevrangein interfaceSortedSetCommands- Parameters:
key- the key to querystart- the minimum indexstop- the maximum index- Returns:
- A List of Strings in the specified range
-
zrangeWithScores
Description copied from interface:SortedSetCommandsReturns the specified range of elements in the sorted set stored at key with the scores.- Specified by:
zrangeWithScoresin interfaceSortedSetCommands- Parameters:
key- the key to querystart- the minimum indexstop- the maximum index- Returns:
- A List of Tuple in the specified range (elements names and their scores)
-
zrevrangeWithScores
Description copied from interface:SortedSetCommandsSimilar toZREVRANGEbut the reply will include the scores of the returned elements.- Specified by:
zrevrangeWithScoresin interfaceSortedSetCommands- Parameters:
key- the key to querystart- the minimum indexstop- the maximum index- Returns:
- A List of Tuple in the specified range (elements names and their scores)
- See Also:
-
zrange
Description copied from interface:SortedSetCommandsSimilar toZRANGEbut can be used with additional params.- Specified by:
zrangein interfaceSortedSetCommands- Parameters:
key- the key to queryzRangeParams-ZRangeParams- Returns:
- A List of Strings in the specified range
- See Also:
-
zrangeWithScores
Description copied from interface:SortedSetCommandsSimilar toZRANGEbut can be used with additional params.- Specified by:
zrangeWithScoresin interfaceSortedSetCommands- Parameters:
key- the key to queryzRangeParams-ZRangeParams- Returns:
- A List of Tuple in the specified range (elements names and their scores)
- See Also:
-
zrangestore
Description copied from interface:SortedSetCommandsSimilar toZRANGEbut stores the result indest.- Specified by:
zrangestorein interfaceSortedSetCommands- Parameters:
dest- the storing keysrc- the key to queryzRangeParams-ZRangeParams- Returns:
- The number of elements in the resulting sorted set
- See Also:
-
zrangeByScore
Description copied from interface:SortedSetCommandsReturn all the elements in the sorted set at key with a score between min and max (including elements with score equal to min or max). The elements are considered to be ordered from low to high scores.Time complexity O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements being returned.
- Specified by:
zrangeByScorein interfaceSortedSetCommands- Parameters:
key- the key to querymin- minimum scoremax- maximum score- Returns:
- A List of elements in the specified score range
-
zrangeByScore
Description copied from interface:SortedSetCommandsSimilar toZRANGEbut with exclusive range.- Specified by:
zrangeByScorein interfaceSortedSetCommands- See Also:
-
zrevrangeByScore
Description copied from interface:SortedSetCommandsReturn all the elements in the sorted set at key with a score between max and min (including elements with score equal to max or min). In contrary to the default ordering of sorted sets, for this command the elements are considered to be ordered from high to low scores.The elements having the same score are returned in reverse lexicographical order.
Time complexity O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements being returned.
- Specified by:
zrevrangeByScorein interfaceSortedSetCommands- Parameters:
key- the key to querymax- maximum scoremin- minimum score- Returns:
- A List of elements in the specified score range
-
zrangeByScore
Description copied from interface:SortedSetCommandsSimilar toZRANGEbut with exclusive range.- Specified by:
zrangeByScorein interfaceSortedSetCommands- Parameters:
key- the key to querymin- minimum scoremax- maximum scoreoffset- the first index of the sub-rangecount- count of the sub-range. A negative count returns all elements from the offset- Returns:
- A List of elements in the specified score range
- See Also:
-
zrevrangeByScore
Description copied from interface:SortedSetCommandsSimilar toZREVRANGEbut with exclusive range.- Specified by:
zrevrangeByScorein interfaceSortedSetCommands- See Also:
-
zrangeByScore
Description copied from interface:SortedSetCommandsSimilar toZRANGEbut with limit option,- Specified by:
zrangeByScorein interfaceSortedSetCommands- Parameters:
key- the key to querymin- minimum scoremax- maximum scoreoffset- the first index of the sub-rangecount- count of the sub-range. A negative count returns all elements from the offset- Returns:
- A List of elements in the specified score range
- See Also:
-
zrevrangeByScore
Description copied from interface:SortedSetCommandsSimilar toZRANGEbut with limit option,- Specified by:
zrevrangeByScorein interfaceSortedSetCommands- Parameters:
key- the key to querymax- maximum scoremin- minimum scoreoffset- the first index of the sub-rangecount- count of the sub-range. A negative count returns all elements from the offset- Returns:
- A List of elements in the specified score range
- See Also:
-
zrangeByScoreWithScores
Description copied from interface:SortedSetCommandsSimilar toZRANGEbut return with scores.- Specified by:
zrangeByScoreWithScoresin interfaceSortedSetCommands- Parameters:
key- the key to querymin- minimum scoremax- maximum score- Returns:
- A List of elements with scores in the specified score range
- See Also:
-
zrevrangeByScoreWithScores
Description copied from interface:SortedSetCommandsSimilar toZREVRANGEbut return with scores.- Specified by:
zrevrangeByScoreWithScoresin interfaceSortedSetCommands- Parameters:
key- the key to querymax- maximum scoremin- minimum score- Returns:
- A List of elements with scores in the specified score range
- See Also:
-
zrangeByScoreWithScores
public List<Tuple> zrangeByScoreWithScores(String key, double min, double max, int offset, int count) Description copied from interface:SortedSetCommandsSimilar toZRANGEbut with limit option, and return with scores.- Specified by:
zrangeByScoreWithScoresin interfaceSortedSetCommands- Parameters:
key- the key to querymin- minimum scoremax- maximum scoreoffset- the first index of the sub-rangecount- count of the sub-range. A negative count returns all elements from the offset- Returns:
- A List of elements in the specified score range
- See Also:
-
zrevrangeByScore
Description copied from interface:SortedSetCommandsSimilar toZREVRANGEbut with limit option,- Specified by:
zrevrangeByScorein interfaceSortedSetCommands- Parameters:
key- the key to querymax- maximum scoremin- minimum scoreoffset- the first index of the sub-rangecount- count of the sub-range. A negative count returns all elements from the offset- Returns:
- A List of elements in the specified score range
- See Also:
-
zrangeByScoreWithScores
Description copied from interface:SortedSetCommandsSimilar toZRANGEbut with exclusive range, and return with scores.- Specified by:
zrangeByScoreWithScoresin interfaceSortedSetCommands- See Also:
-
zrevrangeByScoreWithScores
Description copied from interface:SortedSetCommandsSimilar toZREVRANGEbut with exclusive range, and return with scores.- Specified by:
zrevrangeByScoreWithScoresin interfaceSortedSetCommands- See Also:
-
zrangeByScoreWithScores
public List<Tuple> zrangeByScoreWithScores(String key, String min, String max, int offset, int count) Description copied from interface:SortedSetCommandsSimilar toZRANGEbut with exclusive range, with limit options and return with scores.- Specified by:
zrangeByScoreWithScoresin interfaceSortedSetCommands- Parameters:
key- the key to querymin- minimum scoremax- maximum scoreoffset- the first index of the sub-rangecount- count of the sub-range. A negative count returns all elements from the offset- Returns:
- A List of elements in the specified score range
- See Also:
-
zrevrangeByScoreWithScores
public List<Tuple> zrevrangeByScoreWithScores(String key, double max, double min, int offset, int count) Description copied from interface:SortedSetCommandsSimilar toZREVRANGEbut with limit options and return with scores.- Specified by:
zrevrangeByScoreWithScoresin interfaceSortedSetCommands- Parameters:
key- the key to querymax- maximum scoremin- minimum scoreoffset- the first index of the sub-rangecount- count of the sub-range. A negative count returns all elements from the offset- Returns:
- A List of elements in the specified score range
- See Also:
-
zrevrangeByScoreWithScores
public List<Tuple> zrevrangeByScoreWithScores(String key, String max, String min, int offset, int count) Description copied from interface:SortedSetCommandsSimilar toZREVRANGEbut with exclusive range, with limit options and return with scores.- Specified by:
zrevrangeByScoreWithScoresin interfaceSortedSetCommands- Parameters:
key- the key to querymax- maximum scoremin- minimum scoreoffset- the first index of the sub-rangecount- count of the sub-range. A negative count returns all elements from the offset- Returns:
- A List of elements in the specified score range
- See Also:
-
zrange
- Specified by:
zrangein interfaceSortedSetBinaryCommands
-
zrevrange
- Specified by:
zrevrangein interfaceSortedSetBinaryCommands
-
zrangeWithScores
- Specified by:
zrangeWithScoresin interfaceSortedSetBinaryCommands
-
zrevrangeWithScores
- Specified by:
zrevrangeWithScoresin interfaceSortedSetBinaryCommands
-
zrange
- Specified by:
zrangein interfaceSortedSetBinaryCommands
-
zrangeWithScores
- Specified by:
zrangeWithScoresin interfaceSortedSetBinaryCommands
-
zrangestore
- Specified by:
zrangestorein interfaceSortedSetBinaryCommands
-
zrangeByScore
- Specified by:
zrangeByScorein interfaceSortedSetBinaryCommands
-
zrangeByScore
- Specified by:
zrangeByScorein interfaceSortedSetBinaryCommands
-
zrevrangeByScore
- Specified by:
zrevrangeByScorein interfaceSortedSetBinaryCommands
-
zrangeByScore
- Specified by:
zrangeByScorein interfaceSortedSetBinaryCommands
-
zrevrangeByScore
- Specified by:
zrevrangeByScorein interfaceSortedSetBinaryCommands
-
zrangeByScore
- Specified by:
zrangeByScorein interfaceSortedSetBinaryCommands
-
zrevrangeByScore
- Specified by:
zrevrangeByScorein interfaceSortedSetBinaryCommands
-
zrangeByScoreWithScores
- Specified by:
zrangeByScoreWithScoresin interfaceSortedSetBinaryCommands
-
zrevrangeByScoreWithScores
- Specified by:
zrevrangeByScoreWithScoresin interfaceSortedSetBinaryCommands
-
zrangeByScoreWithScores
public List<Tuple> zrangeByScoreWithScores(byte[] key, double min, double max, int offset, int count) - Specified by:
zrangeByScoreWithScoresin interfaceSortedSetBinaryCommands
-
zrevrangeByScore
- Specified by:
zrevrangeByScorein interfaceSortedSetBinaryCommands
-
zrangeByScoreWithScores
- Specified by:
zrangeByScoreWithScoresin interfaceSortedSetBinaryCommands
-
zrevrangeByScoreWithScores
- Specified by:
zrevrangeByScoreWithScoresin interfaceSortedSetBinaryCommands
-
zrangeByScoreWithScores
public List<Tuple> zrangeByScoreWithScores(byte[] key, byte[] min, byte[] max, int offset, int count) - Specified by:
zrangeByScoreWithScoresin interfaceSortedSetBinaryCommands
-
zrevrangeByScoreWithScores
public List<Tuple> zrevrangeByScoreWithScores(byte[] key, double max, double min, int offset, int count) - Specified by:
zrevrangeByScoreWithScoresin interfaceSortedSetBinaryCommands
-
zrevrangeByScoreWithScores
public List<Tuple> zrevrangeByScoreWithScores(byte[] key, byte[] max, byte[] min, int offset, int count) - Specified by:
zrevrangeByScoreWithScoresin interfaceSortedSetBinaryCommands
-
zremrangeByRank
Description copied from interface:SortedSetCommandsRemove all elements in the sorted set at key with rank between start and end. Start and end are 0-based with rank 0 being the element with the lowest score. Both start and end can be negative numbers, where they indicate offsets starting at the element with the highest rank. For example: -1 is the element with the highest score, -2 the element with the second highest score and so forth.Time complexity O(log(N))+O(M) with N being the number of elements in the sorted set and M the number of elements removed by the operation.
- Specified by:
zremrangeByRankin interfaceSortedSetCommands- Parameters:
key-start-stop-- Returns:
- The number of elements removed
-
zremrangeByScore
Description copied from interface:SortedSetCommandsRemove all the elements in the sorted set at key with a score between min and max (including elements with score equal to min or max).Time complexity O(log(N))+O(M) with N being the number of elements in the sorted set and M the number of elements removed by the operation.
- Specified by:
zremrangeByScorein interfaceSortedSetCommands- Parameters:
key-min- minimum score to removemax- maximum score to remove- Returns:
- The number of elements removed
-
zremrangeByScore
Description copied from interface:SortedSetCommandsSimilar toZREMRANGEbut with limit option.- Specified by:
zremrangeByScorein interfaceSortedSetCommands- See Also:
-
zremrangeByRank
public long zremrangeByRank(byte[] key, long start, long stop) - Specified by:
zremrangeByRankin interfaceSortedSetBinaryCommands
-
zremrangeByScore
public long zremrangeByScore(byte[] key, double min, double max) - Specified by:
zremrangeByScorein interfaceSortedSetBinaryCommands
-
zremrangeByScore
public long zremrangeByScore(byte[] key, byte[] min, byte[] max) - Specified by:
zremrangeByScorein interfaceSortedSetBinaryCommands
-
zlexcount
Description copied from interface:SortedSetCommandsReturn the number of elements in the sorted set at key with a value between min and max, when all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering.Time complexity O(log(N)) with N being the number of elements in the sorted set.
- Specified by:
zlexcountin interfaceSortedSetCommands- Parameters:
key-min- minimum valuemax- maximum value- Returns:
- The number of elements in the specified score range
-
zrangeByLex
Description copied from interface:SortedSetCommandsReturn all the elements in the sorted set at key with a value between min and max, when all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering.Time complexity O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements being returned.
- Specified by:
zrangeByLexin interfaceSortedSetCommands- Parameters:
key-min- minimum valuemax- maximum value- Returns:
- A List of elements in the specified score range
-
zrangeByLex
Description copied from interface:SortedSetCommandsSimilar toZRANGEbut with limit option.- Specified by:
zrangeByLexin interfaceSortedSetCommands- Parameters:
key-min- minimum valuemax- maximum valueoffset- the first index of the sub-rangecount- count of the sub-range. A negative count returns all elements from the offset- Returns:
- A List of elements in the specified score range
- See Also:
-
zrevrangeByLex
Description copied from interface:SortedSetCommandsReturn all the elements in the sorted set at key with a value between max and min, when all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering.Time complexity O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements being returned.
- Specified by:
zrevrangeByLexin interfaceSortedSetCommands- Parameters:
key-max- maximum valuemin- minimum value- Returns:
- A List of elements in the specified score range
-
zrevrangeByLex
Description copied from interface:SortedSetCommandsSimilar toZRANGEbut with limit option.- Specified by:
zrevrangeByLexin interfaceSortedSetCommands- Parameters:
key-max- maximum valuemin- minimum valueoffset- the first index of the sub-rangecount- count of the sub-range. A negative count returns all elements from the offset- Returns:
- A List of elements in the specified score range
- See Also:
-
zremrangeByLex
Description copied from interface:SortedSetCommandsRemove all elements in the sorted set stored at key between the lexicographical range specified by min and max, when all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering.Time complexity O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements removed by the operation.
- Specified by:
zremrangeByLexin interfaceSortedSetCommands- Parameters:
key-min- minimum value to removemax- maximum value to remove- Returns:
- The number of elements removed
-
zlexcount
public long zlexcount(byte[] key, byte[] min, byte[] max) - Specified by:
zlexcountin interfaceSortedSetBinaryCommands
-
zrangeByLex
- Specified by:
zrangeByLexin interfaceSortedSetBinaryCommands
-
zrangeByLex
- Specified by:
zrangeByLexin interfaceSortedSetBinaryCommands
-
zrevrangeByLex
- Specified by:
zrevrangeByLexin interfaceSortedSetBinaryCommands
-
zrevrangeByLex
- Specified by:
zrevrangeByLexin interfaceSortedSetBinaryCommands
-
zremrangeByLex
public long zremrangeByLex(byte[] key, byte[] min, byte[] max) - Specified by:
zremrangeByLexin interfaceSortedSetBinaryCommands
-
zscan
- Specified by:
zscanin interfaceSortedSetCommands
-
zscan
- Specified by:
zscanin interfaceSortedSetBinaryCommands
-
bzpopmax
Description copied from interface:SortedSetCommandsThe blocking version ofZPOPMAX- Specified by:
bzpopmaxin interfaceSortedSetCommands- Parameters:
timeout- specifying the maximum number of seconds to block. A timeout of zero can be used to block indefinitely.keys-
-
bzpopmin
Description copied from interface:SortedSetCommandsThe blocking version ofZPOPMIN- Specified by:
bzpopminin interfaceSortedSetCommands- Parameters:
timeout- specifying the maximum number of seconds to block. A timeout of zero can be used to block indefinitely.keys-
-
bzpopmax
- Specified by:
bzpopmaxin interfaceSortedSetBinaryCommands
-
bzpopmin
- Specified by:
bzpopminin interfaceSortedSetBinaryCommands
-
zdiff
Description copied from interface:SortedSetCommandsCompute the difference between all the sets in the given keys.Time complexity O(L + (N-K)log(N)) worst case where L is the total number of elements in all the sets, N is the size of the first set, and K is the size of the result set.
- Specified by:
zdiffin interfaceSortedSetCommands- Parameters:
keys- group of sets- Returns:
- The result of the difference
-
zdiffWithScores
Description copied from interface:SortedSetCommandsCompute the difference between all the sets in the given keys. Return the result with scores.- Specified by:
zdiffWithScoresin interfaceSortedSetCommands- Parameters:
keys- group of sets- Returns:
- The result of the difference with their scores
-
zdiffStore
Description copied from interface:SortedSetCommandsCompute the difference between all the sets in the given keys. Store the result in dstkey.- Specified by:
zdiffStorein interfaceSortedSetCommands- Parameters:
dstkey-keys- group of sets- Returns:
- The number of elements in the resulting sorted set at dstkey.
-
zdiff
- Specified by:
zdiffin interfaceSortedSetBinaryCommands
-
zdiffWithScores
- Specified by:
zdiffWithScoresin interfaceSortedSetBinaryCommands
-
zdiffStore
public long zdiffStore(byte[] dstkey, byte[]... keys) - Specified by:
zdiffStorein interfaceSortedSetBinaryCommands
-
zinterstore
Description copied from interface:SortedSetCommandsCompute the intersection between all the sets in the given keys. Store the result in dstkey.- Specified by:
zinterstorein interfaceSortedSetCommands- Parameters:
dstkey-sets- group of sets- Returns:
- The number of elements in the resulting sorted set at dstkey
-
zinterstore
Description copied from interface:SortedSetCommandsCompute the intersection between all the sets in the given keys. Store the result in dstkey.- Specified by:
zinterstorein interfaceSortedSetCommands- Parameters:
dstkey-params-ZParamssets- group of sets- Returns:
- The number of elements in the resulting sorted set at dstkey
-
zinter
Description copied from interface:SortedSetCommandsCompute the intersection between all the sets in the given keys.Time complexity O(N*K)+O(M*log(M)) worst case with N being the smallest input sorted set, K being the number of input sorted sets and M being the number of elements in the resulting sorted set.
- Specified by:
zinterin interfaceSortedSetCommands- Parameters:
params-ZParamskeys- group of sets- Returns:
- The result of the intersection
-
zinterWithScores
Description copied from interface:SortedSetCommandsCompute the intersection between all the sets in the given keys. Return the result with scores.- Specified by:
zinterWithScoresin interfaceSortedSetCommands- Parameters:
params-ZParamskeys- group of sets- Returns:
- The result of the intersection with their scores
-
zinterstore
public long zinterstore(byte[] dstkey, byte[]... sets) - Specified by:
zinterstorein interfaceSortedSetBinaryCommands
-
zinterstore
- Specified by:
zinterstorein interfaceSortedSetBinaryCommands
-
zintercard
public long zintercard(byte[]... keys) Description copied from interface:SortedSetBinaryCommandsSimilar toZINTER, but instead of returning the result set, it returns just the cardinality of the result.Time complexity O(N*K) worst case with N being the smallest input sorted set, K being the number of input sorted sets
- Specified by:
zintercardin interfaceSortedSetBinaryCommands- Parameters:
keys- group of sets- Returns:
- The number of elements in the resulting intersection
- See Also:
-
zintercard
public long zintercard(long limit, byte[]... keys) Description copied from interface:SortedSetBinaryCommandsSimilar toZINTER, but instead of returning the result set, it returns just the cardinality of the result.Time complexity O(N*K) worst case with N being the smallest input sorted set, K being the number of input sorted sets
- Specified by:
zintercardin interfaceSortedSetBinaryCommands- Parameters:
limit- If the intersection cardinality reaches limit partway through the computation, the algorithm will exit and yield limit as the cardinalitykeys- group of sets- Returns:
- The number of elements in the resulting intersection
- See Also:
-
zintercard
Description copied from interface:SortedSetCommandsSimilar toZINTER, but instead of returning the result set, it returns just the cardinality of the result.Time complexity O(N*K) worst case with N being the smallest input sorted set, K being the number of input sorted sets
- Specified by:
zintercardin interfaceSortedSetCommands- Parameters:
keys- group of sets- Returns:
- The number of elements in the resulting intersection
- See Also:
-
zintercard
Description copied from interface:SortedSetCommandsSimilar toZINTER, but instead of returning the result set, it returns just the cardinality of the result.Time complexity O(N*K) worst case with N being the smallest input sorted set, K being the number of input sorted sets
- Specified by:
zintercardin interfaceSortedSetCommands- Parameters:
limit- If the intersection cardinality reaches limit partway through the computation, the algorithm will exit and yield limit as the cardinalitykeys- group of sets- Returns:
- The number of elements in the resulting intersection
- See Also:
-
zinter
- Specified by:
zinterin interfaceSortedSetBinaryCommands
-
zinterWithScores
- Specified by:
zinterWithScoresin interfaceSortedSetBinaryCommands
-
zunion
Description copied from interface:SortedSetCommandsCompute the union between all the sets in the given keys.Time complexity O(N)+O(M log(M)) with N being the sum of the sizes of the input sorted sets, and M being the number of elements in the resulting sorted set.
- Specified by:
zunionin interfaceSortedSetCommands- Parameters:
params-ZParamskeys- group of sets- Returns:
- The result of the union
-
zunionWithScores
Description copied from interface:SortedSetCommandsCompute the union between all the sets in the given keys. Return the result with scores.- Specified by:
zunionWithScoresin interfaceSortedSetCommands- Parameters:
params-ZParamskeys- group of sets- Returns:
- The result of the union with their scores
-
zunionstore
Description copied from interface:SortedSetCommandsCompute the union between all the sets in the given keys. Store the result in dstkey.- Specified by:
zunionstorein interfaceSortedSetCommands- Parameters:
dstkey-sets- group of sets- Returns:
- The number of elements in the resulting sorted set at dstkey
-
zunionstore
Description copied from interface:SortedSetCommandsCompute the union between all the sets in the given keys. Store the result in dstkey.- Specified by:
zunionstorein interfaceSortedSetCommands- Parameters:
dstkey-params-ZParamssets- group of sets- Returns:
- The number of elements in the resulting sorted set at dstkey
-
zunion
- Specified by:
zunionin interfaceSortedSetBinaryCommands
-
zunionWithScores
- Specified by:
zunionWithScoresin interfaceSortedSetBinaryCommands
-
zunionstore
public long zunionstore(byte[] dstkey, byte[]... sets) - Specified by:
zunionstorein interfaceSortedSetBinaryCommands
-
zunionstore
- Specified by:
zunionstorein interfaceSortedSetBinaryCommands
-
zmpop
- Specified by:
zmpopin interfaceSortedSetCommands
-
zmpop
- Specified by:
zmpopin interfaceSortedSetCommands
-
bzmpop
- Specified by:
bzmpopin interfaceSortedSetCommands
-
bzmpop
public KeyValue<String,List<Tuple>> bzmpop(long timeout, SortedSetOption option, int count, String... keys) - Specified by:
bzmpopin interfaceSortedSetCommands
-
zmpop
- Specified by:
zmpopin interfaceSortedSetBinaryCommands
-
zmpop
- Specified by:
zmpopin interfaceSortedSetBinaryCommands
-
bzmpop
- Specified by:
bzmpopin interfaceSortedSetBinaryCommands
-
bzmpop
public KeyValue<byte[],List<Tuple>> bzmpop(long timeout, SortedSetOption option, int count, byte[]... keys) - Specified by:
bzmpopin interfaceSortedSetBinaryCommands
-
geoadd
Description copied from interface:GeoCommandsAdds the specified geospatial item (longitude, latitude, member) to the specified key.Time complexity: O(log(N)) where N is the number of elements in the sorted set.
- Specified by:
geoaddin interfaceGeoCommands- Parameters:
key-longitude-latitude-member-- Returns:
- The number of elements added
-
geoadd
Description copied from interface:GeoCommandsAdds the specified geospatial items (in memberCoordinateMap) to the specified key.Time complexity: O(log(N)) for each item added, where N is the number of elements in the sorted set.
- Specified by:
geoaddin interfaceGeoCommands- Parameters:
key-memberCoordinateMap- Members names with their geo coordinates- Returns:
- The number of elements added
-
geoadd
Description copied from interface:GeoCommandsAdds the specified geospatial items (in memberCoordinateMap) to the specified key. Can be used with the following options: XX- Only update elements that already exist. Never add elements. NX- Don't update already existing elements. Always add new elements. CH- Modify the return value from the number of new elements added, to the total number of elements changedTime complexity: O(log(N)) for each item added
- Specified by:
geoaddin interfaceGeoCommands- Parameters:
key-params- Additional optionsmemberCoordinateMap- Members names with their geo coordinates- Returns:
- The number of elements added
-
geodist
Description copied from interface:GeoCommandsReturn the distance between two members in the geospatial index represented by the sorted set.Time complexity: O(log(N))
- Specified by:
geodistin interfaceGeoCommands- Parameters:
key-member1-member2-- Returns:
- The distance as a double
-
geodist
Description copied from interface:GeoCommandsReturn the distance between two members in the geospatial index represented by the sorted set.Time complexity: O(log(N))
- Specified by:
geodistin interfaceGeoCommands- Parameters:
key-member1-member2-unit- can be M, KM, MI or FT can M, KM, MI or FT- Returns:
- The distance as a double
-
geohash
Description copied from interface:GeoCommandsReturn valid Geohash strings representing the position of the given members.Time complexity: O(log(N)) for each member requested
- Specified by:
geohashin interfaceGeoCommands- Parameters:
key-members-- Returns:
- A list of Geohash strings corresponding to each member name passed as argument to the command.
-
geopos
Description copied from interface:GeoCommandsReturn the positions (longitude,latitude) of all the specified members.Time complexity: O(N) where N is the number of members requested.
- Specified by:
geoposin interfaceGeoCommands- Parameters:
key-members-- Returns:
- A list of GeoCoordinate representing longitude and latitude (x,y) of each member name passed as argument to the command.
-
geoadd
public long geoadd(byte[] key, double longitude, double latitude, byte[] member) - Specified by:
geoaddin interfaceGeoBinaryCommands
-
geoadd
- Specified by:
geoaddin interfaceGeoBinaryCommands
-
geoadd
- Specified by:
geoaddin interfaceGeoBinaryCommands
-
geodist
- Specified by:
geodistin interfaceGeoBinaryCommands
-
geodist
- Specified by:
geodistin interfaceGeoBinaryCommands
-
geohash
- Specified by:
geohashin interfaceGeoBinaryCommands
-
geopos
- Specified by:
geoposin interfaceGeoBinaryCommands
-
georadius
public List<GeoRadiusResponse> georadius(String key, double longitude, double latitude, double radius, GeoUnit unit) Description copied from interface:GeoCommandsReturn the members of a sorted set populated with geospatial information using GEOADD, which are within the borders of the area specified with the center location and the radius.Time complexity: O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index.
- Specified by:
georadiusin interfaceGeoCommands- Parameters:
key-longitude- of the center pointlatitude- of the center pointradius- of the areaunit- can be M, KM, MI or FT- Returns:
- List of GeoRadiusResponse
-
georadiusReadonly
public List<GeoRadiusResponse> georadiusReadonly(String key, double longitude, double latitude, double radius, GeoUnit unit) Description copied from interface:GeoCommandsReadonly version ofGEORADIUS,Time complexity: O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index.
- Specified by:
georadiusReadonlyin interfaceGeoCommands- Parameters:
key-longitude- of the center pointlatitude- of the center pointradius- of the areaunit- can be M, KM, MI or FT- Returns:
- List of GeoRadiusResponse
- See Also:
-
georadius
public List<GeoRadiusResponse> georadius(String key, double longitude, double latitude, double radius, GeoUnit unit, GeoRadiusParam param) Description copied from interface:GeoCommandsReturn the members of a sorted set populated with geospatial information using GEOADD, which are within the borders of the area specified with the center location and the radius. Additional information can be reached usingGeoRadiusParam: WITHDIST: Also return the distance of the returned items from the specified center. The distance is returned in the same unit as the unit specified as the radius argument of the command. WITHCOORD: Also return the longitude,latitude coordinates of the matching items. WITHHASH: Also return the raw geohash-encoded sorted set score of the item, in the form of a 52 bit unsigned integer. This is only useful for low level hacks or debugging and is otherwise of little interest for the general user.Time complexity: O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index.
- Specified by:
georadiusin interfaceGeoCommands- Parameters:
key-longitude- of the center pointlatitude- of the center pointradius- of the areaunit- can be M, KM, MI or FTparam-GeoRadiusParam- Returns:
- List of GeoRadiusResponse
-
georadiusReadonly
public List<GeoRadiusResponse> georadiusReadonly(String key, double longitude, double latitude, double radius, GeoUnit unit, GeoRadiusParam param) Description copied from interface:GeoCommandsReadonly version ofGEORADIUS,Time complexity: O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index.
- Specified by:
georadiusReadonlyin interfaceGeoCommands- Parameters:
key-longitude- of the center pointlatitude- of the center pointradius- of the areaunit- can be M, KM, MI or FTparam-GeoRadiusParam- Returns:
- List of GeoRadiusResponse
- See Also:
-
georadiusByMember
public List<GeoRadiusResponse> georadiusByMember(String key, String member, double radius, GeoUnit unit) Description copied from interface:GeoCommandsThis command is exactly likeGEORADIUSwith the sole difference that instead of taking, as the center of the area to query, a longitude and latitude value, it takes the name of a member already existing inside the geospatial index represented by the sorted set.Time complexity: O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index.
- Specified by:
georadiusByMemberin interfaceGeoCommands- Parameters:
key-member- represents the center of the arearadius- of the areaunit- can be M, KM, MI or FT- Returns:
- List of GeoRadiusResponse
-
georadiusByMemberReadonly
public List<GeoRadiusResponse> georadiusByMemberReadonly(String key, String member, double radius, GeoUnit unit) Description copied from interface:GeoCommandsReadonly version ofGEORADIUSBYMEMBERTime complexity: O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index.
- Specified by:
georadiusByMemberReadonlyin interfaceGeoCommands- Parameters:
key-member- represents the center of the arearadius- of the areaunit- can be M, KM, MI or FT- Returns:
- List of GeoRadiusResponse
-
georadiusByMember
public List<GeoRadiusResponse> georadiusByMember(String key, String member, double radius, GeoUnit unit, GeoRadiusParam param) Description copied from interface:GeoCommandsThis command is exactly likeGEORADIUSwith the sole difference that instead of taking, as the center of the area to query, a longitude and latitude value, it takes the name of a member already existing inside the geospatial index represented by the sorted set.Time complexity: O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index.
- Specified by:
georadiusByMemberin interfaceGeoCommands- Parameters:
key-member- represents the center of the arearadius- of the areaunit- can be M, KM, MI or FTparam-GeoRadiusParam- Returns:
- List of GeoRadiusResponse
-
georadiusByMemberReadonly
public List<GeoRadiusResponse> georadiusByMemberReadonly(String key, String member, double radius, GeoUnit unit, GeoRadiusParam param) Description copied from interface:GeoCommandsReadonly version ofGEORADIUSBYMEMBERTime complexity: O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index.
- Specified by:
georadiusByMemberReadonlyin interfaceGeoCommands- Parameters:
key-member- represents the center of the arearadius- of the areaunit- can be M, KM, MI or FTparam-GeoRadiusParam- Returns:
- List of GeoRadiusResponse
-
georadiusStore
public long georadiusStore(String key, double longitude, double latitude, double radius, GeoUnit unit, GeoRadiusParam param, GeoRadiusStoreParam storeParam) Description copied from interface:GeoCommandsThis command is exactly likeGEORADIUSbut storing the results at the destination key (provided withstoreParam).Time complexity: O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index.
- Specified by:
georadiusStorein interfaceGeoCommands- Parameters:
key-longitude- of the center pointlatitude- of the center pointradius- of the areaunit- can be M, KM, MI or FTparam-GeoRadiusParamstoreParam-GeoRadiusStoreParam- Returns:
- The number of results being stored
-
georadiusByMemberStore
public long georadiusByMemberStore(String key, String member, double radius, GeoUnit unit, GeoRadiusParam param, GeoRadiusStoreParam storeParam) Description copied from interface:GeoCommandsThis command is exactly likeGEORADIUSBYMEMBERbut storing the results at the destination key (provided withstoreParam).Time complexity: O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index.
- Specified by:
georadiusByMemberStorein interfaceGeoCommands- Parameters:
key-member- represents the center of the arearadius- of the areaunit- can be M, KM, MI or FTparam-GeoRadiusParamstoreParam-GeoRadiusStoreParam- Returns:
- The number of results being stored
-
geosearch
Description copied from interface:GeoCommandsReturn the members of a sorted set populated with geospatial information using GEOADD, which are within the borders of the area specified by a given shape.This command can be used in place of the
GEORADIUSBYMEMBERcommand.Time complexity: O(N+log(M)) where N is the number of elements in the grid-aligned bounding box area around the shape provided as the filter and M is the number of items inside the shape
- Specified by:
geosearchin interfaceGeoCommands- Parameters:
key-member- represents the center of the arearadius- of the areaunit- can be M, KM, MI or FT- Returns:
- List of GeoRadiusResponse
-
geosearch
public List<GeoRadiusResponse> geosearch(String key, GeoCoordinate coord, double radius, GeoUnit unit) Description copied from interface:GeoCommandsReturn the members of a sorted set populated with geospatial information using GEOADD, which are within the borders of the area specified by a given shape.This command can be used in place of the
GEORADIUScommand.Time complexity: O(N+log(M)) where N is the number of elements in the grid-aligned bounding box area around the shape provided as the filter and M is the number of items inside the shape
- Specified by:
geosearchin interfaceGeoCommands- Parameters:
key-coord- represents the center of the arearadius- of the areaunit- can be M, KM, MI or FT- Returns:
- List of GeoRadiusResponse
-
geosearch
public List<GeoRadiusResponse> geosearch(String key, String member, double width, double height, GeoUnit unit) Description copied from interface:GeoCommandsReturn the members of a sorted set populated with geospatial information using GEOADD, which are within the borders of the area specified by a given shape. This command extends the GEORADIUS command, so in addition to searching within circular areas, it supports searching within rectangular areas.The axis-aligned rectangle, determined by height and width, when the center point is determined by the position of the given member.
Time complexity: O(N+log(M)) where N is the number of elements in the grid-aligned bounding box area around the shape provided as the filter and M is the number of items inside the shape
- Specified by:
geosearchin interfaceGeoCommands- Parameters:
key-member- represents the center of the areawidth- of the rectangular areaheight- of the rectangular areaunit- can be M, KM, MI or FT- Returns:
- List of GeoRadiusResponse
-
geosearch
public List<GeoRadiusResponse> geosearch(String key, GeoCoordinate coord, double width, double height, GeoUnit unit) Description copied from interface:GeoCommandsReturn the members of a sorted set populated with geospatial information using GEOADD, which are within the borders of the area specified by a given shape. This command extends the GEORADIUS command, so in addition to searching within circular areas, it supports searching within rectangular areas.The axis-aligned rectangle, determined by height and width, when the center point is determined by the given coordinate.
Time complexity: O(N+log(M)) where N is the number of elements in the grid-aligned bounding box area around the shape provided as the filter and M is the number of items inside the shape
- Specified by:
geosearchin interfaceGeoCommands- Parameters:
key-coord- represents the center pointwidth- of the rectangular areaheight- of the rectangular areaunit- can be M, KM, MI or FT- Returns:
- List of GeoRadiusResponse
-
geosearch
Description copied from interface:GeoCommandsReturn the members of a sorted set populated with geospatial information using GEOADD, which are within the borders of the area specified by a given shape. This command extends the GEORADIUS command, so in addition to searching within circular areas, it supports searching within rectangular areas.Time complexity: O(N+log(M)) where N is the number of elements in the grid-aligned bounding box area around the shape provided as the filter and M is the number of items inside the shape
- Specified by:
geosearchin interfaceGeoCommands- Parameters:
key-params-GeoSearchParam- Returns:
- List of GeoRadiusResponse
-
geosearchStore
Description copied from interface:GeoCommandsThis command is exactly likeGEOSEARCHbut storing the results at dest.Time complexity: O(N+log(M)) where N is the number of elements in the grid-aligned bounding box area around the shape provided as the filter and M is the number of items inside the shape
- Specified by:
geosearchStorein interfaceGeoCommands- Parameters:
dest-src- the sorted set (key)member- represents the center of the arearadius- of the circular areaunit- can be M, KM, MI or FT- Returns:
- The number of results being stored
-
geosearchStore
public long geosearchStore(String dest, String src, GeoCoordinate coord, double radius, GeoUnit unit) Description copied from interface:GeoCommandsThis command is exactly likeGEOSEARCHbut storing the results at dest.Time complexity: O(N+log(M)) where N is the number of elements in the grid-aligned bounding box area around the shape provided as the filter and M is the number of items inside the shape
- Specified by:
geosearchStorein interfaceGeoCommands- Parameters:
dest-src-coord- represents the center pointradius- of the circular areaunit- can be M, KM, MI or FT- Returns:
- The number of results being stored
-
geosearchStore
public long geosearchStore(String dest, String src, String member, double width, double height, GeoUnit unit) Description copied from interface:GeoCommandsThis command is exactly likeGEOSEARCHbut storing the results at dest.Time complexity: O(N+log(M)) where N is the number of elements in the grid-aligned bounding box area around the shape provided as the filter and M is the number of items inside the shape
- Specified by:
geosearchStorein interfaceGeoCommands- Parameters:
dest-src-member- represents the center of the areawidth- of the rectangular areaheight- of the rectangular areaunit- can be M, KM, MI or FT- Returns:
- The number of results being stored
-
geosearchStore
public long geosearchStore(String dest, String src, GeoCoordinate coord, double width, double height, GeoUnit unit) Description copied from interface:GeoCommandsThis command is exactly likeGEOSEARCHbut storing the results at dest.Time complexity: O(N+log(M)) where N is the number of elements in the grid-aligned bounding box area around the shape provided as the filter and M is the number of items inside the shape
- Specified by:
geosearchStorein interfaceGeoCommands- Parameters:
dest-src-coord- represents the center pointwidth- of the rectangular areaheight- of the rectangular areaunit- can be M, KM, MI or FT- Returns:
- The number of results being stored
-
geosearchStore
Description copied from interface:GeoCommandsThis command is exactly likeGEOSEARCHbut storing the results at dest.Time complexity: O(N+log(M)) where N is the number of elements in the grid-aligned bounding box area around the shape provided as the filter and M is the number of items inside the shape
- Specified by:
geosearchStorein interfaceGeoCommands- Parameters:
dest-src-params-GeoSearchParam- Returns:
- The number of results being stored
-
geosearchStoreStoreDist
Description copied from interface:GeoCommandsThis command is exactly likeGEOSEARCHSTOREbut storing the results with their destinations from the center point.Time complexity: O(N+log(M)) where N is the number of elements in the grid-aligned bounding box area around the shape provided as the filter and M is the number of items inside the shape
- Specified by:
geosearchStoreStoreDistin interfaceGeoCommands- Parameters:
dest-src-params-GeoSearchParam- Returns:
- The number of results being stored
-
georadius
public List<GeoRadiusResponse> georadius(byte[] key, double longitude, double latitude, double radius, GeoUnit unit) - Specified by:
georadiusin interfaceGeoBinaryCommands
-
georadiusReadonly
public List<GeoRadiusResponse> georadiusReadonly(byte[] key, double longitude, double latitude, double radius, GeoUnit unit) - Specified by:
georadiusReadonlyin interfaceGeoBinaryCommands
-
georadius
public List<GeoRadiusResponse> georadius(byte[] key, double longitude, double latitude, double radius, GeoUnit unit, GeoRadiusParam param) - Specified by:
georadiusin interfaceGeoBinaryCommands
-
georadiusReadonly
public List<GeoRadiusResponse> georadiusReadonly(byte[] key, double longitude, double latitude, double radius, GeoUnit unit, GeoRadiusParam param) - Specified by:
georadiusReadonlyin interfaceGeoBinaryCommands
-
georadiusByMember
public List<GeoRadiusResponse> georadiusByMember(byte[] key, byte[] member, double radius, GeoUnit unit) - Specified by:
georadiusByMemberin interfaceGeoBinaryCommands
-
georadiusByMemberReadonly
public List<GeoRadiusResponse> georadiusByMemberReadonly(byte[] key, byte[] member, double radius, GeoUnit unit) - Specified by:
georadiusByMemberReadonlyin interfaceGeoBinaryCommands
-
georadiusByMember
public List<GeoRadiusResponse> georadiusByMember(byte[] key, byte[] member, double radius, GeoUnit unit, GeoRadiusParam param) - Specified by:
georadiusByMemberin interfaceGeoBinaryCommands
-
georadiusByMemberReadonly
public List<GeoRadiusResponse> georadiusByMemberReadonly(byte[] key, byte[] member, double radius, GeoUnit unit, GeoRadiusParam param) - Specified by:
georadiusByMemberReadonlyin interfaceGeoBinaryCommands
-
georadiusStore
public long georadiusStore(byte[] key, double longitude, double latitude, double radius, GeoUnit unit, GeoRadiusParam param, GeoRadiusStoreParam storeParam) - Specified by:
georadiusStorein interfaceGeoBinaryCommands
-
georadiusByMemberStore
public long georadiusByMemberStore(byte[] key, byte[] member, double radius, GeoUnit unit, GeoRadiusParam param, GeoRadiusStoreParam storeParam) - Specified by:
georadiusByMemberStorein interfaceGeoBinaryCommands
-
geosearch
- Specified by:
geosearchin interfaceGeoBinaryCommands
-
geosearch
public List<GeoRadiusResponse> geosearch(byte[] key, GeoCoordinate coord, double radius, GeoUnit unit) - Specified by:
geosearchin interfaceGeoBinaryCommands
-
geosearch
public List<GeoRadiusResponse> geosearch(byte[] key, byte[] member, double width, double height, GeoUnit unit) - Specified by:
geosearchin interfaceGeoBinaryCommands
-
geosearch
public List<GeoRadiusResponse> geosearch(byte[] key, GeoCoordinate coord, double width, double height, GeoUnit unit) - Specified by:
geosearchin interfaceGeoBinaryCommands
-
geosearch
- Specified by:
geosearchin interfaceGeoBinaryCommands
-
geosearchStore
- Specified by:
geosearchStorein interfaceGeoBinaryCommands
-
geosearchStore
public long geosearchStore(byte[] dest, byte[] src, GeoCoordinate coord, double radius, GeoUnit unit) - Specified by:
geosearchStorein interfaceGeoBinaryCommands
-
geosearchStore
public long geosearchStore(byte[] dest, byte[] src, byte[] member, double width, double height, GeoUnit unit) - Specified by:
geosearchStorein interfaceGeoBinaryCommands
-
geosearchStore
public long geosearchStore(byte[] dest, byte[] src, GeoCoordinate coord, double width, double height, GeoUnit unit) - Specified by:
geosearchStorein interfaceGeoBinaryCommands
-
geosearchStore
- Specified by:
geosearchStorein interfaceGeoBinaryCommands
-
geosearchStoreStoreDist
- Specified by:
geosearchStoreStoreDistin interfaceGeoBinaryCommands
-
pfadd
- Specified by:
pfaddin interfaceHyperLogLogCommands
-
pfmerge
- Specified by:
pfmergein interfaceHyperLogLogCommands
-
pfcount
- Specified by:
pfcountin interfaceHyperLogLogCommands
-
pfcount
- Specified by:
pfcountin interfaceHyperLogLogCommands
-
pfadd
public long pfadd(byte[] key, byte[]... elements) - Specified by:
pfaddin interfaceHyperLogLogBinaryCommands
-
pfmerge
- Specified by:
pfmergein interfaceHyperLogLogBinaryCommands
-
pfcount
public long pfcount(byte[] key) - Specified by:
pfcountin interfaceHyperLogLogBinaryCommands
-
pfcount
public long pfcount(byte[]... keys) - Specified by:
pfcountin interfaceHyperLogLogBinaryCommands
-
xadd
Description copied from interface:StreamCommandsXADD key ID field string [field string ...]- Specified by:
xaddin interfaceStreamCommands- Returns:
- the ID of the added entry
-
xadd
- Specified by:
xaddin interfaceStreamCommands
-
xlen
Description copied from interface:StreamCommandsXLEN key- Specified by:
xlenin interfaceStreamCommands- Returns:
- length of stream
-
xrange
Description copied from interface:StreamCommandsXRANGE key start end- Specified by:
xrangein interfaceStreamCommands- Parameters:
key-start- minimumStreamEntryIDfor the retrieved range, passingnullwill indicate minimum ID possible in the streamend- maximumStreamEntryIDfor the retrieved range, passingnullwill indicate maximum ID possible in the stream- Returns:
- The entries with IDs matching the specified range.
-
xrange
Description copied from interface:StreamCommandsXRANGE key start end COUNT count- Specified by:
xrangein interfaceStreamCommands- Parameters:
key-start- minimumStreamEntryIDfor the retrieved range, passingnullwill indicate minimum ID possible in the streamend- maximumStreamEntryIDfor the retrieved range, passingnullwill indicate maximum ID possible in the streamcount- maximum number of entries returned- Returns:
- The entries with IDs matching the specified range.
-
xrevrange
Description copied from interface:StreamCommandsXREVRANGE key end start- Specified by:
xrevrangein interfaceStreamCommands- Parameters:
key-end- maximumStreamEntryIDfor the retrieved range, passingnullwill indicate maximum ID possible in the streamstart- minimumStreamEntryIDfor the retrieved range, passingnullwill indicate minimum ID possible in the stream- Returns:
- the entries with IDs matching the specified range, from the higher ID to the lower ID matching.
-
xrevrange
Description copied from interface:StreamCommandsXREVRANGE key end start COUNT count- Specified by:
xrevrangein interfaceStreamCommands- Parameters:
key-end- maximumStreamEntryIDfor the retrieved range, passingnullwill indicate maximum ID possible in the streamstart- minimumStreamEntryIDfor the retrieved range, passingnullwill indicate minimum ID possible in the streamcount- The entries with IDs matching the specified range.- Returns:
- the entries with IDs matching the specified range, from the higher ID to the lower ID matching.
-
xrange
- Specified by:
xrangein interfaceStreamCommands
-
xrange
- Specified by:
xrangein interfaceStreamCommands
-
xrevrange
- Specified by:
xrevrangein interfaceStreamCommands
-
xrevrange
- Specified by:
xrevrangein interfaceStreamCommands
-
xack
Description copied from interface:StreamCommandsXACK key group ID [ID ...]- Specified by:
xackin interfaceStreamCommands
-
xgroupCreate
Description copied from interface:StreamCommandsXGROUP CREATE key groupName <id or $>- Specified by:
xgroupCreatein interfaceStreamCommands
-
xgroupSetID
Description copied from interface:StreamCommandsXGROUP SETID key groupName <id or $>- Specified by:
xgroupSetIDin interfaceStreamCommands
-
xgroupDestroy
Description copied from interface:StreamCommandsXGROUP DESTROY key groupName- Specified by:
xgroupDestroyin interfaceStreamCommands
-
xgroupCreateConsumer
Description copied from interface:StreamCommandsXGROUP CREATECONSUMER key groupName consumerName- Specified by:
xgroupCreateConsumerin interfaceStreamCommands
-
xgroupDelConsumer
Description copied from interface:StreamCommandsXGROUP DELCONSUMER key groupName consumerName- Specified by:
xgroupDelConsumerin interfaceStreamCommands
-
xpending
Description copied from interface:StreamCommandsXPENDING key group- Specified by:
xpendingin interfaceStreamCommands
-
xpending
public List<StreamPendingEntry> xpending(String key, String groupName, StreamEntryID start, StreamEntryID end, int count, String consumerName) Description copied from interface:StreamCommandsXPENDING key group [start end count] [consumer]- Specified by:
xpendingin interfaceStreamCommands
-
xpending
Description copied from interface:StreamCommandsXPENDING key group [[IDLE min-idle-time] start end count [consumer]]- Specified by:
xpendingin interfaceStreamCommands
-
xdel
Description copied from interface:StreamCommandsXDEL key ID [ID ...]- Specified by:
xdelin interfaceStreamCommands
-
xtrim
Description copied from interface:StreamCommandsXTRIM key MAXLEN [~] count- Specified by:
xtrimin interfaceStreamCommands
-
xtrim
Description copied from interface:StreamCommandsXTRIM key MAXLEN|MINID [=|~] threshold [LIMIT count]- Specified by:
xtrimin interfaceStreamCommands
-
xclaim
public List<StreamEntry> xclaim(String key, String group, String consumerName, long minIdleTime, XClaimParams params, StreamEntryID... ids) Description copied from interface:StreamCommandsXCLAIM key group consumer min-idle-time <ID-1> ... <ID-N> [IDLE <milliseconds>] [TIME <mstime>] [RETRYCOUNT <count>] [FORCE]- Specified by:
xclaimin interfaceStreamCommands
-
xclaimJustId
public List<StreamEntryID> xclaimJustId(String key, String group, String consumerName, long minIdleTime, XClaimParams params, StreamEntryID... ids) Description copied from interface:StreamCommandsXCLAIM key group consumer min-idle-time <ID-1> ... <ID-N> [IDLE <milliseconds>] [TIME <mstime>] [RETRYCOUNT <count>] [FORCE] JUSTID- Specified by:
xclaimJustIdin interfaceStreamCommands
-
xautoclaim
public Map.Entry<StreamEntryID,List<StreamEntry>> xautoclaim(String key, String group, String consumerName, long minIdleTime, StreamEntryID start, XAutoClaimParams params) Description copied from interface:StreamCommandsXAUTOCLAIM key group consumer min-idle-time start [COUNT count]- Specified by:
xautoclaimin interfaceStreamCommands- Parameters:
key- Stream Keygroup- Consumer GroupconsumerName- Consumer name to transfer the auto claimed entriesminIdleTime- Entries pending more than minIdleTime will be transferred ownershipstart-StreamEntryID- Entries ≥ start will be transferred ownership, passingnullwill indicate '-'params-XAutoClaimParams
-
xautoclaimJustId
public Map.Entry<StreamEntryID,List<StreamEntryID>> xautoclaimJustId(String key, String group, String consumerName, long minIdleTime, StreamEntryID start, XAutoClaimParams params) Description copied from interface:StreamCommandsXAUTOCLAIM key group consumer min-idle-time start [COUNT count] JUSTID- Specified by:
xautoclaimJustIdin interfaceStreamCommands- Parameters:
key- Stream Keygroup- Consumer GroupconsumerName- Consumer name to transfer the auto claimed entriesminIdleTime- Entries pending more than minIdleTime will be transferred ownershipstart-StreamEntryID- Entries ≥ start will be transferred ownership, passingnullwill indicate '-'params-XAutoClaimParams
-
xinfoStream
Description copied from interface:StreamCommandsIntrospection command used in order to retrieve different information about the stream- Specified by:
xinfoStreamin interfaceStreamCommands- Parameters:
key- Stream name- Returns:
StreamInfothat contains information about the stream
-
xinfoStreamFull
Description copied from interface:StreamCommandsIntrospection command used in order to retrieve all information about the stream- Specified by:
xinfoStreamFullin interfaceStreamCommands- Parameters:
key- Stream name- Returns:
StreamFullInfothat contains information about the stream
-
xinfoStreamFull
Description copied from interface:StreamCommandsIntrospection command used in order to retrieve all information about the stream- Specified by:
xinfoStreamFullin interfaceStreamCommands- Parameters:
key- Stream namecount- stream info count- Returns:
StreamFullInfothat contains information about the stream
-
xinfoGroup
Deprecated.- Specified by:
xinfoGroupin interfaceStreamCommands
-
xinfoGroups
Description copied from interface:StreamCommandsIntrospection command used in order to retrieve different information about groups in the stream- Specified by:
xinfoGroupsin interfaceStreamCommands- Parameters:
key- Stream name- Returns:
- List of
StreamGroupInfocontaining information about groups
-
xinfoConsumers
Description copied from interface:StreamCommandsIntrospection command used in order to retrieve different information about consumers in the group- Specified by:
xinfoConsumersin interfaceStreamCommands- Parameters:
key- Stream namegroup- Group name- Returns:
- List of
StreamConsumersInfocontaining information about consumers that belong to the the group
-
xread
public List<Map.Entry<String,List<StreamEntry>>> xread(XReadParams xReadParams, Map<String, StreamEntryID> streams) Description copied from interface:StreamCommandsXREAD [COUNT count] [BLOCK milliseconds] STREAMS key [key ...] ID [ID ...]- Specified by:
xreadin interfaceStreamCommands
-
xreadGroup
public List<Map.Entry<String,List<StreamEntry>>> xreadGroup(String groupName, String consumer, XReadGroupParams xReadGroupParams, Map<String, StreamEntryID> streams) Description copied from interface:StreamCommandsXREAD [COUNT count] [BLOCK milliseconds] STREAMS key [key ...] ID [ID ...]- Specified by:
xreadGroupin interfaceStreamCommands
-
xadd
- Specified by:
xaddin interfaceStreamBinaryCommands
-
xlen
public long xlen(byte[] key) - Specified by:
xlenin interfaceStreamBinaryCommands
-
xrange
- Specified by:
xrangein interfaceStreamBinaryCommands
-
xrange
- Specified by:
xrangein interfaceStreamBinaryCommands
-
xrevrange
- Specified by:
xrevrangein interfaceStreamBinaryCommands
-
xrevrange
- Specified by:
xrevrangein interfaceStreamBinaryCommands
-
xack
public long xack(byte[] key, byte[] group, byte[]... ids) - Specified by:
xackin interfaceStreamBinaryCommands
-
xgroupCreate
- Specified by:
xgroupCreatein interfaceStreamBinaryCommands
-
xgroupSetID
- Specified by:
xgroupSetIDin interfaceStreamBinaryCommands
-
xgroupDestroy
public long xgroupDestroy(byte[] key, byte[] groupName) - Specified by:
xgroupDestroyin interfaceStreamBinaryCommands
-
xgroupCreateConsumer
public boolean xgroupCreateConsumer(byte[] key, byte[] groupName, byte[] consumerName) - Specified by:
xgroupCreateConsumerin interfaceStreamBinaryCommands
-
xgroupDelConsumer
public long xgroupDelConsumer(byte[] key, byte[] groupName, byte[] consumerName) - Specified by:
xgroupDelConsumerin interfaceStreamBinaryCommands
-
xdel
public long xdel(byte[] key, byte[]... ids) - Specified by:
xdelin interfaceStreamBinaryCommands
-
xtrim
public long xtrim(byte[] key, long maxLen, boolean approximateLength) - Specified by:
xtrimin interfaceStreamBinaryCommands
-
xtrim
- Specified by:
xtrimin interfaceStreamBinaryCommands
-
xpending
- Specified by:
xpendingin interfaceStreamBinaryCommands
-
xpending
public List<Object> xpending(byte[] key, byte[] groupName, byte[] start, byte[] end, int count, byte[] consumerName) - Specified by:
xpendingin interfaceStreamBinaryCommands
-
xpending
- Specified by:
xpendingin interfaceStreamBinaryCommands
-
xclaim
public List<byte[]> xclaim(byte[] key, byte[] group, byte[] consumerName, long minIdleTime, XClaimParams params, byte[]... ids) - Specified by:
xclaimin interfaceStreamBinaryCommands
-
xclaimJustId
public List<byte[]> xclaimJustId(byte[] key, byte[] group, byte[] consumerName, long minIdleTime, XClaimParams params, byte[]... ids) - Specified by:
xclaimJustIdin interfaceStreamBinaryCommands
-
xautoclaim
public List<Object> xautoclaim(byte[] key, byte[] groupName, byte[] consumerName, long minIdleTime, byte[] start, XAutoClaimParams params) - Specified by:
xautoclaimin interfaceStreamBinaryCommands
-
xautoclaimJustId
public List<Object> xautoclaimJustId(byte[] key, byte[] groupName, byte[] consumerName, long minIdleTime, byte[] start, XAutoClaimParams params) - Specified by:
xautoclaimJustIdin interfaceStreamBinaryCommands
-
xinfoStream
- Specified by:
xinfoStreamin interfaceStreamBinaryCommands
-
xinfoStreamFull
Description copied from interface:StreamBinaryCommandsIntrospection command used in order to retrieve all information about the stream- Specified by:
xinfoStreamFullin interfaceStreamBinaryCommands- Parameters:
key- Stream name
-
xinfoStreamFull
Description copied from interface:StreamBinaryCommandsIntrospection command used in order to retrieve all information about the stream- Specified by:
xinfoStreamFullin interfaceStreamBinaryCommands- Parameters:
key- Stream namecount- stream info count
-
xinfoGroup
Deprecated.- Specified by:
xinfoGroupin interfaceStreamBinaryCommands
-
xinfoGroups
- Specified by:
xinfoGroupsin interfaceStreamBinaryCommands
-
xinfoConsumers
- Specified by:
xinfoConsumersin interfaceStreamBinaryCommands
-
xread
- Specified by:
xreadin interfaceStreamBinaryCommands
-
xreadGroup
public List<Object> xreadGroup(byte[] groupName, byte[] consumer, XReadGroupParams xReadGroupParams, Map.Entry<byte[], byte[]>... streams) - Specified by:
xreadGroupin interfaceStreamBinaryCommands
-
eval
Description copied from interface:ScriptingKeyCommandsEval Command Use to evaluate scripts using the Lua interpreter built into Redis starting from version 2.6.0.- Specified by:
evalin interfaceScriptingKeyCommands- Parameters:
script- Lua 5.1 script. The script does not need to define a Lua function (and should not). It is just a Lua program that will run in the context of the Redis server.- Returns:
- The result of the evaluated script
-
eval
Description copied from interface:ScriptingKeyCommandsEval Command Use to evaluate scripts using the Lua interpreter built into Redis starting from version 2.6.0.- Specified by:
evalin interfaceScriptingKeyCommands- Parameters:
script- Lua 5.1 script. The script does not need to define a Lua function (and should not). It is just a Lua program that will run in the context of the Redis server.keyCount- the count of the provided keysparams- arguments that can be accessed from the script- Returns:
- The result of the evaluated script
-
eval
Description copied from interface:ScriptingKeyCommandsEval Command Use to evaluate scripts using the Lua interpreter built into Redis starting from version 2.6.0.- Specified by:
evalin interfaceScriptingKeyCommands- Parameters:
script- Lua 5.1 script. The script does not need to define a Lua function (and should not). It is just a Lua program that will run in the context of the Redis server.keys- arguments that can be accessed by the scriptargs- additional arguments should not represent key names and can be accessed by the script- Returns:
- The result of the evaluated script
-
evalReadonly
Description copied from interface:ScriptingKeyCommandsReadonly version ofEVAL- Specified by:
evalReadonlyin interfaceScriptingKeyCommands- Parameters:
script- Lua 5.1 script. The script does not need to define a Lua function (and should not). It is just a Lua program that will run in the context of the Redis server.keys- arguments that can be accessed by the scriptargs- additional arguments should not represent key names and can be accessed by the script- Returns:
- The result of the evaluated script
- See Also:
-
evalsha
Description copied from interface:ScriptingKeyCommandsEvalSha Command Similar toEVAL, but the script cached on the server side by its SHA1 digest. Scripts are cached on the server side using the SCRIPT LOAD command.- Specified by:
evalshain interfaceScriptingKeyCommands- Parameters:
sha1- the script- Returns:
- The result of the evaluated script
- See Also:
-
evalsha
Description copied from interface:ScriptingKeyCommandsEvalSha Command Similar toScriptingKeyCommands.eval(String, int, String...)EVAL}, but the script cached on the server side by its SHA1 digest. Scripts are cached on the server side using the SCRIPT LOAD command.- Specified by:
evalshain interfaceScriptingKeyCommands- Parameters:
sha1- the script- Returns:
- The result of the evaluated script
- See Also:
-
evalsha
Description copied from interface:ScriptingKeyCommandsEvalSha Command Similar toScriptingKeyCommands.eval(String, List, List)EVAL}, but the script cached on the server side by its SHA1 digest. Scripts are cached on the server side using the SCRIPT LOAD command.- Specified by:
evalshain interfaceScriptingKeyCommands- Parameters:
sha1- the script- Returns:
- The result of the evaluated script
- See Also:
-
evalshaReadonly
Description copied from interface:ScriptingKeyCommandsReadonly version ofEVAL- Specified by:
evalshaReadonlyin interfaceScriptingKeyCommands- Parameters:
sha1- the script- Returns:
- The result of the evaluated script
- See Also:
-
eval
- Specified by:
evalin interfaceScriptingKeyBinaryCommands
-
eval
- Specified by:
evalin interfaceScriptingKeyBinaryCommands
-
eval
- Specified by:
evalin interfaceScriptingKeyBinaryCommands
-
evalReadonly
- Specified by:
evalReadonlyin interfaceScriptingKeyBinaryCommands
-
evalsha
- Specified by:
evalshain interfaceScriptingKeyBinaryCommands
-
evalsha
- Specified by:
evalshain interfaceScriptingKeyBinaryCommands
-
evalsha
- Specified by:
evalshain interfaceScriptingKeyBinaryCommands
-
evalshaReadonly
- Specified by:
evalshaReadonlyin interfaceScriptingKeyBinaryCommands
-
fcall
Description copied from interface:FunctionCommandsInvoke a function.- Specified by:
fcallin interfaceFunctionCommands- Parameters:
name-keys-args-
-
fcallReadonly
Description copied from interface:FunctionCommandsThis is a read-only variant of theFCALLcommand that cannot execute commands that modify data.- Specified by:
fcallReadonlyin interfaceFunctionCommands
-
functionDelete
Description copied from interface:FunctionCommandsThis command deletes the library called library-name and all functions in it. If the library doesn't exist, the server returns an error.- Specified by:
functionDeletein interfaceFunctionCommands- Parameters:
libraryName-- Returns:
- OK
-
functionFlush
Description copied from interface:FunctionCommandsDeletes all the libraries, unless called with the optional mode argument, the 'lazyfree-lazy-user-flush' configuration directive sets the effective behavior.- Specified by:
functionFlushin interfaceFunctionBinaryCommands- Specified by:
functionFlushin interfaceFunctionCommands- Returns:
- OK
-
functionFlush
Description copied from interface:FunctionCommandsDeletes all the libraries, unless called with the optional mode argument, the 'lazyfree-lazy-user-flush' configuration directive sets the effective behavior.- Specified by:
functionFlushin interfaceFunctionBinaryCommands- Specified by:
functionFlushin interfaceFunctionCommands- Parameters:
mode- ASYNC: Asynchronously flush the libraries, SYNC: Synchronously flush the libraries.- Returns:
- OK
-
functionKill
Description copied from interface:FunctionCommandsKill a function that is currently executing. The command can be used only on functions that did not modify the dataset during their execution.- Specified by:
functionKillin interfaceFunctionBinaryCommands- Specified by:
functionKillin interfaceFunctionCommands- Returns:
- OK
-
functionList
Description copied from interface:FunctionCommandsReturn information about the functions and libraries.- Specified by:
functionListin interfaceFunctionCommands- Returns:
LibraryInfo
-
functionList
Description copied from interface:FunctionCommandsReturn information about the functions and libraries.- Specified by:
functionListin interfaceFunctionCommands- Parameters:
libraryNamePattern- a pattern for matching library names- Returns:
LibraryInfo
-
functionListWithCode
Description copied from interface:FunctionCommandsSimilar toFUNCTION LISTbut include the libraries source implementation in the reply.- Specified by:
functionListWithCodein interfaceFunctionCommands- Returns:
LibraryInfo- See Also:
-
functionListWithCode
Description copied from interface:FunctionCommandsSimilar toFUNCTION LISTbut include the libraries source implementation in the reply.- Specified by:
functionListWithCodein interfaceFunctionCommands- Parameters:
libraryNamePattern- a pattern for matching library names- Returns:
LibraryInfo- See Also:
-
functionLoad
Description copied from interface:FunctionCommandsLoad a library to Redis.The library payload must start with Shebang statement that provides a metadata about the library (like the engine to use and the library name). Shebang format:
#!<engine name> name=<library name>. Currently engine name must be lua.- Specified by:
functionLoadin interfaceFunctionCommands- Parameters:
functionCode- the source code.- Returns:
- The library name that was loaded
-
functionLoadReplace
Description copied from interface:FunctionCommandsLoad a library to Redis. Will replace the current library if it already exists.- Specified by:
functionLoadReplacein interfaceFunctionCommands- Parameters:
functionCode- the source code- Returns:
- The library name that was loaded
-
functionStats
Description copied from interface:FunctionCommandsReturn information about the function that's currently running and information about the available execution engines.- Specified by:
functionStatsin interfaceFunctionCommands- Returns:
FunctionStats
-
fcall
Description copied from interface:FunctionBinaryCommandsInvoke a function.- Specified by:
fcallin interfaceFunctionBinaryCommands- Parameters:
name-keys-args-- Returns:
-
fcallReadonly
- Specified by:
fcallReadonlyin interfaceFunctionBinaryCommands
-
functionDelete
Description copied from interface:FunctionBinaryCommandsThis command deletes the library called library-name and all functions in it. If the library doesn't exist, the server returns an error.- Specified by:
functionDeletein interfaceFunctionBinaryCommands- Parameters:
libraryName-- Returns:
- OK
-
functionDump
public byte[] functionDump()Description copied from interface:FunctionCommandsReturn the serialized payload of loaded libraries. You can restore the serialized payload later with theFUNCTION RESTOREcommand.- Specified by:
functionDumpin interfaceFunctionBinaryCommands- Specified by:
functionDumpin interfaceFunctionCommands- Returns:
- the serialized payload
-
functionListBinary
Description copied from interface:FunctionBinaryCommandsReturn information about the functions and libraries.- Specified by:
functionListBinaryin interfaceFunctionBinaryCommands- Returns:
LibraryInfo
-
functionList
Description copied from interface:FunctionBinaryCommandsReturn information about the functions and libraries.- Specified by:
functionListin interfaceFunctionBinaryCommands- Parameters:
libraryNamePattern- a pattern for matching library names- Returns:
LibraryInfo
-
functionListWithCodeBinary
Description copied from interface:FunctionBinaryCommandsSimilar toFUNCTION LISTbut include the libraries source implementation in the reply.- Specified by:
functionListWithCodeBinaryin interfaceFunctionBinaryCommands- Returns:
LibraryInfo- See Also:
-
functionListWithCode
Description copied from interface:FunctionBinaryCommandsSimilar toFUNCTION LISTbut include the libraries source implementation in the reply.- Specified by:
functionListWithCodein interfaceFunctionBinaryCommands- Parameters:
libraryNamePattern- a pattern for matching library names- Returns:
LibraryInfo- See Also:
-
functionLoad
Description copied from interface:FunctionBinaryCommandsLoad a library to Redis.The library payload must start with Shebang statement that provides a metadata about the library (like the engine to use and the library name). Shebang format:
#!<engine name> name=<library name>. Currently engine name must be lua.- Specified by:
functionLoadin interfaceFunctionBinaryCommands- Parameters:
functionCode- the source code.- Returns:
- The library name that was loaded
-
functionLoadReplace
Description copied from interface:FunctionBinaryCommandsLoad a library to Redis. Will replace the current library if it already exists.- Specified by:
functionLoadReplacein interfaceFunctionBinaryCommands- Parameters:
functionCode- the source code- Returns:
- The library name that was loaded
-
functionRestore
Description copied from interface:FunctionCommandsRestore libraries from the serialized payload. Default policy is APPEND.- Specified by:
functionRestorein interfaceFunctionBinaryCommands- Specified by:
functionRestorein interfaceFunctionCommands- Parameters:
serializedValue- the serialized payload- Returns:
- OK
-
functionRestore
Description copied from interface:FunctionCommandsRestore libraries from the serialized payload.- Specified by:
functionRestorein interfaceFunctionBinaryCommands- Specified by:
functionRestorein interfaceFunctionCommands- Parameters:
serializedValue- the serialized payloadpolicy- can beFLUSH, APPEND or REPLACE- Returns:
- OK
-
functionStatsBinary
Description copied from interface:FunctionBinaryCommandsReturn information about the function that's currently running and information about the available execution engines.- Specified by:
functionStatsBinaryin interfaceFunctionBinaryCommands- Returns:
FunctionStats
-
objectRefcount
Description copied from interface:KeyCommandsObject Refcount Command Return the reference count of the stored at key.Time complexity: O(1)
- Specified by:
objectRefcountin interfaceKeyCommands- Parameters:
key-- Returns:
- The number of references
-
objectEncoding
Description copied from interface:KeyCommandsObject Encoding Command Return the internal encoding for the Redis object stored at key.Time complexity: O(1)
- Specified by:
objectEncodingin interfaceKeyCommands- Parameters:
key-- Returns:
- The encoding of the object
-
objectIdletime
Description copied from interface:KeyCommandsObject IdleTime Command Return the time in seconds since the last access to the value stored at key.Time complexity: O(1)
- Specified by:
objectIdletimein interfaceKeyCommands- Parameters:
key-- Returns:
- The idle time in seconds
-
objectFreq
Description copied from interface:KeyCommandsObject Freq Command Return the logarithmic access frequency counter of a Redis object stored at key.Time complexity: O(1)
- Specified by:
objectFreqin interfaceKeyCommands- Parameters:
key-- Returns:
- The counter's value
-
objectRefcount
- Specified by:
objectRefcountin interfaceKeyBinaryCommands
-
objectEncoding
public byte[] objectEncoding(byte[] key) - Specified by:
objectEncodingin interfaceKeyBinaryCommands
-
objectIdletime
- Specified by:
objectIdletimein interfaceKeyBinaryCommands
-
objectFreq
- Specified by:
objectFreqin interfaceKeyBinaryCommands
-
migrate
Description copied from interface:KeyCommandsMigrate Command Atomically transfer a key from a source Redis instance to a destination Redis instance. On success the key is deleted from the original instance and is guaranteed to exist in the target instance.- Specified by:
migratein interfaceKeyCommands- Parameters:
host-port-key-timeout- the maximum idle time in any moment of the communication with the destination instance in milliseconds.- Returns:
- OK on success, or NOKEY if no keys were found in the source instance.
-
migrate
Description copied from interface:KeyCommandsMigrate Command Atomically transfer a key from a source Redis instance to a destination Redis instance. On success the key is deleted from the original instance and is guaranteed to exist in the target instance.- Specified by:
migratein interfaceKeyCommands- Parameters:
host-port-timeout- the maximum idle time in any moment of the communication with the destination instance in milliseconds.params-MigrateParamskeys-- Returns:
- OK on success, or NOKEY if no keys were found in the source instance.
-
migrate
- Specified by:
migratein interfaceKeyBinaryCommands
-
migrate
- Specified by:
migratein interfaceKeyBinaryCommands
-
waitReplicas
- Specified by:
waitReplicasin interfaceSampleKeyedCommands
-
waitReplicas
public long waitReplicas(byte[] sampleKey, int replicas, long timeout) - Specified by:
waitReplicasin interfaceSampleBinaryKeyedCommands
-
waitAOF
- Specified by:
waitAOFin interfaceSampleKeyedCommands
-
waitAOF
- Specified by:
waitAOFin interfaceSampleBinaryKeyedCommands
-
eval
- Specified by:
evalin interfaceSampleKeyedCommands
-
evalsha
- Specified by:
evalshain interfaceSampleKeyedCommands
-
eval
- Specified by:
evalin interfaceSampleBinaryKeyedCommands
-
evalsha
- Specified by:
evalshain interfaceSampleBinaryKeyedCommands
-
scriptExists
-
scriptExists
- Specified by:
scriptExistsin interfaceSampleKeyedCommands
-
scriptExists
- Specified by:
scriptExistsin interfaceSampleKeyedCommands
-
scriptExists
- Specified by:
scriptExistsin interfaceSampleBinaryKeyedCommands
-
scriptExists
- Specified by:
scriptExistsin interfaceSampleBinaryKeyedCommands
-
scriptLoad
-
scriptLoad
- Specified by:
scriptLoadin interfaceSampleKeyedCommands
-
scriptFlush
-
scriptFlush
- Specified by:
scriptFlushin interfaceSampleKeyedCommands
-
scriptFlush
- Specified by:
scriptFlushin interfaceSampleKeyedCommands
-
scriptKill
-
scriptKill
- Specified by:
scriptKillin interfaceSampleKeyedCommands
-
scriptLoad
public byte[] scriptLoad(byte[] script, byte[] sampleKey) - Specified by:
scriptLoadin interfaceSampleBinaryKeyedCommands
-
scriptFlush
- Specified by:
scriptFlushin interfaceSampleBinaryKeyedCommands
-
scriptFlush
- Specified by:
scriptFlushin interfaceSampleBinaryKeyedCommands
-
scriptKill
- Specified by:
scriptKillin interfaceSampleBinaryKeyedCommands
-
slowlogReset
-
publish
-
publish
public long publish(byte[] channel, byte[] message) -
subscribe
-
psubscribe
-
subscribe
-
psubscribe
-
strAlgoLCSStrings
-
strAlgoLCSStrings
-
hsetObject
-
hsetObject
-
ftCreate
- Specified by:
ftCreatein interfaceRediSearchCommands
-
ftCreate
public String ftCreate(String indexName, FTCreateParams createParams, Iterable<SchemaField> schemaFields) - Specified by:
ftCreatein interfaceRediSearchCommands
-
ftAlter
- Specified by:
ftAlterin interfaceRediSearchCommands
-
ftAlter
- Specified by:
ftAlterin interfaceRediSearchCommands
-
ftSearch
- Specified by:
ftSearchin interfaceRediSearchCommands
-
ftSearch
- Specified by:
ftSearchin interfaceRediSearchCommands
-
ftSearchIteration
public FtSearchIteration ftSearchIteration(int batchSize, String indexName, String query, FTSearchParams params) FTSearchParams.limit(int, int)will be ignored.- Parameters:
batchSize- batch sizeindexName- index namequery- queryparams- limit will be ignored- Returns:
- search iteration
-
ftSearch
- Specified by:
ftSearchin interfaceRediSearchCommands
-
ftSearchIteration
Query.limit(java.lang.Integer, java.lang.Integer)will be ignored.- Parameters:
batchSize- batch sizeindexName- index namequery- limit will be ignored- Returns:
- search iteration
-
ftSearch
- Specified by:
ftSearchin interfaceRediSearchCommands
-
ftExplain
- Specified by:
ftExplainin interfaceRediSearchCommands
-
ftExplainCLI
- Specified by:
ftExplainCLIin interfaceRediSearchCommands
-
ftAggregate
- Specified by:
ftAggregatein interfaceRediSearchCommands
-
ftCursorRead
- Specified by:
ftCursorReadin interfaceRediSearchCommands
-
ftCursorDel
- Specified by:
ftCursorDelin interfaceRediSearchCommands
-
ftAggregateIteration
CURSORmust be set.- Parameters:
indexName- index nameaggr- cursor must be set- Returns:
- aggregate iteration
-
ftProfileAggregate
public Map.Entry<AggregationResult,Map<String, ftProfileAggregateObject>> (String indexName, FTProfileParams profileParams, AggregationBuilder aggr) - Specified by:
ftProfileAggregatein interfaceRediSearchCommands
-
ftProfileSearch
public Map.Entry<SearchResult,Map<String, ftProfileSearchObject>> (String indexName, FTProfileParams profileParams, Query query) - Specified by:
ftProfileSearchin interfaceRediSearchCommands
-
ftProfileSearch
public Map.Entry<SearchResult,Map<String, ftProfileSearchObject>> (String indexName, FTProfileParams profileParams, String query, FTSearchParams searchParams) - Specified by:
ftProfileSearchin interfaceRediSearchCommands
-
ftDropIndex
- Specified by:
ftDropIndexin interfaceRediSearchCommands
-
ftDropIndexDD
- Specified by:
ftDropIndexDDin interfaceRediSearchCommands
-
ftSynUpdate
- Specified by:
ftSynUpdatein interfaceRediSearchCommands
-
ftSynDump
- Specified by:
ftSynDumpin interfaceRediSearchCommands
-
ftDictAdd
- Specified by:
ftDictAddin interfaceRediSearchCommands
-
ftDictDel
- Specified by:
ftDictDelin interfaceRediSearchCommands
-
ftDictDump
- Specified by:
ftDictDumpin interfaceRediSearchCommands
-
ftDictAddBySampleKey
- Specified by:
ftDictAddBySampleKeyin interfaceRediSearchCommands
-
ftDictDelBySampleKey
- Specified by:
ftDictDelBySampleKeyin interfaceRediSearchCommands
-
ftDictDumpBySampleKey
- Specified by:
ftDictDumpBySampleKeyin interfaceRediSearchCommands
-
ftSpellCheck
- Specified by:
ftSpellCheckin interfaceRediSearchCommands
-
ftSpellCheck
public Map<String,Map<String, ftSpellCheckDouble>> (String index, String query, FTSpellCheckParams spellCheckParams) - Specified by:
ftSpellCheckin interfaceRediSearchCommands
-
ftInfo
- Specified by:
ftInfoin interfaceRediSearchCommands
-
ftTagVals
- Specified by:
ftTagValsin interfaceRediSearchCommands
-
ftAliasAdd
- Specified by:
ftAliasAddin interfaceRediSearchCommands
-
ftAliasUpdate
- Specified by:
ftAliasUpdatein interfaceRediSearchCommands
-
ftAliasDel
- Specified by:
ftAliasDelin interfaceRediSearchCommands
-
ftConfigGet
- Specified by:
ftConfigGetin interfaceRediSearchCommands
-
ftConfigGet
- Specified by:
ftConfigGetin interfaceRediSearchCommands
-
ftConfigSet
- Specified by:
ftConfigSetin interfaceRediSearchCommands
-
ftConfigSet
- Specified by:
ftConfigSetin interfaceRediSearchCommands
-
ftSugAdd
- Specified by:
ftSugAddin interfaceRediSearchCommands
-
ftSugAddIncr
- Specified by:
ftSugAddIncrin interfaceRediSearchCommands
-
ftSugGet
- Specified by:
ftSugGetin interfaceRediSearchCommands
-
ftSugGet
- Specified by:
ftSugGetin interfaceRediSearchCommands
-
ftSugGetWithScores
- Specified by:
ftSugGetWithScoresin interfaceRediSearchCommands
-
ftSugGetWithScores
- Specified by:
ftSugGetWithScoresin interfaceRediSearchCommands
-
ftSugDel
- Specified by:
ftSugDelin interfaceRediSearchCommands
-
ftSugLen
- Specified by:
ftSugLenin interfaceRediSearchCommands
-
ftList
- Specified by:
ftListin interfaceRediSearchCommands
-
jsonSet
- Specified by:
jsonSetin interfaceRedisJsonCommands
-
jsonSetWithEscape
- Specified by:
jsonSetWithEscapein interfaceRedisJsonCommands
-
jsonSet
- Specified by:
jsonSetin interfaceRedisJsonCommands
-
jsonSetWithPlainString
- Specified by:
jsonSetWithPlainStringin interfaceRedisJsonCommands
-
jsonSet
- Specified by:
jsonSetin interfaceRedisJsonCommands
-
jsonSetWithEscape
- Specified by:
jsonSetWithEscapein interfaceRedisJsonCommands
-
jsonSet
- Specified by:
jsonSetin interfaceRedisJsonCommands
-
jsonGet
- Specified by:
jsonGetin interfaceRedisJsonCommands
-
jsonGet
- Specified by:
jsonGetin interfaceRedisJsonCommands
-
jsonGet
- Specified by:
jsonGetin interfaceRedisJsonCommands
-
jsonGet
- Specified by:
jsonGetin interfaceRedisJsonCommands
-
jsonGetAsPlainString
- Specified by:
jsonGetAsPlainStringin interfaceRedisJsonCommands
-
jsonGet
- Specified by:
jsonGetin interfaceRedisJsonCommands
-
jsonMGet
- Specified by:
jsonMGetin interfaceRedisJsonCommands
-
jsonMGet
- Specified by:
jsonMGetin interfaceRedisJsonCommands
-
jsonDel
- Specified by:
jsonDelin interfaceRedisJsonCommands
-
jsonDel
- Specified by:
jsonDelin interfaceRedisJsonCommands
-
jsonDel
- Specified by:
jsonDelin interfaceRedisJsonCommands
-
jsonClear
- Specified by:
jsonClearin interfaceRedisJsonCommands
-
jsonClear
- Specified by:
jsonClearin interfaceRedisJsonCommands
-
jsonClear
- Specified by:
jsonClearin interfaceRedisJsonCommands
-
jsonToggle
- Specified by:
jsonTogglein interfaceRedisJsonCommands
-
jsonToggle
- Specified by:
jsonTogglein interfaceRedisJsonCommands
-
jsonType
- Specified by:
jsonTypein interfaceRedisJsonCommands
-
jsonType
- Specified by:
jsonTypein interfaceRedisJsonCommands
-
jsonType
- Specified by:
jsonTypein interfaceRedisJsonCommands
-
jsonStrAppend
- Specified by:
jsonStrAppendin interfaceRedisJsonCommands
-
jsonStrAppend
- Specified by:
jsonStrAppendin interfaceRedisJsonCommands
-
jsonStrAppend
- Specified by:
jsonStrAppendin interfaceRedisJsonCommands
-
jsonStrLen
- Specified by:
jsonStrLenin interfaceRedisJsonCommands
-
jsonStrLen
- Specified by:
jsonStrLenin interfaceRedisJsonCommands
-
jsonStrLen
- Specified by:
jsonStrLenin interfaceRedisJsonCommands
-
jsonNumIncrBy
- Specified by:
jsonNumIncrByin interfaceRedisJsonCommands
-
jsonNumIncrBy
- Specified by:
jsonNumIncrByin interfaceRedisJsonCommands
-
jsonArrAppend
- Specified by:
jsonArrAppendin interfaceRedisJsonCommands
-
jsonArrAppendWithEscape
- Specified by:
jsonArrAppendWithEscapein interfaceRedisJsonCommands
-
jsonArrAppend
- Specified by:
jsonArrAppendin interfaceRedisJsonCommands
-
jsonArrIndex
- Specified by:
jsonArrIndexin interfaceRedisJsonCommands
-
jsonArrIndexWithEscape
- Specified by:
jsonArrIndexWithEscapein interfaceRedisJsonCommands
-
jsonArrIndex
- Specified by:
jsonArrIndexin interfaceRedisJsonCommands
-
jsonArrInsert
- Specified by:
jsonArrInsertin interfaceRedisJsonCommands
-
jsonArrInsertWithEscape
- Specified by:
jsonArrInsertWithEscapein interfaceRedisJsonCommands
-
jsonArrInsert
- Specified by:
jsonArrInsertin interfaceRedisJsonCommands
-
jsonArrPop
- Specified by:
jsonArrPopin interfaceRedisJsonCommands
-
jsonArrPop
- Specified by:
jsonArrPopin interfaceRedisJsonCommands
-
jsonArrPop
- Specified by:
jsonArrPopin interfaceRedisJsonCommands
-
jsonArrPop
- Specified by:
jsonArrPopin interfaceRedisJsonCommands
-
jsonArrPop
- Specified by:
jsonArrPopin interfaceRedisJsonCommands
-
jsonArrPop
- Specified by:
jsonArrPopin interfaceRedisJsonCommands
-
jsonArrPop
- Specified by:
jsonArrPopin interfaceRedisJsonCommands
-
jsonArrPop
- Specified by:
jsonArrPopin interfaceRedisJsonCommands
-
jsonArrLen
- Specified by:
jsonArrLenin interfaceRedisJsonCommands
-
jsonArrLen
- Specified by:
jsonArrLenin interfaceRedisJsonCommands
-
jsonArrLen
- Specified by:
jsonArrLenin interfaceRedisJsonCommands
-
jsonArrTrim
- Specified by:
jsonArrTrimin interfaceRedisJsonCommands
-
jsonArrTrim
- Specified by:
jsonArrTrimin interfaceRedisJsonCommands
-
jsonObjLen
- Specified by:
jsonObjLenin interfaceRedisJsonCommands
-
jsonObjLen
- Specified by:
jsonObjLenin interfaceRedisJsonCommands
-
jsonObjLen
- Specified by:
jsonObjLenin interfaceRedisJsonCommands
-
jsonObjKeys
- Specified by:
jsonObjKeysin interfaceRedisJsonCommands
-
jsonObjKeys
- Specified by:
jsonObjKeysin interfaceRedisJsonCommands
-
jsonObjKeys
- Specified by:
jsonObjKeysin interfaceRedisJsonCommands
-
jsonDebugMemory
- Specified by:
jsonDebugMemoryin interfaceRedisJsonCommands
-
jsonDebugMemory
- Specified by:
jsonDebugMemoryin interfaceRedisJsonCommands
-
jsonDebugMemory
- Specified by:
jsonDebugMemoryin interfaceRedisJsonCommands
-
jsonResp
Deprecated.- Specified by:
jsonRespin interfaceRedisJsonCommands
-
jsonResp
Deprecated.- Specified by:
jsonRespin interfaceRedisJsonCommands
-
jsonResp
Deprecated.- Specified by:
jsonRespin interfaceRedisJsonCommands
-
tsCreate
Description copied from interface:RedisTimeSeriesCommandsTS.CREATE key- Specified by:
tsCreatein interfaceRedisTimeSeriesCommands- Parameters:
key-
-
tsCreate
Description copied from interface:RedisTimeSeriesCommandsTS.CREATE key [RETENTION retentionTime] [ENCODING [UNCOMPRESSED|COMPRESSED]] [CHUNK_SIZE size] [DUPLICATE_POLICY policy] [LABELS label value..]- Specified by:
tsCreatein interfaceRedisTimeSeriesCommands- Parameters:
key-createParams-
-
tsDel
Description copied from interface:RedisTimeSeriesCommandsTS.DEL key fromTimestamp toTimestamp- Specified by:
tsDelin interfaceRedisTimeSeriesCommands- Parameters:
key-fromTimestamp-toTimestamp-- Returns:
- The number of samples that were removed
-
tsAlter
Description copied from interface:RedisTimeSeriesCommandsTS.ALTER key [RETENTION retentionTime] [LABELS label value..]- Specified by:
tsAlterin interfaceRedisTimeSeriesCommands- Parameters:
key-alterParams-- Returns:
- OK
-
tsAdd
Description copied from interface:RedisTimeSeriesCommandsTS.ADD key * value- Specified by:
tsAddin interfaceRedisTimeSeriesCommands- Parameters:
key-value-- Returns:
- timestamp
-
tsAdd
Description copied from interface:RedisTimeSeriesCommandsTS.ADD key timestamp value- Specified by:
tsAddin interfaceRedisTimeSeriesCommands- Parameters:
key-timestamp-value-- Returns:
- timestamp
-
tsAdd
Description copied from interface:RedisTimeSeriesCommandsTS.ADD key timestamp value [RETENTION retentionTime] [ENCODING [COMPRESSED|UNCOMPRESSED]] [CHUNK_SIZE size] [ON_DUPLICATE policy] [LABELS label value..]- Specified by:
tsAddin interfaceRedisTimeSeriesCommands- Parameters:
key-timestamp-value-createParams-- Returns:
- timestamp
-
tsMAdd
Description copied from interface:RedisTimeSeriesCommandsTS.MADD key timestamp value [key timestamp value ...]- Specified by:
tsMAddin interfaceRedisTimeSeriesCommands- Parameters:
entries- key, timestamp, value- Returns:
- timestamps
-
tsIncrBy
- Specified by:
tsIncrByin interfaceRedisTimeSeriesCommands
-
tsIncrBy
- Specified by:
tsIncrByin interfaceRedisTimeSeriesCommands
-
tsDecrBy
- Specified by:
tsDecrByin interfaceRedisTimeSeriesCommands
-
tsDecrBy
- Specified by:
tsDecrByin interfaceRedisTimeSeriesCommands
-
tsRange
Description copied from interface:RedisTimeSeriesCommandsTS.RANGE key fromTimestamp toTimestamp- Specified by:
tsRangein interfaceRedisTimeSeriesCommands- Parameters:
key-fromTimestamp-toTimestamp-- Returns:
- range elements
-
tsRange
Description copied from interface:RedisTimeSeriesCommandsTS.RANGE key fromTimestamp toTimestamp [LATEST] [FILTER_BY_TS ts...] [FILTER_BY_VALUE min max] [COUNT count] [[ALIGN value] AGGREGATION aggregator bucketDuration [BUCKETTIMESTAMP bt] [EMPTY]]- Specified by:
tsRangein interfaceRedisTimeSeriesCommands- Parameters:
key-rangeParams-- Returns:
- range elements
-
tsRevRange
Description copied from interface:RedisTimeSeriesCommandsTS.REVRANGE key fromTimestamp toTimestamp- Specified by:
tsRevRangein interfaceRedisTimeSeriesCommands- Parameters:
key-fromTimestamp-toTimestamp-- Returns:
- range elements
-
tsRevRange
Description copied from interface:RedisTimeSeriesCommandsTS.REVRANGE key fromTimestamp toTimestamp [LATEST] [FILTER_BY_TS TS...] [FILTER_BY_VALUE min max] [COUNT count] [[ALIGN value] AGGREGATION aggregator bucketDuration [BUCKETTIMESTAMP bt] [EMPTY]]- Specified by:
tsRevRangein interfaceRedisTimeSeriesCommands- Parameters:
key-rangeParams-- Returns:
- range elements
-
tsMRange
Description copied from interface:RedisTimeSeriesCommandsTS.MRANGE fromTimestamp toTimestamp FILTER filter...- Specified by:
tsMRangein interfaceRedisTimeSeriesCommands- Parameters:
fromTimestamp-toTimestamp-filters-- Returns:
- multi range elements
-
tsMRange
Description copied from interface:RedisTimeSeriesCommandsTS.MRANGE fromTimestamp toTimestamp [LATEST] [FILTER_BY_TS ts...] [FILTER_BY_VALUE min max] [WITHLABELS | SELECTED_LABELS label...] [COUNT count] [[ALIGN value] AGGREGATION aggregator bucketDuration [BUCKETTIMESTAMP bt] [EMPTY]] FILTER filter... [GROUPBY label REDUCE reducer]- Specified by:
tsMRangein interfaceRedisTimeSeriesCommands- Parameters:
multiRangeParams-- Returns:
- multi range elements
-
tsMRevRange
Description copied from interface:RedisTimeSeriesCommandsTS.MREVRANGE fromTimestamp toTimestamp FILTER filter...- Specified by:
tsMRevRangein interfaceRedisTimeSeriesCommands- Parameters:
fromTimestamp-toTimestamp-filters-- Returns:
- multi range elements
-
tsMRevRange
Description copied from interface:RedisTimeSeriesCommandsTS.MREVRANGE fromTimestamp toTimestamp [LATEST] [FILTER_BY_TS TS...] [FILTER_BY_VALUE min max] [WITHLABELS | SELECTED_LABELS label...] [COUNT count] [[ALIGN value] AGGREGATION aggregator bucketDuration [BUCKETTIMESTAMP bt] [EMPTY]] FILTER filter... [GROUPBY label REDUCE reducer]- Specified by:
tsMRevRangein interfaceRedisTimeSeriesCommands- Parameters:
multiRangeParams-- Returns:
- multi range elements
-
tsGet
Description copied from interface:RedisTimeSeriesCommandsTS.GET key- Specified by:
tsGetin interfaceRedisTimeSeriesCommands- Parameters:
key- the key- Returns:
- the element
-
tsGet
Description copied from interface:RedisTimeSeriesCommandsTS.GET key [LATEST]- Specified by:
tsGetin interfaceRedisTimeSeriesCommands- Parameters:
key- the keygetParams- optional arguments- Returns:
- the element
-
tsMGet
Description copied from interface:RedisTimeSeriesCommandsTS.MGET [LATEST] [ WITHLABELS | SELECTED_LABELS label...] FILTER filter...- Specified by:
tsMGetin interfaceRedisTimeSeriesCommands- Parameters:
multiGetParams- optional argumentsfilters- secondary indexes- Returns:
- multi get elements
-
tsCreateRule
public String tsCreateRule(String sourceKey, String destKey, AggregationType aggregationType, long timeBucket) Description copied from interface:RedisTimeSeriesCommandsTS.CREATERULE sourceKey destKey AGGREGATION aggregationType timeBucket- Specified by:
tsCreateRulein interfaceRedisTimeSeriesCommands- Parameters:
sourceKey-destKey-aggregationType-timeBucket-
-
tsCreateRule
public String tsCreateRule(String sourceKey, String destKey, AggregationType aggregationType, long bucketDuration, long alignTimestamp) Description copied from interface:RedisTimeSeriesCommandsTS.CREATERULE sourceKey destKey AGGREGATION aggregationType bucketDuration [alignTimestamp]- Specified by:
tsCreateRulein interfaceRedisTimeSeriesCommands- Parameters:
sourceKey-destKey-aggregationType-bucketDuration-alignTimestamp-
-
tsDeleteRule
Description copied from interface:RedisTimeSeriesCommandsTS.DELETERULE sourceKey destKey- Specified by:
tsDeleteRulein interfaceRedisTimeSeriesCommands- Parameters:
sourceKey-destKey-
-
tsQueryIndex
Description copied from interface:RedisTimeSeriesCommandsTS.QUERYINDEX filter...- Specified by:
tsQueryIndexin interfaceRedisTimeSeriesCommands- Parameters:
filters-- Returns:
- list of timeseries keys
-
tsInfo
- Specified by:
tsInfoin interfaceRedisTimeSeriesCommands
-
tsInfoDebug
- Specified by:
tsInfoDebugin interfaceRedisTimeSeriesCommands
-
bfReserve
Description copied from interface:BloomFilterCommandsBF.RESERVE {key} {error_rate} {capacity}- Specified by:
bfReservein interfaceBloomFilterCommands- Parameters:
key-errorRate-capacity-- Returns:
- OK
-
bfReserve
Description copied from interface:BloomFilterCommandsBF.RESERVE {key} {error_rate} {capacity} [EXPANSION {expansion}] [NONSCALING]- Specified by:
bfReservein interfaceBloomFilterCommands- Parameters:
key-errorRate-capacity-reserveParams-- Returns:
- OK
-
bfAdd
Description copied from interface:BloomFilterCommandsBF.ADD {key} {item}- Specified by:
bfAddin interfaceBloomFilterCommands- Parameters:
key-item-
-
bfMAdd
Description copied from interface:BloomFilterCommandsBF.MADD {key} {item ...}- Specified by:
bfMAddin interfaceBloomFilterCommands- Parameters:
key-items-
-
bfInsert
Description copied from interface:BloomFilterCommandsBF.INSERT {key} ITEMS {item ...}- Specified by:
bfInsertin interfaceBloomFilterCommands- Parameters:
key-items-
-
bfInsert
Description copied from interface:BloomFilterCommandsBF.INSERT {key} [CAPACITY {cap}] [ERROR {error}] [EXPANSION {expansion}] [NOCREATE] [NONSCALING] ITEMS {item ...}- Specified by:
bfInsertin interfaceBloomFilterCommands- Parameters:
key-insertParams-items-
-
bfExists
Description copied from interface:BloomFilterCommandsBF.EXISTS {key} {item}- Specified by:
bfExistsin interfaceBloomFilterCommands- Parameters:
key-item-- Returns:
- if the item may exist
-
bfMExists
Description copied from interface:BloomFilterCommandsBF.MEXISTS {key} {item ...}- Specified by:
bfMExistsin interfaceBloomFilterCommands- Parameters:
key-items-
-
bfScanDump
Description copied from interface:BloomFilterCommandsBF.SCANDUMP {key} {iterator}- Specified by:
bfScanDumpin interfaceBloomFilterCommands- Parameters:
key-iterator-- Returns:
- Pair of next iterator and current data
-
bfLoadChunk
Description copied from interface:BloomFilterCommandsBF.LOADCHUNK {key} {iterator} {data}- Specified by:
bfLoadChunkin interfaceBloomFilterCommands- Parameters:
key-iterator-data-- Returns:
- OK
-
bfCard
- Specified by:
bfCardin interfaceBloomFilterCommands
-
bfInfo
- Specified by:
bfInfoin interfaceBloomFilterCommands
-
cfReserve
Description copied from interface:CuckooFilterCommandsCF.RESERVE Creates a Cuckoo Filter under key with the given parameters- Specified by:
cfReservein interfaceCuckooFilterCommands- Parameters:
key- The name of the filtercapacity-- Returns:
- OK
-
cfReserve
Description copied from interface:CuckooFilterCommandsCF.RESERVE Creates a Cuckoo Filter under key with the given parameters- Specified by:
cfReservein interfaceCuckooFilterCommands- Parameters:
key- The name of the filtercapacity-reserveParams- An instance of CFReserveParams containing the options- Returns:
- OK
-
cfAdd
Description copied from interface:CuckooFilterCommandsCF.ADD Adds an item to the cuckoo filter, creating the filter if it does not exist- Specified by:
cfAddin interfaceCuckooFilterCommands- Parameters:
key- The name of the filteritem- The item to add- Returns:
- true on success, false otherwise
-
cfAddNx
Description copied from interface:CuckooFilterCommandsCF.ADDNX Adds an item to the cuckoo filter, only if it does not exist yet- Specified by:
cfAddNxin interfaceCuckooFilterCommands- Parameters:
key- The name of the filteritem- The item to add- Returns:
- true if the item was added to the filter, false if the item already exists.
-
cfInsert
Description copied from interface:CuckooFilterCommandsCF.INSERT Adds one or more items to a cuckoo filter, creating it if it does not exist yet.- Specified by:
cfInsertin interfaceCuckooFilterCommands- Parameters:
key- The name of the filteritems- One or more items to add- Returns:
- true if the item was successfully inserted, false if an error occurred
-
cfInsert
Description copied from interface:CuckooFilterCommandsCF.INSERT Adds one or more items to a cuckoo filter, using the passed options- Specified by:
cfInsertin interfaceCuckooFilterCommands- Parameters:
key- The name of the filterinsertParams- An instance of CFInsertParams containing the optionsitems- One or more items to add- Returns:
- true if the item was successfully inserted, false if an error occurred
-
cfInsertNx
Description copied from interface:CuckooFilterCommandsCF.INSERTNX Adds one or more items to a cuckoo filter, only if it does not exist yet- Specified by:
cfInsertNxin interfaceCuckooFilterCommands- Parameters:
key- The name of the filteritems- One or more items to add- Returns:
- true if the item was added to the filter, false if the item already exists.
-
cfInsertNx
Description copied from interface:CuckooFilterCommandsCF.INSERTNX Adds one or more items to a cuckoo filter, using the passed options- Specified by:
cfInsertNxin interfaceCuckooFilterCommands- Parameters:
key- The name of the filterinsertParams- An instance of CFInsertParams containing the options (CAPACITY/NOCREATE)items- One or more items to add- Returns:
- true if the item was added to the filter, false if the item already exists.
-
cfExists
Description copied from interface:CuckooFilterCommandsCF.EXISTS Check if an item exists in a Cuckoo Filter- Specified by:
cfExistsin interfaceCuckooFilterCommands- Parameters:
key- The name of the filteritem- The item to check for- Returns:
- false if the item certainly does not exist, true if the item may exist.
-
cfMExists
Description copied from interface:CuckooFilterCommandsCF.MEXISTS {key} {item ...}- Specified by:
cfMExistsin interfaceCuckooFilterCommands- Parameters:
key- The name of the filteritems- Items to check for (non empty sequence)- Returns:
- a list of booleans where false if the item certainly does not exist, true if the item may exist.
-
cfDel
Description copied from interface:CuckooFilterCommandsCF.DEL Deletes an item once from the filter. If the item exists only once, it will be removed from the filter. If the item was added multiple times, it will still be present.- Specified by:
cfDelin interfaceCuckooFilterCommands- Parameters:
key- The name of the filteritem- The item to delete from the filter- Returns:
- true if the item has been deleted, false if the item was not found.
-
cfCount
Description copied from interface:CuckooFilterCommandsCF.COUNT Returns the number of times an item may be in the filter.- Specified by:
cfCountin interfaceCuckooFilterCommands- Parameters:
key- The name of the filteritem- The item to count- Returns:
- The number of times the item exists in the filter
-
cfScanDump
Description copied from interface:CuckooFilterCommandsCF.SCANDUMP Begins an incremental save of the cuckoo filter. This is useful for large cuckoo filters which cannot fit into the normal SAVE and RESTORE model. The Iterator is passed as input to the next invocation of SCANDUMP . If Iterator is 0, the iteration has completed.- Specified by:
cfScanDumpin interfaceCuckooFilterCommands- Parameters:
key- Name of the filteriterator- This is either 0, or the iterator from a previous invocation of this command- Returns:
- a Map.Entry containing the Iterator and Data.
-
cfLoadChunk
Description copied from interface:CuckooFilterCommandsCF.LOADCHUNK Restores a filter previously saved using SCANDUMP.- Specified by:
cfLoadChunkin interfaceCuckooFilterCommands- Parameters:
key- Name of the filter to restoreiterator- Iterator from CF.SCANDUMPdata- Data from CF.SCANDUMP- Returns:
- OK
-
cfInfo
Description copied from interface:CuckooFilterCommandsCF.INFO Return information about filter- Specified by:
cfInfoin interfaceCuckooFilterCommands- Parameters:
key- Name of the filter to restore- Returns:
- A Map containing Size, Number of buckets, Number of filter, Number of items inserted, Number of items deleted, Bucket size, Expansion rate, Max iteration
-
cmsInitByDim
Description copied from interface:CountMinSketchCommandsCMS.INITBYDIM Initializes a Count-Min Sketch to dimensions specified by user.- Specified by:
cmsInitByDimin interfaceCountMinSketchCommands- Parameters:
key- The name of the sketchwidth- Number of counter in each array. Reduces the error sizedepth- Number of counter-arrays. Reduces the probability for an error of a certain size (percentage of total count- Returns:
- OK
-
cmsInitByProb
Description copied from interface:CountMinSketchCommandsCMS.INITBYPROB Initializes a Count-Min Sketch to accommodate requested capacity.- Specified by:
cmsInitByProbin interfaceCountMinSketchCommands- Parameters:
key- The name of the sketch.error- Estimate size of error. The error is a percent of total counted items. This effects the width of the sketch.probability- The desired probability for inflated count. This should be a decimal value between 0 and 1. This effects the depth of the sketch. For example, for a desired false positive rate of 0.1% (1 in 1000), error_rate should be set to 0.001. The closer this number is to zero, the greater the memory consumption per item and the more CPU usage per operation.- Returns:
- OK
-
cmsIncrBy
Description copied from interface:CountMinSketchCommandsCMS.INCRBY Increases the count of one or more item.- Specified by:
cmsIncrByin interfaceCountMinSketchCommands- Parameters:
key- The name of the sketchitemIncrements- a Map of the items to be increased and their integer increment- Returns:
- Count of each item after increment
-
cmsQuery
Description copied from interface:CountMinSketchCommandsCMS.QUERY Returns count for item. Multiple items can be queried with one call.- Specified by:
cmsQueryin interfaceCountMinSketchCommands- Parameters:
key- The name of the sketchitems- The items for which to retrieve the counts- Returns:
- Count for one or more items
-
cmsMerge
Description copied from interface:CountMinSketchCommandsCMS.MERGE Merges several sketches into one sketch. All sketches must have identical width and depth.- Specified by:
cmsMergein interfaceCountMinSketchCommands- Parameters:
destKey- The name of destination sketch. Must be initialized.keys- The sketches to be merged- Returns:
- OK
-
cmsMerge
Description copied from interface:CountMinSketchCommandsCMS.MERGE Merges several sketches into one sketch. All sketches must have identical width and depth. Weights can be used to multiply certain sketches. Default weight is 1.- Specified by:
cmsMergein interfaceCountMinSketchCommands- Parameters:
destKey- The name of destination sketch. Must be initialized.keysAndWeights- A map of keys and weights used to multiply the sketch.- Returns:
- OK
-
cmsInfo
Description copied from interface:CountMinSketchCommandsCMS.INFO Returns width, depth and total count of the sketch.- Specified by:
cmsInfoin interfaceCountMinSketchCommands- Parameters:
key- The name of the sketch- Returns:
- A Map with width, depth and total count.
-
topkReserve
Description copied from interface:TopKFilterCommandsTOPK.RESERVE {key} {topk}- Specified by:
topkReservein interfaceTopKFilterCommands- Parameters:
key-topk-- Returns:
- OK
-
topkReserve
Description copied from interface:TopKFilterCommandsTOPK.RESERVE {key} {topk} [{width} {depth} {decay}]- Specified by:
topkReservein interfaceTopKFilterCommands- Parameters:
key-topk-width-depth-decay-- Returns:
- OK
-
topkAdd
Description copied from interface:TopKFilterCommandsTOPK.ADD {key} {item ...}- Specified by:
topkAddin interfaceTopKFilterCommands- Parameters:
key-items-- Returns:
- items dropped from list
-
topkIncrBy
Description copied from interface:TopKFilterCommandsTOPK.INCRBY {key} {item} {increment} [{item} {increment} ...]- Specified by:
topkIncrByin interfaceTopKFilterCommands- Parameters:
key-itemIncrements- item and increment pairs- Returns:
- item dropped from list
-
topkQuery
Description copied from interface:TopKFilterCommandsTOPK.QUERY {key} {item ...}- Specified by:
topkQueryin interfaceTopKFilterCommands- Parameters:
key-items-- Returns:
- if item is in Top-K
-
topkCount
Deprecated.Description copied from interface:TopKFilterCommandsTOPK.COUNT {key} {item ...}- Specified by:
topkCountin interfaceTopKFilterCommands- Parameters:
key-items-- Returns:
- count for item
-
topkList
Description copied from interface:TopKFilterCommandsTOPK.LIST {key}- Specified by:
topkListin interfaceTopKFilterCommands- Parameters:
key-- Returns:
- k (or less) items in Top K list
-
topkListWithCount
Description copied from interface:TopKFilterCommandsTOPK.LIST {key} WITHCOUNT- Specified by:
topkListWithCountin interfaceTopKFilterCommands- Parameters:
key-- Returns:
- k (or less) items in Top K list
-
topkInfo
Description copied from interface:TopKFilterCommandsTOPK.INFO {key}- Specified by:
topkInfoin interfaceTopKFilterCommands- Parameters:
key-- Returns:
- information
-
tdigestCreate
Description copied from interface:TDigestSketchCommandsTDIGEST.CREATE key- Specified by:
tdigestCreatein interfaceTDigestSketchCommands- Parameters:
key- The name of the sketch (a t-digest data structure)- Returns:
- OK
-
tdigestCreate
Description copied from interface:TDigestSketchCommandsTDIGEST.CREATE key [compression]- Specified by:
tdigestCreatein interfaceTDigestSketchCommands- Parameters:
key- The name of the sketch (a t-digest data structure)compression- The compression parameter. 100 is a common value for normal uses. 1000 is extremely large.- Returns:
- OK
-
tdigestReset
Description copied from interface:TDigestSketchCommandsTDIGEST.RESET key- Specified by:
tdigestResetin interfaceTDigestSketchCommands- Parameters:
key- The name of the sketch (a t-digest data structure)- Returns:
- OK
-
tdigestMerge
Description copied from interface:TDigestSketchCommandsTDIGEST.MERGE destination-key numkeys source-key [source-key ...]- Specified by:
tdigestMergein interfaceTDigestSketchCommands- Parameters:
destinationKey- Sketch to copy observation values to (a t-digest data structure)sourceKeys- Sketch(es) to copy observation values from (a t-digest data structure)- Returns:
- OK
-
tdigestMerge
public String tdigestMerge(TDigestMergeParams mergeParams, String destinationKey, String... sourceKeys) Description copied from interface:TDigestSketchCommandsTDIGEST.MERGE destination-key numkeys source-key [source-key ...] [COMPRESSION compression] [OVERRIDE]- Specified by:
tdigestMergein interfaceTDigestSketchCommands- Parameters:
mergeParams- compression and override optionsdestinationKey- Sketch to copy observation values to (a t-digest data structure)sourceKeys- Sketch(es) to copy observation values from (a t-digest data structure)- Returns:
- OK
-
tdigestInfo
Description copied from interface:TDigestSketchCommandsTDIGEST.INFO key- Specified by:
tdigestInfoin interfaceTDigestSketchCommands- Parameters:
key- The name of the sketch (a t-digest data structure)- Returns:
- information about the sketch
-
tdigestAdd
Description copied from interface:TDigestSketchCommandsTDIGEST.ADD key value weight [ value weight ...]- Specified by:
tdigestAddin interfaceTDigestSketchCommands- Parameters:
key- The name of the sketch (a t-digest data structure)values- The value of the observation (floating-point)- Returns:
- OK
-
tdigestCDF
Description copied from interface:TDigestSketchCommandsTDIGEST.CDF key value [value ...]- Specified by:
tdigestCDFin interfaceTDigestSketchCommands- Parameters:
key- The name of the sketch (a t-digest data structure)values- upper limit of observation value, for which the fraction of all observations added which are ≤ value- Returns:
- estimation of the fraction of all observations added which are ≤ value
-
tdigestQuantile
Description copied from interface:TDigestSketchCommandsTDIGEST.QUANTILE key quantile [quantile ...]- Specified by:
tdigestQuantilein interfaceTDigestSketchCommands- Parameters:
key- The name of the sketch (a t-digest data structure)quantiles- The desired fraction(s) (between 0 and 1 inclusively)- Returns:
- results
-
tdigestMin
Description copied from interface:TDigestSketchCommandsTDIGEST.MIN key- Specified by:
tdigestMinin interfaceTDigestSketchCommands- Parameters:
key- The name of the sketch (a t-digest data structure)- Returns:
- minimum observation value from the sketch
-
tdigestMax
Description copied from interface:TDigestSketchCommandsTDIGEST.MAX key- Specified by:
tdigestMaxin interfaceTDigestSketchCommands- Parameters:
key- The name of the sketch (a t-digest data structure)- Returns:
- maximum observation value from the sketch
-
tdigestTrimmedMean
Description copied from interface:TDigestSketchCommandsTDIGEST.TRIMMED_MEAN key low_cut_quantile high_cut_quantile- Specified by:
tdigestTrimmedMeanin interfaceTDigestSketchCommands- Parameters:
key- The name of the sketch (a t-digest data structure)lowCutQuantile- Exclude observation values lower than this quantilehighCutQuantile- Exclude observation values higher than this quantile- Returns:
- estimation of the mean value
-
tdigestRank
- Specified by:
tdigestRankin interfaceTDigestSketchCommands
-
tdigestRevRank
- Specified by:
tdigestRevRankin interfaceTDigestSketchCommands
-
tdigestByRank
- Specified by:
tdigestByRankin interfaceTDigestSketchCommands
-
tdigestByRevRank
- Specified by:
tdigestByRevRankin interfaceTDigestSketchCommands
-
graphQuery
Description copied from interface:RedisGraphCommandsExecute a Cypher query.- Specified by:
graphQueryin interfaceRedisGraphCommands- Parameters:
name- a graph to perform the query onquery- Cypher query- Returns:
- a result set
-
graphReadonlyQuery
Description copied from interface:RedisGraphCommandsExecute a Cypher read-only query.- Specified by:
graphReadonlyQueryin interfaceRedisGraphCommands- Parameters:
name- a graph to perform the query onquery- Cypher query- Returns:
- a result set
-
graphQuery
Description copied from interface:RedisGraphCommandsExecute a Cypher query with timeout.- Specified by:
graphQueryin interfaceRedisGraphCommands- Parameters:
name- a graph to perform the query onquery- Cypher querytimeout-- Returns:
- a result set
-
graphReadonlyQuery
Description copied from interface:RedisGraphCommandsExecute a Cypher read-only query with timeout.- Specified by:
graphReadonlyQueryin interfaceRedisGraphCommands- Parameters:
name- a graph to perform the query onquery- Cypher querytimeout-- Returns:
- a result set
-
graphQuery
Description copied from interface:RedisGraphCommandsExecutes a cypher query with parameters.- Specified by:
graphQueryin interfaceRedisGraphCommands- Parameters:
name- a graph to perform the query on.query- Cypher query.params- parameters map.- Returns:
- a result set.
-
graphReadonlyQuery
Description copied from interface:RedisGraphCommandsExecutes a cypher read-only query with parameters.- Specified by:
graphReadonlyQueryin interfaceRedisGraphCommands- Parameters:
name- a graph to perform the query on.query- Cypher query.params- parameters map.- Returns:
- a result set.
-
graphQuery
Description copied from interface:RedisGraphCommandsExecutes a cypher query with parameters and timeout.- Specified by:
graphQueryin interfaceRedisGraphCommands- Parameters:
name- a graph to perform the query on.query- Cypher query.params- parameters map.timeout-- Returns:
- a result set.
-
graphReadonlyQuery
public ResultSet graphReadonlyQuery(String name, String query, Map<String, Object> params, long timeout) Description copied from interface:RedisGraphCommandsExecutes a cypher read-only query with parameters and timeout.- Specified by:
graphReadonlyQueryin interfaceRedisGraphCommands- Parameters:
name- a graph to perform the query on.query- Cypher query.params- parameters map.timeout-- Returns:
- a result set.
-
graphDelete
Description copied from interface:RedisGraphCommandsDeletes the entire graph- Specified by:
graphDeletein interfaceRedisGraphCommands- Parameters:
name- graph to delete- Returns:
- delete running time statistics
-
graphList
Description copied from interface:RedisGraphCommandsLists all graph keys in the keyspace.- Specified by:
graphListin interfaceRedisGraphCommands- Returns:
- graph keys
-
graphProfile
Description copied from interface:RedisGraphCommandsExecutes a query and produces an execution plan augmented with metrics for each operation's execution.- Specified by:
graphProfilein interfaceRedisGraphCommands
-
graphExplain
Description copied from interface:RedisGraphCommandsConstructs a query execution plan but does not run it. Inspect this execution plan to better understand how your query will get executed.- Specified by:
graphExplainin interfaceRedisGraphCommands
-
graphSlowlog
Description copied from interface:RedisGraphCommandsReturns a list containing up to 10 of the slowest queries issued against the given graph ID.- Specified by:
graphSlowlogin interfaceRedisGraphCommands
-
graphConfigSet
- Specified by:
graphConfigSetin interfaceRedisGraphCommands
-
graphConfigGet
- Specified by:
graphConfigGetin interfaceRedisGraphCommands
-
pipelined
-
multi
-
sendCommand
-
sendCommand
-
sendBlockingCommand
-
sendCommand
-
sendBlockingCommand
-
sendCommand
-
sendBlockingCommand
-
sendCommand
-
sendBlockingCommand
-
executeCommand
-
setJsonObjectMapper
-