Class RedissonJsonBucket<V>
- All Implemented Interfaces:
RBucket<V>
,RBucketAsync<V>
,RExpirable
,RExpirableAsync
,RJsonBucket<V>
,RJsonBucketAsync<V>
,RObject
,RObjectAsync
- Author:
- Nikita Koksharov
-
Field Summary
Fields inherited from class org.redisson.RedissonObject
codec, commandExecutor, name
-
Constructor Summary
ConstructorDescriptionRedissonJsonBucket
(JsonCodec<V> codec, CommandAsyncExecutor connectionManager, String name) -
Method Summary
Modifier and TypeMethodDescriptionlong
arrayAppend
(String path, Object... values) Appends values to array specified by JSONPath.arrayAppendAsync
(String path, Object... values) Appends values to array specified by JSONPath.arrayAppendMulti
(String path, Object... values) Appends values to arrays specified by JSONPath.arrayAppendMultiAsync
(String path, Object... values) Appends values to arrays specified by JSONPath.long
arrayIndex
(String path, Object value) Returns index of object in array specified by JSONPathlong
arrayIndex
(String path, Object value, long start, long end) Returns index of object in array specified by JSONPath in range betweenstart
(inclusive) andend
(exclusive) indexesarrayIndexAsync
(String path, Object value) Returns index of object in array specified by JSONPatharrayIndexAsync
(String path, Object value, long start, long end) Returns index of object in array specified by JSONPath in range betweenstart
(inclusive) andend
(exclusive) indexesarrayIndexMulti
(String path, Object value) Returns index of object in arrays specified by JSONPatharrayIndexMulti
(String path, Object value, long start, long end) Returns index of object in arrays specified by JSONPath in range betweenstart
(inclusive) andend
(exclusive) indexesarrayIndexMultiAsync
(String path, Object value) Returns index of object in arrays specified by JSONPatharrayIndexMultiAsync
(String path, Object value, long start, long end) Returns index of object in arrays specified by JSONPath in range betweenstart
(inclusive) andend
(exclusive) indexeslong
arrayInsert
(String path, long index, Object... values) Inserts values into array specified by JSONPath.arrayInsertAsync
(String path, long index, Object... values) Inserts values into array specified by JSONPath.arrayInsertMulti
(String path, long index, Object... values) Inserts values into arrays specified by JSONPath.arrayInsertMultiAsync
(String path, long index, Object... values) Inserts values into arrays specified by JSONPath.<T> T
arrayPollFirst
(JsonCodec<T> codec, String path) Polls first element of array specified by JSONPath.<T> RFuture
<T> arrayPollFirstAsync
(JsonCodec<T> codec, String path) Polls first element of array specified by JSONPath.<T> List
<T> arrayPollFirstMulti
(JsonCodec<T> codec, String path) Polls first element of arrays specified by JSONPath.arrayPollFirstMultiAsync
(JsonCodec<T> codec, String path) Polls first element of arrays specified by JSONPath.<T> T
arrayPollLast
(JsonCodec<T> codec, String path) Polls last element of array specified by JSONPath.<T> RFuture
<T> arrayPollLastAsync
(JsonCodec<T> codec, String path) Polls last element of array specified by JSONPath.<T> List
<T> arrayPollLastMulti
(JsonCodec<T> codec, String path) Polls last element of arrays specified by JSONPath.arrayPollLastMultiAsync
(JsonCodec<T> codec, String path) Polls last element of arrays specified by JSONPath.<T> T
Pops element located at index of array specified by JSONPath.<T> RFuture
<T> arrayPopAsync
(JsonCodec<T> codec, String path, long index) Pops element located at index of array specified by JSONPath.<T> List
<T> arrayPopMulti
(JsonCodec<T> codec, String path, long index) Pops elements located at index of arrays specified by JSONPath.arrayPopMultiAsync
(JsonCodec<T> codec, String path, long index) Pops elements located at index of arrays specified by JSONPath.long
Returns size of array specified by JSONPath.arraySizeAsync
(String path) Returns size of array specified by JSONPath.arraySizeMulti
(String path) Returns size of arrays specified by JSONPath.arraySizeMultiAsync
(String path) Returns size of arrays specified by JSONPath.long
Trims array specified by JSONPath in range betweenstart
(inclusive) andend
(inclusive) indexes.arrayTrimAsync
(String path, long start, long end) Trims array specified by JSONPath in range betweenstart
(inclusive) andend
(inclusive) indexes.arrayTrimMulti
(String path, long start, long end) Trims arrays specified by JSONPath in range betweenstart
(inclusive) andend
(inclusive) indexes.arrayTrimMultiAsync
(String path, long start, long end) Trims arrays specified by JSONPath in range betweenstart
(inclusive) andend
(inclusive) indexes.long
clear()
Clears json container.long
Clears json container specified by JSONPath.Clears json container.clearAsync
(String path) Clears json container specified by JSONPath.boolean
Clear an expire timeout or expire date for object.Clear an expire timeout or expire date for object in async mode.clearExpireAsync
(String... keys) boolean
compareAndSet
(String path, Object expect, Object update) Atomically sets the value to the given updated value by given JSONPath, only if serialized state of the current value equals to serialized state of the expected value.boolean
compareAndSet
(V expect, V update) Atomically sets the value to the given updated value only if serialized state of the current value equals to serialized state of the expected value.compareAndSetAsync
(String path, Object expect, Object update) Atomically sets the value to the given updated value by given JSONPath, only if serialized state of the current value equals to serialized state of the expected value.compareAndSetAsync
(V expect, V update) Atomically sets the value to the given updated value only if serialized state of the current value equals to serialized state of the expected value.compareAndSetUpdateAsync
(String path, Object expect, Object update) long
Returns keys amount in JSON containerlong
Returns keys amount in JSON container specified by JSONPathReturns keys amount in JSON containercountKeysAsync
(String path) Returns keys amount in JSON container specified by JSONPathcountKeysMulti
(String path) Returns list of keys amount in JSON containers specified by JSONPathcountKeysMultiAsync
(String path) Returns list of keys amount in JSON containers specified by JSONPathlong
Deletes JSON elements specified by JSONPathDelete object in async modedeleteAsync
(String path) Deletes JSON elements specified by JSONPathboolean
UseRExpirable.expire(Duration)
insteadboolean
Sets a timeout for this object.boolean
Sets an expiration date for this object.expireAsync
(long timeToLive, TimeUnit timeUnit) UseRExpirableAsync.expireAsync(Duration)
insteadexpireAsync
(long timeToLive, TimeUnit timeUnit, String param, String... keys) expireAsync
(Duration duration) Set a timeout for object.expireAsync
(Instant instant) Set an expire date for object.boolean
expireAt
(long timestamp) UseRExpirable.expire(Instant)
insteadboolean
UseRExpirable.expire(Instant)
insteadexpireAtAsync
(long timestamp) UseRExpirableAsync.expireAsync(Instant)
insteadexpireAtAsync
(long timestamp, String param, String... keys) expireAtAsync
(Date timestamp) UseRExpirableAsync.expireAsync(Instant)
insteadboolean
expireIfGreater
(Duration duration) Sets a timeout for this object only if it's greater than timeout set before.boolean
expireIfGreater
(Instant time) Sets an expiration date for this object only if it's greater than expiration date set before.expireIfGreaterAsync
(Duration duration) Sets a timeout for this object only if it's greater than timeout set before.expireIfGreaterAsync
(Instant time) Sets an expiration date for this object only if it's greater than expiration date set before.boolean
expireIfLess
(Duration duration) Sets a timeout for this object only if it's less than timeout set before.boolean
expireIfLess
(Instant time) Sets an expiration date for this object only if it's less than expiration date set before.expireIfLessAsync
(Duration duration) Sets a timeout for this object only if it's less than timeout set before.expireIfLessAsync
(Instant time) Sets an expiration date for this object only if it's less than expiration date set before.boolean
expireIfNotSet
(Duration duration) Sets a timeout for this object only if it hasn't been set before.boolean
expireIfNotSet
(Instant time) Sets an expiration date for this object only if it hasn't been set before.expireIfNotSetAsync
(Duration duration) Sets a timeout for this object only if it hasn't been set before.expireIfNotSetAsync
(Instant time) Sets an expiration date for this object only if it hasn't been set before.boolean
expireIfSet
(Duration duration) Sets a timeout for this object only if it has been already set.boolean
expireIfSet
(Instant time) Sets an expiration date for this object only if it has been already set.expireIfSetAsync
(Duration duration) Sets a timeout for this object only if it has been already set.expireIfSetAsync
(Instant time) Sets an expiration date for this object only if it has been already set.get()
Retrieves element stored in the holder.<T> T
Get Json object/objects by JSONPathRetrieves current element in the holder and clears expiration date set before.Retrieves current element in the holder and clears expiration date set before.Retrieves element in the holder and removes it.Retrieves element in the holder and removes it.getAndExpire
(Duration duration) Retrieves current element in the holder and sets an expiration duration for it.getAndExpire
(Instant time) Retrieves current element in the holder and sets an expiration date for it.getAndExpireAsync
(Duration duration) Retrieves current element in the holder and sets an expiration duration for it.getAndExpireAsync
(Instant time) Retrieves current element in the holder and sets an expiration date for it.<T> T
Retrieves current value of element specified by JSONPath and replaces it withnewValue
.Retrieves current element in the holder and replaces it withnewValue
.UseRBucket.getAndSet(Object, Duration)
insteadRetrieves current element in the holder and replaces it withvalue
with defined expirationduration
.<T> RFuture
<T> getAndSetAsync
(JsonCodec<T> codec, String path, Object newValue) Retrieves current value of element specified by JSONPath and replaces it withnewValue
.getAndSetAsync
(V newValue) Retrieves current element in the holder and replaces it withnewValue
.getAndSetAsync
(V value, long timeToLive, TimeUnit timeUnit) UseRBucketAsync.getAndSetAsync(Object, Duration)
insteadgetAndSetAsync
(V value, Duration duration) Retrieves current element in the holder and replaces it withvalue
with defined expirationduration
.getAsync()
Retrieves element stored in the holder.<T> RFuture
<T> Get Json object/objects by JSONPathlong
Expiration time of Redisson object that has a timeoutExpiration time of Redisson object that has a timeoutgetKeys()
Returns list of keys in JSON containerReturns list of keys in JSON container specified by JSONPathReturns list of keys in JSON containergetKeysAsync
(String path) Returns list of keys in JSON container specified by JSONPathgetKeysMulti
(String path) Returns list of keys in JSON containers specified by JSONPathgetKeysMultiAsync
(String path) Returns list of keys in JSON containers specified by JSONPathgetType()
Returns type of elementReturns type of element specified by JSONPathReturns type of elementgetTypeAsync
(String path) Returns type of element specified by JSONPath<T extends Number>
TincrementAndGet
(String path, T delta) Increments the current value specified by JSONPath bydelta
.incrementAndGetAsync
(String path, T delta) Increments the current value specified by JSONPath bydelta
.incrementAndGetMulti
(String path, T delta) Increments the current values specified by JSONPath bydelta
.incrementAndGetMultiAsync
(String path, T delta) Increments the current values specified by JSONPath bydelta
.long
Remaining time to live of Redisson object that has a timeoutRemaining time to live of Redisson object that has a timeoutvoid
Stores object into element by specified JSONPath.void
Stores element into the holder.void
UseRBucket.set(Object, Duration)
insteadvoid
Storesvalue
into the holder with defined expirationduration
.void
setAndKeepTTL
(V value) Set value and keep existing TTL.setAndKeepTTLAsync
(V value) Set value and keep existing TTL.Stores object into element by specified JSONPath.Stores element into the holder.UseRBucketAsync.setAsync(Object, Duration)
insteadStoresvalue
into the holder with defined expirationduration
.boolean
setIfAbsent
(String path, Object value) Sets Json object by JSONPath only if previous value is emptyboolean
setIfAbsent
(V value) Sets value only if object holder doesn't exist.boolean
setIfAbsent
(V value, Duration duration) Sets value with defined duration only if object holder doesn't exist.setIfAbsentAsync
(String path, Object value) Sets Json object by JSONPath only if previous value is emptysetIfAbsentAsync
(V value) Sets value only if object holder doesn't exist.setIfAbsentAsync
(V value, Duration duration) Sets value with defined duration only if object holder doesn't exist.boolean
setIfExists
(String path, Object value) Sets Json object by JSONPath only if previous value is non-emptyboolean
setIfExists
(V value) Sets value only if object holder already exists.boolean
setIfExists
(V value, long timeToLive, TimeUnit timeUnit) UseRBucket.setIfExists(Object, Duration)
insteadboolean
setIfExists
(V value, Duration duration) Setsvalue
with expirationduration
only if object holder already exists.setIfExistsAsync
(String path, Object value) Sets Json object by JSONPath only if previous value is non-emptysetIfExistsAsync
(V value) Sets value only if it's already exists.setIfExistsAsync
(V value, long timeToLive, TimeUnit timeUnit) UseRBucketAsync.setIfExistsAsync(Object, Duration)
insteadsetIfExistsAsync
(V value, Duration duration) Setsvalue
with expirationduration
only if object holder already exists.long
size()
Returns size of object in bytes.Returns size of object in byteslong
stringAppend
(String path, Object value) Appends string data to element specified by JSONPath.stringAppendAsync
(String path, Object value) Appends string data to element specified by JSONPath.stringAppendMulti
(String path, Object value) Appends string data to elements specified by JSONPath.stringAppendMultiAsync
(String path, Object value) Appends string data to elements specified by JSONPath.stringSize
(String path) Returns size of string data by JSONPathstringSizeAsync
(String path) Returns size of string data by JSONPathstringSizeMulti
(String path) Returns list of string data size by JSONPath.stringSizeMultiAsync
(String path) Returns list of string data size by JSONPath.boolean
Toggle boolean value specified by JSONPathtoggleAsync
(String path) Toggle boolean value specified by JSONPathtoggleMulti
(String path) Toggle boolean values specified by JSONPathtoggleMultiAsync
(String path) Toggle boolean values specified by JSONPathboolean
UseRJsonBucket.setIfAbsent(String, Object)
insteadboolean
UseRBucket.setIfAbsent(Object)
insteadboolean
UseRBucket.setIfAbsent(Object, Duration)
insteadtrySetAsync
(String path, Object value) trySetAsync
(V value) UseRBucketAsync.setIfAbsentAsync(Object)
insteadtrySetAsync
(V value, long timeToLive, TimeUnit timeUnit) UseRBucketAsync.setIfAbsentAsync(Object, Duration)
insteadMethods inherited from class org.redisson.RedissonObject
addListener, addListener, addListenerAsync, addListenerAsync, addTrackingListener, addTrackingListenerAsync, copy, copyAsync, delete, deleteAsync, dump, dumpAsync, encode, encode, encode, encode, encodeMapKey, encodeMapKey, encodeMapKeys, encodeMapValue, encodeMapValues, get, getCodec, getIdleTime, getIdleTimeAsync, getLockByMapKey, getLockByValue, getName, getRawName, getRawName, getServiceManager, getSubscribeService, isExists, isExistsAsync, map, migrate, migrateAsync, move, moveAsync, prefixName, removeListener, removeListener, removeListenerAsync, removeListenerAsync, removeListenerAsync, removeTrackingListener, removeTrackingListenerAsync, rename, renameAsync, renamenx, renamenxAsync, restore, restore, restoreAndReplace, restoreAndReplace, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, setName, sizeInMemory, sizeInMemoryAsync, sizeInMemoryAsync, sizeInMemoryAsync, suffixName, toSeconds, toStream, touch, touchAsync, unlink, unlinkAsync
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.redisson.api.RBucket
addListener
Methods inherited from interface org.redisson.api.RBucketAsync
addListenerAsync
Methods inherited from interface org.redisson.api.RExpirable
clearExpire, expire, expire, expire, expireAt, expireAt, expireIfGreater, expireIfGreater, expireIfLess, expireIfLess, expireIfNotSet, expireIfNotSet, expireIfSet, expireIfSet, getExpireTime, remainTimeToLive
Methods inherited from interface org.redisson.api.RExpirableAsync
clearExpireAsync, expireAsync, expireAsync, expireAsync, expireAtAsync, expireAtAsync, expireIfGreaterAsync, expireIfGreaterAsync, expireIfLessAsync, expireIfLessAsync, expireIfNotSetAsync, expireIfNotSetAsync, expireIfSetAsync, expireIfSetAsync, getExpireTimeAsync, remainTimeToLiveAsync
Methods inherited from interface org.redisson.api.RObject
copy, delete, dump, getCodec, getIdleTime, getName, isExists, migrate, move, removeListener, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlink
Methods inherited from interface org.redisson.api.RObjectAsync
copyAsync, dumpAsync, getIdleTimeAsync, isExistsAsync, migrateAsync, moveAsync, removeListenerAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemoryAsync, touchAsync, unlinkAsync
-
Constructor Details
-
RedissonJsonBucket
-
-
Method Details
-
size
public long size()Description copied from interface:RBucket
Returns size of object in bytes. -
sizeAsync
Description copied from interface:RBucketAsync
Returns size of object in bytes- Specified by:
sizeAsync
in interfaceRBucketAsync<V>
- Returns:
- object size
-
stringSizeMulti
Description copied from interface:RJsonBucket
Returns list of string data size by JSONPath. Compatible only with enhanced syntax starting with '$' character.- Specified by:
stringSizeMulti
in interfaceRJsonBucket<V>
- Parameters:
path
- JSON path- Returns:
- list of string data sizes
-
stringSizeMultiAsync
Description copied from interface:RJsonBucketAsync
Returns list of string data size by JSONPath. Compatible only with enhanced syntax starting with '$' character.- Specified by:
stringSizeMultiAsync
in interfaceRJsonBucketAsync<V>
- Parameters:
path
- JSON path- Returns:
- list of string data sizes
-
stringSize
Description copied from interface:RJsonBucket
Returns size of string data by JSONPath- Specified by:
stringSize
in interfaceRJsonBucket<V>
- Parameters:
path
- JSON path- Returns:
- size of string
-
stringSizeAsync
Description copied from interface:RJsonBucketAsync
Returns size of string data by JSONPath- Specified by:
stringSizeAsync
in interfaceRJsonBucketAsync<V>
- Parameters:
path
- JSON path- Returns:
- size of string
-
get
Description copied from interface:RBucket
Retrieves element stored in the holder. -
getAsync
Description copied from interface:RBucketAsync
Retrieves element stored in the holder.- Specified by:
getAsync
in interfaceRBucketAsync<V>
- Returns:
- element
-
get
Description copied from interface:RJsonBucket
Get Json object/objects by JSONPath- Specified by:
get
in interfaceRJsonBucket<V>
- Type Parameters:
T
- the type of object- Parameters:
codec
- object codecpaths
- JSON paths- Returns:
- object
-
getAsync
Description copied from interface:RJsonBucketAsync
Get Json object/objects by JSONPath- Specified by:
getAsync
in interfaceRJsonBucketAsync<V>
- Type Parameters:
T
- the type of object- Parameters:
codec
- object codecpaths
- JSON paths- Returns:
- object
-
getAndDelete
Description copied from interface:RBucket
Retrieves element in the holder and removes it.- Specified by:
getAndDelete
in interfaceRBucket<V>
- Returns:
- element
-
getAndDeleteAsync
Description copied from interface:RBucketAsync
Retrieves element in the holder and removes it.- Specified by:
getAndDeleteAsync
in interfaceRBucketAsync<V>
- Returns:
- element
-
setIfAbsent
Description copied from interface:RBucket
Sets value only if object holder doesn't exist.- Specified by:
setIfAbsent
in interfaceRBucket<V>
- Parameters:
value
- - value to set- Returns:
true
if successful, orfalse
if element was already set
-
setIfAbsent
Description copied from interface:RBucket
Sets value with defined duration only if object holder doesn't exist.- Specified by:
setIfAbsent
in interfaceRBucket<V>
- Parameters:
value
- value to setduration
- expiration duration- Returns:
true
if successful, orfalse
if element was already set
-
setIfAbsentAsync
Description copied from interface:RBucketAsync
Sets value only if object holder doesn't exist.- Specified by:
setIfAbsentAsync
in interfaceRBucketAsync<V>
- Parameters:
value
- - value to set- Returns:
true
if successful, orfalse
if element was already set
-
setIfAbsentAsync
Description copied from interface:RBucketAsync
Sets value with defined duration only if object holder doesn't exist.- Specified by:
setIfAbsentAsync
in interfaceRBucketAsync<V>
- Parameters:
value
- value to setduration
- expiration duration- Returns:
true
if successful, orfalse
if element was already set
-
trySet
Description copied from interface:RBucket
UseRBucket.setIfAbsent(Object)
instead -
trySetAsync
Description copied from interface:RBucketAsync
UseRBucketAsync.setIfAbsentAsync(Object)
instead- Specified by:
trySetAsync
in interfaceRBucketAsync<V>
- Parameters:
value
- - value to set- Returns:
true
if successful, orfalse
if element was already set
-
setIfAbsent
Description copied from interface:RJsonBucket
Sets Json object by JSONPath only if previous value is empty- Specified by:
setIfAbsent
in interfaceRJsonBucket<V>
- Parameters:
path
- JSON pathvalue
- object- Returns:
true
if successful, orfalse
if value was already set
-
setIfAbsentAsync
Description copied from interface:RJsonBucketAsync
Sets Json object by JSONPath only if previous value is empty- Specified by:
setIfAbsentAsync
in interfaceRJsonBucketAsync<V>
- Parameters:
path
- JSON pathvalue
- object- Returns:
true
if successful, orfalse
if value was already set
-
trySet
Description copied from interface:RJsonBucket
UseRJsonBucket.setIfAbsent(String, Object)
instead- Specified by:
trySet
in interfaceRJsonBucket<V>
- Parameters:
path
- JSON pathvalue
- object- Returns:
true
if successful, orfalse
if value was already set
-
trySetAsync
Description copied from interface:RJsonBucketAsync
- Specified by:
trySetAsync
in interfaceRJsonBucketAsync<V>
- Parameters:
path
- JSON pathvalue
- object- Returns:
true
if successful, orfalse
if value was already set
-
trySet
Description copied from interface:RBucket
UseRBucket.setIfAbsent(Object, Duration)
instead -
trySetAsync
Description copied from interface:RBucketAsync
UseRBucketAsync.setIfAbsentAsync(Object, Duration)
instead- Specified by:
trySetAsync
in interfaceRBucketAsync<V>
- Parameters:
value
- - value to settimeToLive
- - time to live intervaltimeUnit
- - unit of time to live interval- Returns:
true
if successful, orfalse
if element was already set
-
setIfExists
Description copied from interface:RBucket
Sets value only if object holder already exists.- Specified by:
setIfExists
in interfaceRBucket<V>
- Parameters:
value
- - value to set- Returns:
true
if successful, orfalse
if element wasn't set
-
setIfExistsAsync
Description copied from interface:RBucketAsync
Sets value only if it's already exists.- Specified by:
setIfExistsAsync
in interfaceRBucketAsync<V>
- Parameters:
value
- - value to set- Returns:
true
if successful, orfalse
if element wasn't set
-
setIfExists
Description copied from interface:RJsonBucket
Sets Json object by JSONPath only if previous value is non-empty- Specified by:
setIfExists
in interfaceRJsonBucket<V>
- Parameters:
path
- JSON pathvalue
- object- Returns:
true
if successful, orfalse
if element wasn't set
-
setIfExistsAsync
Description copied from interface:RJsonBucketAsync
Sets Json object by JSONPath only if previous value is non-empty- Specified by:
setIfExistsAsync
in interfaceRJsonBucketAsync<V>
- Parameters:
path
- JSON pathvalue
- object- Returns:
true
if successful, orfalse
if element wasn't set
-
setIfExists
Description copied from interface:RBucket
UseRBucket.setIfExists(Object, Duration)
instead- Specified by:
setIfExists
in interfaceRBucket<V>
- Parameters:
value
- - value to settimeToLive
- - time to live intervaltimeUnit
- - unit of time to live interval- Returns:
true
if successful, orfalse
if element wasn't set
-
setIfExistsAsync
Description copied from interface:RBucketAsync
UseRBucketAsync.setIfExistsAsync(Object, Duration)
instead- Specified by:
setIfExistsAsync
in interfaceRBucketAsync<V>
- Parameters:
value
- - value to settimeToLive
- - time to live intervaltimeUnit
- - unit of time to live interval- Returns:
true
if successful, orfalse
if element wasn't set
-
setIfExists
Description copied from interface:RBucket
Setsvalue
with expirationduration
only if object holder already exists.- Specified by:
setIfExists
in interfaceRBucket<V>
- Parameters:
value
- value to setduration
- expiration duration- Returns:
true
if successful, orfalse
if element wasn't set
-
setIfExistsAsync
Description copied from interface:RBucketAsync
Setsvalue
with expirationduration
only if object holder already exists.- Specified by:
setIfExistsAsync
in interfaceRBucketAsync<V>
- Parameters:
value
- value to setduration
- expiration duration- Returns:
true
if successful, orfalse
if element wasn't set
-
compareAndSet
Description copied from interface:RBucket
Atomically sets the value to the given updated value only if serialized state of the current value equals to serialized state of the expected value.- Specified by:
compareAndSet
in interfaceRBucket<V>
- Parameters:
expect
- the expected valueupdate
- the new value- Returns:
true
if successful; orfalse
if the actual value was not equal to the expected value.
-
compareAndSetAsync
Description copied from interface:RBucketAsync
Atomically sets the value to the given updated value only if serialized state of the current value equals to serialized state of the expected value.- Specified by:
compareAndSetAsync
in interfaceRBucketAsync<V>
- Parameters:
expect
- the expected valueupdate
- the new value- Returns:
true
if successful; orfalse
if the actual value was not equal to the expected value.
-
compareAndSet
Description copied from interface:RJsonBucket
Atomically sets the value to the given updated value by given JSONPath, only if serialized state of the current value equals to serialized state of the expected value.- Specified by:
compareAndSet
in interfaceRJsonBucket<V>
- Parameters:
path
- JSON pathexpect
- the expected valueupdate
- the new value- Returns:
true
if successful; orfalse
if the actual value was not equal to the expected value.
-
compareAndSetAsync
Description copied from interface:RJsonBucketAsync
Atomically sets the value to the given updated value by given JSONPath, only if serialized state of the current value equals to serialized state of the expected value.- Specified by:
compareAndSetAsync
in interfaceRJsonBucketAsync<V>
- Parameters:
path
- JSON pathexpect
- the expected valueupdate
- the new value- Returns:
true
if successful; orfalse
if the actual value was not equal to the expected value.
-
compareAndSetUpdateAsync
-
getAndSet
Description copied from interface:RBucket
Retrieves current element in the holder and replaces it withnewValue
. -
getAndSetAsync
Description copied from interface:RBucketAsync
Retrieves current element in the holder and replaces it withnewValue
.- Specified by:
getAndSetAsync
in interfaceRBucketAsync<V>
- Parameters:
newValue
- - value to set- Returns:
- previous value
-
getAndSet
Description copied from interface:RJsonBucket
Retrieves current value of element specified by JSONPath and replaces it withnewValue
.- Specified by:
getAndSet
in interfaceRJsonBucket<V>
- Parameters:
codec
- object codecpath
- JSON pathnewValue
- value to set- Returns:
- previous value
-
getAndSetAsync
Description copied from interface:RJsonBucketAsync
Retrieves current value of element specified by JSONPath and replaces it withnewValue
.- Specified by:
getAndSetAsync
in interfaceRJsonBucketAsync<V>
- Parameters:
codec
- object codecpath
- JSON pathnewValue
- value to set- Returns:
- previous value
-
getAndSet
Description copied from interface:RBucket
UseRBucket.getAndSet(Object, Duration)
instead -
getAndSetAsync
Description copied from interface:RBucketAsync
UseRBucketAsync.getAndSetAsync(Object, Duration)
instead- Specified by:
getAndSetAsync
in interfaceRBucketAsync<V>
- Parameters:
value
- - value to settimeToLive
- - time to live intervaltimeUnit
- - unit of time to live interval- Returns:
- previous value
-
getAndSet
Description copied from interface:RBucket
Retrieves current element in the holder and replaces it withvalue
with defined expirationduration
. -
getAndSetAsync
Description copied from interface:RBucketAsync
Retrieves current element in the holder and replaces it withvalue
with defined expirationduration
.- Specified by:
getAndSetAsync
in interfaceRBucketAsync<V>
- Parameters:
value
- value to setduration
- expiration duration- Returns:
- previous value
-
getAndExpire
Description copied from interface:RBucket
Retrieves current element in the holder and sets an expiration duration for it.Requires Redis 6.2.0 and higher.
- Specified by:
getAndExpire
in interfaceRBucket<V>
- Parameters:
duration
- of object time to live interval- Returns:
- element
-
getAndExpireAsync
Description copied from interface:RBucketAsync
Retrieves current element in the holder and sets an expiration duration for it.Requires Redis 6.2.0 and higher.
- Specified by:
getAndExpireAsync
in interfaceRBucketAsync<V>
- Parameters:
duration
- of object time to live interval- Returns:
- element
-
getAndExpire
Description copied from interface:RBucket
Retrieves current element in the holder and sets an expiration date for it.Requires Redis 6.2.0 and higher.
- Specified by:
getAndExpire
in interfaceRBucket<V>
- Parameters:
time
- of exact object expiration moment- Returns:
- element
-
getAndExpireAsync
Description copied from interface:RBucketAsync
Retrieves current element in the holder and sets an expiration date for it.Requires Redis 6.2.0 and higher.
- Specified by:
getAndExpireAsync
in interfaceRBucketAsync<V>
- Parameters:
time
- of exact object expiration moment- Returns:
- element
-
getAndClearExpire
Description copied from interface:RBucket
Retrieves current element in the holder and clears expiration date set before.Requires Redis 6.2.0 and higher.
- Specified by:
getAndClearExpire
in interfaceRBucket<V>
- Returns:
- element
-
getAndClearExpireAsync
Description copied from interface:RBucketAsync
Retrieves current element in the holder and clears expiration date set before.Requires Redis 6.2.0 and higher.
- Specified by:
getAndClearExpireAsync
in interfaceRBucketAsync<V>
- Returns:
- element
-
set
Description copied from interface:RBucket
Stores element into the holder. -
setAsync
Description copied from interface:RBucketAsync
Stores element into the holder.- Specified by:
setAsync
in interfaceRBucketAsync<V>
- Parameters:
value
- - value to set- Returns:
- void
-
set
Description copied from interface:RJsonBucket
Stores object into element by specified JSONPath.- Specified by:
set
in interfaceRJsonBucket<V>
- Parameters:
path
- JSON pathvalue
- value to set
-
setAsync
Description copied from interface:RJsonBucketAsync
Stores object into element by specified JSONPath.- Specified by:
setAsync
in interfaceRJsonBucketAsync<V>
- Parameters:
path
- JSON pathvalue
- value to set- Returns:
- void
-
set
Description copied from interface:RBucket
UseRBucket.set(Object, Duration)
instead -
setAsync
Description copied from interface:RBucketAsync
UseRBucketAsync.setAsync(Object, Duration)
instead- Specified by:
setAsync
in interfaceRBucketAsync<V>
- Parameters:
value
- - value to settimeToLive
- - time to live intervaltimeUnit
- - unit of time to live interval- Returns:
- void
-
set
Description copied from interface:RBucket
Storesvalue
into the holder with defined expirationduration
. -
setAsync
Description copied from interface:RBucketAsync
Storesvalue
into the holder with defined expirationduration
.- Specified by:
setAsync
in interfaceRBucketAsync<V>
- Parameters:
value
- value to setduration
- expiration duration
-
setAndKeepTTL
Description copied from interface:RBucket
Set value and keep existing TTL.Requires Redis 6.0.0 and higher.
- Specified by:
setAndKeepTTL
in interfaceRBucket<V>
- Parameters:
value
- - value to set
-
setAndKeepTTLAsync
Description copied from interface:RBucketAsync
Set value and keep existing TTL.Requires Redis 6.0.0 and higher.
- Specified by:
setAndKeepTTLAsync
in interfaceRBucketAsync<V>
- Parameters:
value
- - value to set- Returns:
- void
-
deleteAsync
Description copied from interface:RObjectAsync
Delete object in async mode- Specified by:
deleteAsync
in interfaceRObjectAsync
- Overrides:
deleteAsync
in classRedissonObject
- Returns:
true
if object was deletedfalse
if not
-
stringAppend
Description copied from interface:RJsonBucket
Appends string data to element specified by JSONPath. Returns new size of string data.- Specified by:
stringAppend
in interfaceRJsonBucket<V>
- Parameters:
path
- JSON pathvalue
- data- Returns:
- size of string data
-
stringAppendAsync
Description copied from interface:RJsonBucketAsync
Appends string data to element specified by JSONPath. Returns new size of string data.- Specified by:
stringAppendAsync
in interfaceRJsonBucketAsync<V>
- Parameters:
path
- JSON pathvalue
- data- Returns:
- size of string data
-
stringAppendMulti
Description copied from interface:RJsonBucket
Appends string data to elements specified by JSONPath. Returns new size of string data. Compatible only with enhanced syntax starting with '$' character.- Specified by:
stringAppendMulti
in interfaceRJsonBucket<V>
- Parameters:
path
- JSON pathvalue
- data- Returns:
- list of string data sizes
-
stringAppendMultiAsync
Description copied from interface:RJsonBucketAsync
Appends string data to elements specified by JSONPath. Returns new size of string data. Compatible only with enhanced syntax starting with '$' character.- Specified by:
stringAppendMultiAsync
in interfaceRJsonBucketAsync<V>
- Parameters:
path
- JSON pathvalue
- data- Returns:
- list of string data sizes
-
arrayAppend
Description copied from interface:RJsonBucket
Appends values to array specified by JSONPath. Returns new size of array.- Specified by:
arrayAppend
in interfaceRJsonBucket<V>
- Parameters:
path
- JSON pathvalues
- values to append- Returns:
- size of array
-
arrayAppendAsync
Description copied from interface:RJsonBucketAsync
Appends values to array specified by JSONPath. Returns new size of array.- Specified by:
arrayAppendAsync
in interfaceRJsonBucketAsync<V>
- Parameters:
path
- JSON pathvalues
- values to append- Returns:
- size of array
-
arrayAppendMulti
Description copied from interface:RJsonBucket
Appends values to arrays specified by JSONPath. Returns new size of arrays. Compatible only with enhanced syntax starting with '$' character.- Specified by:
arrayAppendMulti
in interfaceRJsonBucket<V>
- Parameters:
path
- JSON pathvalues
- values to append- Returns:
- list of arrays size
-
arrayAppendMultiAsync
Description copied from interface:RJsonBucketAsync
Appends values to arrays specified by JSONPath. Returns new size of arrays. Compatible only with enhanced syntax starting with '$' character.- Specified by:
arrayAppendMultiAsync
in interfaceRJsonBucketAsync<V>
- Parameters:
path
- JSON pathvalues
- values to append- Returns:
- list of arrays size
-
arrayIndex
Description copied from interface:RJsonBucket
Returns index of object in array specified by JSONPath. -1 means object not found.- Specified by:
arrayIndex
in interfaceRJsonBucket<V>
- Parameters:
path
- JSON pathvalue
- value to search- Returns:
- index in array
-
arrayIndexAsync
Description copied from interface:RJsonBucketAsync
Returns index of object in array specified by JSONPath. -1 means object not found.- Specified by:
arrayIndexAsync
in interfaceRJsonBucketAsync<V>
- Parameters:
path
- JSON pathvalue
- value to search- Returns:
- index in array
-
arrayIndexMulti
Description copied from interface:RJsonBucket
Returns index of object in arrays specified by JSONPath. -1 means object not found. Compatible only with enhanced syntax starting with '$' character.- Specified by:
arrayIndexMulti
in interfaceRJsonBucket<V>
- Parameters:
path
- JSON pathvalue
- value to search- Returns:
- list of index in arrays
-
arrayIndexMultiAsync
Description copied from interface:RJsonBucketAsync
Returns index of object in arrays specified by JSONPath. -1 means object not found. Compatible only with enhanced syntax starting with '$' character.- Specified by:
arrayIndexMultiAsync
in interfaceRJsonBucketAsync<V>
- Parameters:
path
- JSON pathvalue
- value to search- Returns:
- list of index in arrays
-
arrayIndex
Description copied from interface:RJsonBucket
Returns index of object in array specified by JSONPath in range betweenstart
(inclusive) andend
(exclusive) indexes. -1 means object not found.- Specified by:
arrayIndex
in interfaceRJsonBucket<V>
- Parameters:
path
- JSON pathvalue
- value to searchstart
- start index, inclusiveend
- end index, exclusive- Returns:
- index in array
-
arrayIndexAsync
Description copied from interface:RJsonBucketAsync
Returns index of object in array specified by JSONPath in range betweenstart
(inclusive) andend
(exclusive) indexes. -1 means object not found.- Specified by:
arrayIndexAsync
in interfaceRJsonBucketAsync<V>
- Parameters:
path
- JSON pathvalue
- value to searchstart
- start index, inclusiveend
- end index, exclusive- Returns:
- index in array
-
arrayIndexMulti
Description copied from interface:RJsonBucket
Returns index of object in arrays specified by JSONPath in range betweenstart
(inclusive) andend
(exclusive) indexes. -1 means object not found. Compatible only with enhanced syntax starting with '$' character.- Specified by:
arrayIndexMulti
in interfaceRJsonBucket<V>
- Parameters:
path
- JSON pathvalue
- value to searchstart
- start index, inclusiveend
- end index, exclusive- Returns:
- list of index in arrays
-
arrayIndexMultiAsync
Description copied from interface:RJsonBucketAsync
Returns index of object in arrays specified by JSONPath in range betweenstart
(inclusive) andend
(exclusive) indexes. -1 means object not found. Compatible only with enhanced syntax starting with '$' character.- Specified by:
arrayIndexMultiAsync
in interfaceRJsonBucketAsync<V>
- Parameters:
path
- JSON pathvalue
- value to searchstart
- start index, inclusiveend
- end index, exclusive- Returns:
- list of index in arrays
-
arrayInsert
Description copied from interface:RJsonBucket
Inserts values into array specified by JSONPath. Values are inserted at definedindex
.- Specified by:
arrayInsert
in interfaceRJsonBucket<V>
- Parameters:
path
- JSON pathindex
- array index at which values are insertedvalues
- values to insert- Returns:
- size of array
-
arrayInsertAsync
Description copied from interface:RJsonBucketAsync
Inserts values into array specified by JSONPath. Values are inserted at definedindex
.- Specified by:
arrayInsertAsync
in interfaceRJsonBucketAsync<V>
- Parameters:
path
- JSON pathindex
- array index at which values are insertedvalues
- values to insert- Returns:
- size of array
-
arrayInsertMulti
Description copied from interface:RJsonBucket
Inserts values into arrays specified by JSONPath. Values are inserted at definedindex
. Compatible only with enhanced syntax starting with '$' character.- Specified by:
arrayInsertMulti
in interfaceRJsonBucket<V>
- Parameters:
path
- JSON pathindex
- array index at which values are insertedvalues
- values to insert- Returns:
- list of arrays size
-
arrayInsertMultiAsync
Description copied from interface:RJsonBucketAsync
Inserts values into arrays specified by JSONPath. Values are inserted at definedindex
. Compatible only with enhanced syntax starting with '$' character.- Specified by:
arrayInsertMultiAsync
in interfaceRJsonBucketAsync<V>
- Parameters:
path
- JSON pathindex
- array index at which values are insertedvalues
- values to insert- Returns:
- list of arrays size
-
arraySize
Description copied from interface:RJsonBucket
Returns size of array specified by JSONPath.- Specified by:
arraySize
in interfaceRJsonBucket<V>
- Parameters:
path
- JSON path- Returns:
- size of array
-
arraySizeAsync
Description copied from interface:RJsonBucketAsync
Returns size of array specified by JSONPath.- Specified by:
arraySizeAsync
in interfaceRJsonBucketAsync<V>
- Parameters:
path
- JSON path- Returns:
- size of array
-
arraySizeMulti
Description copied from interface:RJsonBucket
Returns size of arrays specified by JSONPath. Compatible only with enhanced syntax starting with '$' character.- Specified by:
arraySizeMulti
in interfaceRJsonBucket<V>
- Parameters:
path
- JSON path- Returns:
- list of arrays size
-
arraySizeMultiAsync
Description copied from interface:RJsonBucketAsync
Returns size of arrays specified by JSONPath. Compatible only with enhanced syntax starting with '$' character.- Specified by:
arraySizeMultiAsync
in interfaceRJsonBucketAsync<V>
- Parameters:
path
- JSON path- Returns:
- list of arrays size
-
arrayPollLast
Description copied from interface:RJsonBucket
Polls last element of array specified by JSONPath.- Specified by:
arrayPollLast
in interfaceRJsonBucket<V>
- Type Parameters:
T
- the type of object- Parameters:
codec
- object codecpath
- JSON path- Returns:
- last element
-
arrayPollLastAsync
Description copied from interface:RJsonBucketAsync
Polls last element of array specified by JSONPath.- Specified by:
arrayPollLastAsync
in interfaceRJsonBucketAsync<V>
- Type Parameters:
T
- the type of object- Parameters:
codec
- object codecpath
- JSON path- Returns:
- last element
-
arrayPollLastMulti
Description copied from interface:RJsonBucket
Polls last element of arrays specified by JSONPath. Compatible only with enhanced syntax starting with '$' character.- Specified by:
arrayPollLastMulti
in interfaceRJsonBucket<V>
- Type Parameters:
T
- the type of object- Parameters:
codec
- object codecpath
- JSON path- Returns:
- list of last elements
-
arrayPollLastMultiAsync
Description copied from interface:RJsonBucketAsync
Polls last element of arrays specified by JSONPath. Compatible only with enhanced syntax starting with '$' character.- Specified by:
arrayPollLastMultiAsync
in interfaceRJsonBucketAsync<V>
- Type Parameters:
T
- the type of object- Parameters:
codec
- object codecpath
- JSON path- Returns:
- list of last elements
-
arrayPollFirst
Description copied from interface:RJsonBucket
Polls first element of array specified by JSONPath.- Specified by:
arrayPollFirst
in interfaceRJsonBucket<V>
- Type Parameters:
T
- the type of object- Parameters:
codec
- object codecpath
- JSON path- Returns:
- first element
-
arrayPollFirstAsync
Description copied from interface:RJsonBucketAsync
Polls first element of array specified by JSONPath.- Specified by:
arrayPollFirstAsync
in interfaceRJsonBucketAsync<V>
- Type Parameters:
T
- the type of object- Parameters:
codec
- object codecpath
- JSON path- Returns:
- first element
-
arrayPollFirstMulti
Description copied from interface:RJsonBucket
Polls first element of arrays specified by JSONPath. Compatible only with enhanced syntax starting with '$' character.- Specified by:
arrayPollFirstMulti
in interfaceRJsonBucket<V>
- Type Parameters:
T
- the type of object- Parameters:
codec
- object codecpath
- JSON path- Returns:
- list of first elements
-
arrayPollFirstMultiAsync
Description copied from interface:RJsonBucketAsync
Polls first element of arrays specified by JSONPath. Compatible only with enhanced syntax starting with '$' character.- Specified by:
arrayPollFirstMultiAsync
in interfaceRJsonBucketAsync<V>
- Type Parameters:
T
- the type of object- Parameters:
codec
- object codecpath
- JSON path- Returns:
- list of first elements
-
arrayPop
Description copied from interface:RJsonBucket
Pops element located at index of array specified by JSONPath.- Specified by:
arrayPop
in interfaceRJsonBucket<V>
- Type Parameters:
T
- the type of object- Parameters:
codec
- object codecpath
- JSON pathindex
- array index- Returns:
- element
-
arrayPopAsync
Description copied from interface:RJsonBucketAsync
Pops element located at index of array specified by JSONPath.- Specified by:
arrayPopAsync
in interfaceRJsonBucketAsync<V>
- Type Parameters:
T
- the type of object- Parameters:
codec
- object codecpath
- JSON pathindex
- array index- Returns:
- element
-
arrayPopMulti
Description copied from interface:RJsonBucket
Pops elements located at index of arrays specified by JSONPath. Compatible only with enhanced syntax starting with '$' character.- Specified by:
arrayPopMulti
in interfaceRJsonBucket<V>
- Type Parameters:
T
- the type of object- Parameters:
codec
- object codecpath
- JSON pathindex
- array index- Returns:
- list of elements
-
arrayPopMultiAsync
Description copied from interface:RJsonBucketAsync
Pops elements located at index of arrays specified by JSONPath. Compatible only with enhanced syntax starting with '$' character.- Specified by:
arrayPopMultiAsync
in interfaceRJsonBucketAsync<V>
- Type Parameters:
T
- the type of object- Parameters:
codec
- object codecpath
- JSON pathindex
- array index- Returns:
- list of elements
-
arrayTrim
Description copied from interface:RJsonBucket
Trims array specified by JSONPath in range betweenstart
(inclusive) andend
(inclusive) indexes.- Specified by:
arrayTrim
in interfaceRJsonBucket<V>
- Parameters:
path
- JSON pathstart
- start index, inclusiveend
- end index, inclusive- Returns:
- length of array
-
arrayTrimAsync
Description copied from interface:RJsonBucketAsync
Trims array specified by JSONPath in range betweenstart
(inclusive) andend
(inclusive) indexes.- Specified by:
arrayTrimAsync
in interfaceRJsonBucketAsync<V>
- Parameters:
path
- JSON pathstart
- start index, inclusiveend
- end index, inclusive- Returns:
- length of array
-
arrayTrimMulti
Description copied from interface:RJsonBucket
Trims arrays specified by JSONPath in range betweenstart
(inclusive) andend
(inclusive) indexes. Compatible only with enhanced syntax starting with '$' character.- Specified by:
arrayTrimMulti
in interfaceRJsonBucket<V>
- Parameters:
path
- JSON pathstart
- start index, inclusiveend
- end index, inclusive- Returns:
- length of array
-
arrayTrimMultiAsync
Description copied from interface:RJsonBucketAsync
Trims arrays specified by JSONPath in range betweenstart
(inclusive) andend
(inclusive) indexes. Compatible only with enhanced syntax starting with '$' character.- Specified by:
arrayTrimMultiAsync
in interfaceRJsonBucketAsync<V>
- Parameters:
path
- JSON pathstart
- start index, inclusiveend
- end index, inclusive- Returns:
- length of array
-
clear
public long clear()Description copied from interface:RJsonBucket
Clears json container.- Specified by:
clear
in interfaceRJsonBucket<V>
- Returns:
- number of cleared containers
-
clearAsync
Description copied from interface:RJsonBucketAsync
Clears json container.- Specified by:
clearAsync
in interfaceRJsonBucketAsync<V>
- Returns:
- number of cleared containers
-
clear
Description copied from interface:RJsonBucket
Clears json container specified by JSONPath. Compatible only with enhanced syntax starting with '$' character.- Specified by:
clear
in interfaceRJsonBucket<V>
- Parameters:
path
- JSON path- Returns:
- number of cleared containers
-
clearAsync
Description copied from interface:RJsonBucketAsync
Clears json container specified by JSONPath. Compatible only with enhanced syntax starting with '$' character.- Specified by:
clearAsync
in interfaceRJsonBucketAsync<V>
- Parameters:
path
- JSON path- Returns:
- number of cleared containers
-
incrementAndGet
Description copied from interface:RJsonBucket
Increments the current value specified by JSONPath bydelta
.- Specified by:
incrementAndGet
in interfaceRJsonBucket<V>
- Parameters:
path
- JSON pathdelta
- increment value- Returns:
- the updated value
-
incrementAndGetAsync
Description copied from interface:RJsonBucketAsync
Increments the current value specified by JSONPath bydelta
.- Specified by:
incrementAndGetAsync
in interfaceRJsonBucketAsync<V>
- Parameters:
path
- JSON pathdelta
- increment value- Returns:
- the updated value
-
incrementAndGetMulti
Description copied from interface:RJsonBucket
Increments the current values specified by JSONPath bydelta
. Compatible only with enhanced syntax starting with '$' character.- Specified by:
incrementAndGetMulti
in interfaceRJsonBucket<V>
- Parameters:
path
- JSON pathdelta
- increment value- Returns:
- list of updated value
-
incrementAndGetMultiAsync
Description copied from interface:RJsonBucketAsync
Increments the current values specified by JSONPath bydelta
. Compatible only with enhanced syntax starting with '$' character.- Specified by:
incrementAndGetMultiAsync
in interfaceRJsonBucketAsync<V>
- Parameters:
path
- JSON pathdelta
- increment value- Returns:
- list of updated value
-
countKeys
public long countKeys()Description copied from interface:RJsonBucket
Returns keys amount in JSON container- Specified by:
countKeys
in interfaceRJsonBucket<V>
- Returns:
- keys amount
-
countKeysAsync
Description copied from interface:RJsonBucketAsync
Returns keys amount in JSON container- Specified by:
countKeysAsync
in interfaceRJsonBucketAsync<V>
- Returns:
- keys amount
-
countKeys
Description copied from interface:RJsonBucket
Returns keys amount in JSON container specified by JSONPath- Specified by:
countKeys
in interfaceRJsonBucket<V>
- Parameters:
path
- JSON path- Returns:
- keys amount
-
countKeysAsync
Description copied from interface:RJsonBucketAsync
Returns keys amount in JSON container specified by JSONPath- Specified by:
countKeysAsync
in interfaceRJsonBucketAsync<V>
- Parameters:
path
- JSON path- Returns:
- keys amount
-
countKeysMulti
Description copied from interface:RJsonBucket
Returns list of keys amount in JSON containers specified by JSONPath- Specified by:
countKeysMulti
in interfaceRJsonBucket<V>
- Parameters:
path
- JSON path- Returns:
- list of keys amount
-
countKeysMultiAsync
Description copied from interface:RJsonBucketAsync
Returns list of keys amount in JSON containers specified by JSONPath- Specified by:
countKeysMultiAsync
in interfaceRJsonBucketAsync<V>
- Parameters:
path
- JSON path- Returns:
- list of keys amount
-
getKeys
Description copied from interface:RJsonBucket
Returns list of keys in JSON container- Specified by:
getKeys
in interfaceRJsonBucket<V>
- Returns:
- list of keys
-
getKeysAsync
Description copied from interface:RJsonBucketAsync
Returns list of keys in JSON container- Specified by:
getKeysAsync
in interfaceRJsonBucketAsync<V>
- Returns:
- list of keys
-
getKeys
Description copied from interface:RJsonBucket
Returns list of keys in JSON container specified by JSONPath- Specified by:
getKeys
in interfaceRJsonBucket<V>
- Parameters:
path
- JSON path- Returns:
- list of keys
-
getKeysAsync
Description copied from interface:RJsonBucketAsync
Returns list of keys in JSON container specified by JSONPath- Specified by:
getKeysAsync
in interfaceRJsonBucketAsync<V>
- Parameters:
path
- JSON path- Returns:
- list of keys
-
getKeysMulti
Description copied from interface:RJsonBucket
Returns list of keys in JSON containers specified by JSONPath- Specified by:
getKeysMulti
in interfaceRJsonBucket<V>
- Parameters:
path
- JSON path- Returns:
- list of keys
-
getKeysMultiAsync
Description copied from interface:RJsonBucketAsync
Returns list of keys in JSON containers specified by JSONPath- Specified by:
getKeysMultiAsync
in interfaceRJsonBucketAsync<V>
- Parameters:
path
- JSON path- Returns:
- list of keys
-
toggle
Description copied from interface:RJsonBucket
Toggle boolean value specified by JSONPath- Specified by:
toggle
in interfaceRJsonBucket<V>
- Parameters:
path
- JSON path- Returns:
- new boolean value
-
toggleAsync
Description copied from interface:RJsonBucketAsync
Toggle boolean value specified by JSONPath- Specified by:
toggleAsync
in interfaceRJsonBucketAsync<V>
- Parameters:
path
- JSON path- Returns:
- new boolean value
-
toggleMulti
Description copied from interface:RJsonBucket
Toggle boolean values specified by JSONPath- Specified by:
toggleMulti
in interfaceRJsonBucket<V>
- Parameters:
path
- JSON path- Returns:
- list of boolean values
-
toggleMultiAsync
Description copied from interface:RJsonBucketAsync
Toggle boolean values specified by JSONPath- Specified by:
toggleMultiAsync
in interfaceRJsonBucketAsync<V>
- Parameters:
path
- JSON path- Returns:
- list of boolean values
-
getType
Description copied from interface:RJsonBucket
Returns type of element- Specified by:
getType
in interfaceRJsonBucket<V>
- Returns:
- type of element
-
getTypeAsync
Description copied from interface:RJsonBucketAsync
Returns type of element- Specified by:
getTypeAsync
in interfaceRJsonBucketAsync<V>
- Returns:
- type of element
-
getType
Description copied from interface:RJsonBucket
Returns type of element specified by JSONPath- Specified by:
getType
in interfaceRJsonBucket<V>
- Parameters:
path
- JSON path- Returns:
- type of element
-
getTypeAsync
Description copied from interface:RJsonBucketAsync
Returns type of element specified by JSONPath- Specified by:
getTypeAsync
in interfaceRJsonBucketAsync<V>
- Parameters:
path
- JSON path- Returns:
- type of element
-
delete
Description copied from interface:RJsonBucket
Deletes JSON elements specified by JSONPath- Specified by:
delete
in interfaceRJsonBucket<V>
- Parameters:
path
- JSON path- Returns:
- number of deleted elements
-
deleteAsync
Description copied from interface:RJsonBucketAsync
Deletes JSON elements specified by JSONPath- Specified by:
deleteAsync
in interfaceRJsonBucketAsync<V>
- Parameters:
path
- JSON path- Returns:
- number of deleted elements
-
expire
Description copied from interface:RExpirable
UseRExpirable.expire(Duration)
instead- Specified by:
expire
in interfaceRExpirable
- Parameters:
timeToLive
- - timeout before object will be deletedtimeUnit
- - timeout time unit- Returns:
true
if the timeout was set andfalse
if not
-
expireAsync
Description copied from interface:RExpirableAsync
UseRExpirableAsync.expireAsync(Duration)
instead- Specified by:
expireAsync
in interfaceRExpirableAsync
- Parameters:
timeToLive
- - timeout before object will be deletedtimeUnit
- - timeout time unit- Returns:
true
if the timeout was set andfalse
if not
-
expireAt
public boolean expireAt(long timestamp) Description copied from interface:RExpirable
UseRExpirable.expire(Instant)
instead- Specified by:
expireAt
in interfaceRExpirable
- Parameters:
timestamp
- - expire date in milliseconds (Unix timestamp)- Returns:
true
if the timeout was set andfalse
if not
-
expireAtAsync
Description copied from interface:RExpirableAsync
UseRExpirableAsync.expireAsync(Instant)
instead- Specified by:
expireAtAsync
in interfaceRExpirableAsync
- Parameters:
timestamp
- - expire date in milliseconds (Unix timestamp)- Returns:
true
if the timeout was set andfalse
if not
-
expire
Description copied from interface:RExpirable
Sets an expiration date for this object. When expire date comes the key will automatically be deleted.- Specified by:
expire
in interfaceRExpirable
- Parameters:
instant
- expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireIfSet
Description copied from interface:RExpirable
Sets an expiration date for this object only if it has been already set. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfSet
in interfaceRExpirable
- Parameters:
time
- expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireIfSetAsync
Description copied from interface:RExpirableAsync
Sets an expiration date for this object only if it has been already set. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfSetAsync
in interfaceRExpirableAsync
- Parameters:
time
- expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireIfNotSet
Description copied from interface:RExpirable
Sets an expiration date for this object only if it hasn't been set before. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfNotSet
in interfaceRExpirable
- Parameters:
time
- expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireIfNotSetAsync
Description copied from interface:RExpirableAsync
Sets an expiration date for this object only if it hasn't been set before. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfNotSetAsync
in interfaceRExpirableAsync
- Parameters:
time
- expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireIfGreater
Description copied from interface:RExpirable
Sets an expiration date for this object only if it's greater than expiration date set before. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfGreater
in interfaceRExpirable
- Parameters:
time
- expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireIfGreaterAsync
Description copied from interface:RExpirableAsync
Sets an expiration date for this object only if it's greater than expiration date set before. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfGreaterAsync
in interfaceRExpirableAsync
- Parameters:
time
- expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireIfLess
Description copied from interface:RExpirable
Sets an expiration date for this object only if it's less than expiration date set before. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfLess
in interfaceRExpirable
- Parameters:
time
- expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireIfLessAsync
Description copied from interface:RExpirableAsync
Sets an expiration date for this object only if it's less than expiration date set before. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfLessAsync
in interfaceRExpirableAsync
- Parameters:
time
- expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireAsync
Description copied from interface:RExpirableAsync
Set an expire date for object. When expire date comes the key will automatically be deleted.- Specified by:
expireAsync
in interfaceRExpirableAsync
- Parameters:
instant
- - expire date- Returns:
true
if the timeout was set andfalse
if not
-
expire
Description copied from interface:RExpirable
Sets a timeout for this object. After the timeout has expired, the key will automatically be deleted.- Specified by:
expire
in interfaceRExpirable
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
expireAsync
Description copied from interface:RExpirableAsync
Set a timeout for object. After the timeout has expired, the key will automatically be deleted.- Specified by:
expireAsync
in interfaceRExpirableAsync
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
expireAt
Description copied from interface:RExpirable
UseRExpirable.expire(Instant)
instead- Specified by:
expireAt
in interfaceRExpirable
- Parameters:
timestamp
- - expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireAtAsync
Description copied from interface:RExpirableAsync
UseRExpirableAsync.expireAsync(Instant)
instead- Specified by:
expireAtAsync
in interfaceRExpirableAsync
- Parameters:
timestamp
- - expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireIfSet
Description copied from interface:RExpirable
Sets a timeout for this object only if it has been already set. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfSet
in interfaceRExpirable
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
expireIfSetAsync
Description copied from interface:RExpirableAsync
Sets a timeout for this object only if it has been already set. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfSetAsync
in interfaceRExpirableAsync
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
expireIfNotSet
Description copied from interface:RExpirable
Sets a timeout for this object only if it hasn't been set before. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfNotSet
in interfaceRExpirable
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
expireIfNotSetAsync
Description copied from interface:RExpirableAsync
Sets a timeout for this object only if it hasn't been set before. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfNotSetAsync
in interfaceRExpirableAsync
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
expireIfGreater
Description copied from interface:RExpirable
Sets a timeout for this object only if it's greater than timeout set before. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfGreater
in interfaceRExpirable
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
expireIfGreaterAsync
Description copied from interface:RExpirableAsync
Sets a timeout for this object only if it's greater than timeout set before. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfGreaterAsync
in interfaceRExpirableAsync
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
expireIfLess
Description copied from interface:RExpirable
Sets a timeout for this object only if it's less than timeout set before. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfLess
in interfaceRExpirable
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
expireIfLessAsync
Description copied from interface:RExpirableAsync
Sets a timeout for this object only if it's less than timeout set before. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfLessAsync
in interfaceRExpirableAsync
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
clearExpire
public boolean clearExpire()Description copied from interface:RExpirable
Clear an expire timeout or expire date for object.- Specified by:
clearExpire
in interfaceRExpirable
- Returns:
true
if timeout was removedfalse
if object does not exist or does not have an associated timeout
-
clearExpireAsync
Description copied from interface:RExpirableAsync
Clear an expire timeout or expire date for object in async mode. Object will not be deleted.- Specified by:
clearExpireAsync
in interfaceRExpirableAsync
- Returns:
true
if the timeout was cleared andfalse
if not
-
remainTimeToLive
public long remainTimeToLive()Description copied from interface:RExpirable
Remaining time to live of Redisson object that has a timeout- Specified by:
remainTimeToLive
in interfaceRExpirable
- Returns:
- time in milliseconds -2 if the key does not exist. -1 if the key exists but has no associated expire.
-
remainTimeToLiveAsync
Description copied from interface:RExpirableAsync
Remaining time to live of Redisson object that has a timeout- Specified by:
remainTimeToLiveAsync
in interfaceRExpirableAsync
- Returns:
- time in milliseconds -2 if the key does not exist. -1 if the key exists but has no associated expire.
-
getExpireTime
public long getExpireTime()Description copied from interface:RExpirable
Expiration time of Redisson object that has a timeoutRequires Redis 7.0.0 and higher.
- Specified by:
getExpireTime
in interfaceRExpirable
- Returns:
- expiration time
-
getExpireTimeAsync
Description copied from interface:RExpirableAsync
Expiration time of Redisson object that has a timeoutRequires Redis 7.0.0 and higher.
- Specified by:
getExpireTimeAsync
in interfaceRExpirableAsync
- Returns:
- expiration time
-
expireAsync
-
expireAtAsync
-
clearExpireAsync
-