Package org.redisson
Class RedissonTimeSeries<V>
-
- org.redisson.RedissonObject
-
- org.redisson.RedissonTimeSeries<V>
-
- All Implemented Interfaces:
<V>
,RDestroyable
,RExpirable
,RExpirableAsync
,RObject
,RObjectAsync
,RTimeSeries<V>
,RTimeSeriesAsync<V>
public class RedissonTimeSeries<V> extends RedissonObject implements RTimeSeries<V>
- Author:
- Nikita Koksharov
-
-
Field Summary
-
Fields inherited from class org.redisson.RedissonObject
codec, commandExecutor, name
-
-
Constructor Summary
Constructors Constructor Description RedissonTimeSeries(Codec codec, EvictionScheduler evictionScheduler, CommandAsyncExecutor connectionManager, name)
RedissonTimeSeries(EvictionScheduler evictionScheduler, CommandAsyncExecutor connectionManager, name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(long timestamp, V value)
Adds element to this time-series collection by specifiedtimestamp
.void
add(long timestamp, V value, long timeToLive, timeUnit)
Adds element to this time-series collection by specifiedtimestamp
.void
<,V> objects)
Adds all elements contained in the specified map to this time-series collection.void
<,V> objects, long timeToLive, timeUnit)
Adds all elements contained in the specified map to this time-series collection.>
<,V> objects)
Adds all elements contained in the specified map to this time-series collection.>
<,V> objects, long timeToLive, timeUnit)
Adds all elements contained in the specified map to this time-series collection.>
addAsync(long timestamp, V object)
Adds element to this time-series collection by specifiedtimestamp
.>
addAsync(long timestamp, V object, long timeToLive, timeUnit)
Adds element to this time-series collection by specifiedtimestamp
.boolean
clearExpire()
Clear an expire timeout or expire date for object.>
clearExpireAsync()
Clear an expire timeout or expire date for object in async mode.protected >
... keys)
>
deleteAsync()
Delete object in async modevoid
destroy()
Destroys object when it's not necessary anymore.<TimeSeriesEntry<V>>
entryRange(long startTimestamp, long endTimestamp)
Returns ordered entries of this time-series collection within timestamp range.<TimeSeriesEntry<V>>>
entryRangeAsync(boolean reverse, long startTimestamp, long endTimestamp)
<TimeSeriesEntry<V>>>
entryRangeAsync(long startTimestamp, long endTimestamp)
Returns ordered entries of this time-series collection within timestamp range.<TimeSeriesEntry<V>>
entryRangeReversed(long startTimestamp, long endTimestamp)
Returns entries of this time-series collection in reverse order within timestamp range.<TimeSeriesEntry<V>>>
entryRangeReversedAsync(long startTimestamp, long endTimestamp)
Returns entries of this time-series collection in reverse order within timestamp range.boolean
expire(long timeToLive, timeUnit)
Set a timeout for object.boolean
instant)
Set an expire date for object.>
expireAsync(long timeToLive, timeUnit)
Set a timeout for object in async mode.protected >
expireAsync(long timeToLive, timeUnit, ... keys)
>
instant)
Set an expire date for object.boolean
expireAt(long timestamp)
UseRExpirable.expire(Instant)
insteadboolean
timestamp)
UseRExpirable.expire(Instant)
instead>
expireAtAsync(long timestamp)
UseRExpirableAsync.expireAsync(Instant)
insteadprotected >
expireAtAsync(long timestamp, ... keys)
>
timestamp)
UseRExpirableAsync.expireAsync(Instant)
insteadV
first()
Returns the head element ornull
if this time-series collection is empty.<V>
first(int count)
Returns the head elements of this time-series collection.RFuture<V>
firstAsync()
Returns the head element ornull
if this time-series collection is empty.<V>>
firstAsync(int count)
Returns the head elements of this time-series collection.firstTimestamp()
Returns timestamp of the head timestamp ornull
if this time-series collection is empty.>
firstTimestampAsync()
Returns timestamp of the head timestamp ornull
if this time-series collection is empty.V
get(long timestamp)
Returns object by specifiedtimestamp
ornull
if it doesn't exist.RFuture<V>
getAsync(long timestamp)
Returns object by specifiedtimestamp
ornull
if it doesn't exist.<V>
iterator()
<V>
iterator(int count)
Returns an iterator over elements in this time-series collection.V
last()
Returns the tail element ornull
if this time-series collection is empty.<V>
last(int count)
Returns the tail elements of this time-series collection.RFuture<V>
lastAsync()
Returns the tail element ornull
if this time-series collection is empty.<V>>
lastAsync(int count)
Returns the tail elements of this time-series collection.lastTimestamp()
Returns timestamp of the tail element ornull
if this time-series collection is empty.>
lastTimestampAsync()
Returns timestamp of the tail element ornull
if this time-series collection is empty.V
pollFirst()
Removes and returns the head element ornull
if this time-series collection is empty.<V>
pollFirst(int count)
Removes and returns the head elements ornull
if this time-series collection is empty.RFuture<V>
pollFirstAsync()
Removes and returns the head element ornull
if this time-series collection is empty.<V>>
pollFirstAsync(int count)
Removes and returns the head elements ornull
if this time-series collection is empty.V
pollLast()
Removes and returns the tail element ornull
if this time-series collection is empty.<V>
pollLast(int count)
Removes and returns the tail elements ornull
if this time-series collection is empty.RFuture<V>
pollLastAsync()
Removes and returns the tail element ornull
if this time-series collection is empty.<V>>
pollLastAsync(int count)
Removes and returns the tail elements ornull
if this time-series collection is empty.<V>
range(long startTimestamp, long endTimestamp)
Returns ordered elements of this time-series collection within timestamp range.<V>>
rangeAsync(long startTimestamp, long endTimestamp)
Returns ordered elements of this time-series collection within timestamp range.<V>
rangeReversed(long startTimestamp, long endTimestamp)
Returns elements of this time-series collection in reverse order within timestamp range.<V>>
rangeReversedAsync(long startTimestamp, long endTimestamp)
Returns elements of this time-series collection in reverse order within timestamp range.long
remainTimeToLive()
Remaining time to live of Redisson object that has a timeout>
remainTimeToLiveAsync()
Remaining time to live of Redisson object that has a timeoutboolean
remove(long timestamp)
Removes object by specifiedtimestamp
.>
removeAsync(long timestamp)
Removes object by specifiedtimestamp
.int
removeRange(long startTimestamp, long endTimestamp)
Removes values within timestamp range.>
removeRangeAsync(long startTimestamp, long endTimestamp)
Removes values within timestamp range.>
name, RedisClient client, long startPos, int count)
>>
name, RedisClient client, long startPos, int count)
int
size()
Returns size of this set.>
sizeAsync()
Returns size of this set.>
sizeInMemoryAsync()
Returns bytes amount used by object in Redis memory.<V>
stream()
Returns stream of elements in this time-series collection.<V>
stream(int count)
Returns stream of elements in this time-series collection.-
Methods inherited from class org.redisson.RedissonObject
addListener, addListener, addListenerAsync, addListenerAsync, copy, copyAsync, delete, deleteAsync, dump, dumpAsync, encode, encode, encode, encode, encodeMapKey, encodeMapKeys, encodeMapValue, encodeMapValues, get, getCodec, getIdleTime, getIdleTimeAsync, getLockByMapKey, getLockByValue, getName, getRawName, getRawName, isExists, isExistsAsync, migrate, migrateAsync, move, moveAsync, prefixName, removeListener, removeListenerAsync, removeListenersAsync, rename, renameAsync, renamenx, renamenxAsync, restore, restore, restoreAndReplace, restoreAndReplace, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, setName, sizeInMemory, sizeInMemoryAsync, sizeInMemoryAsync, suffixName, toSeconds, toStream, touch, touchAsync, unlink, unlinkAsync
-
Methods inherited from interface org.redisson.api.RExpirable
clearExpire, expire, expire, expireAt, expireAt, remainTimeToLive
-
Methods inherited from interface org.redisson.api.RExpirableAsync
expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsync
-
Methods inherited from interface org.redisson.api.RObject
addListener, 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
addListenerAsync, copyAsync, dumpAsync, getIdleTimeAsync, isExistsAsync, migrateAsync, moveAsync, removeListenerAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, touchAsync, unlinkAsync
-
-
-
-
Constructor Detail
-
RedissonTimeSeries
public RedissonTimeSeries(EvictionScheduler evictionScheduler, CommandAsyncExecutor connectionManager, name)
-
RedissonTimeSeries
public RedissonTimeSeries(Codec codec, EvictionScheduler evictionScheduler, CommandAsyncExecutor connectionManager, name)
-
-
Method Detail
-
add
public void add(long timestamp, V value)
Description copied from interface:RTimeSeries
Adds element to this time-series collection by specifiedtimestamp
.- Specified by:
add
in interfaceRTimeSeries<V>
- Parameters:
timestamp
- - object timestampvalue
- - object itself
-
addAsync
public > addAsync(long timestamp, V object)
Description copied from interface:RTimeSeriesAsync
Adds element to this time-series collection by specifiedtimestamp
.- Specified by:
addAsync
in interfaceRTimeSeriesAsync<V>
- Parameters:
timestamp
- - object timestampobject
- - object itself- Returns:
- void
-
addAll
public void addAll(<,V> objects)
Description copied from interface:RTimeSeries
Adds all elements contained in the specified map to this time-series collection. Map contains of timestamp mapped by object.- Specified by:
addAll
in interfaceRTimeSeries<V>
- Parameters:
objects
- - map of elements to add
-
add
public void add(long timestamp, V value, long timeToLive, timeUnit)
Description copied from interface:RTimeSeries
Adds element to this time-series collection by specifiedtimestamp
.- Specified by:
add
in interfaceRTimeSeries<V>
- Parameters:
timestamp
- - object timestampvalue
- - object itselftimeToLive
- - time to live intervaltimeUnit
- - unit of time to live interval
-
addAsync
public > addAsync(long timestamp, V object, long timeToLive, timeUnit)
Description copied from interface:RTimeSeriesAsync
Adds element to this time-series collection by specifiedtimestamp
.- Specified by:
addAsync
in interfaceRTimeSeriesAsync<V>
- Parameters:
timestamp
- - object timestampobject
- - object itselftimeToLive
- - time to live intervaltimeUnit
- - unit of time to live interval- Returns:
- void
-
addAll
public void addAll(<,V> objects, long timeToLive, timeUnit)
Description copied from interface:RTimeSeries
Adds all elements contained in the specified map to this time-series collection. Map contains of timestamp mapped by object.- Specified by:
addAll
in interfaceRTimeSeries<V>
- Parameters:
objects
- - map of elements to addtimeToLive
- - time to live intervaltimeUnit
- - unit of time to live interval
-
addAllAsync
public > addAllAsync(<,V> objects)
Description copied from interface:RTimeSeriesAsync
Adds all elements contained in the specified map to this time-series collection. Map contains of timestamp mapped by object.- Specified by:
addAllAsync
in interfaceRTimeSeriesAsync<V>
- Parameters:
objects
- - map of elements to add- Returns:
- void
-
addAllAsync
public > addAllAsync(<,V> objects, long timeToLive, timeUnit)
Description copied from interface:RTimeSeriesAsync
Adds all elements contained in the specified map to this time-series collection. Map contains of timestamp mapped by object.- Specified by:
addAllAsync
in interfaceRTimeSeriesAsync<V>
- Parameters:
objects
- - map of elements to addtimeToLive
- - time to live intervaltimeUnit
- - unit of time to live interval- Returns:
- void
-
size
public int size()
Description copied from interface:RTimeSeries
Returns size of this set.- Specified by:
size
in interfaceRTimeSeries<V>
- Returns:
- size
-
sizeAsync
public > sizeAsync()
Description copied from interface:RTimeSeriesAsync
Returns size of this set.- Specified by:
sizeAsync
in interfaceRTimeSeriesAsync<V>
- Returns:
- size
-
get
public V get(long timestamp)
Description copied from interface:RTimeSeries
Returns object by specifiedtimestamp
ornull
if it doesn't exist.- Specified by:
get
in interfaceRTimeSeries<V>
- Parameters:
timestamp
- - object timestamp- Returns:
- object
-
getAsync
public RFuture<V> getAsync(long timestamp)
Description copied from interface:RTimeSeriesAsync
Returns object by specifiedtimestamp
ornull
if it doesn't exist.- Specified by:
getAsync
in interfaceRTimeSeriesAsync<V>
- Parameters:
timestamp
- - object timestamp- Returns:
- object
-
remove
public boolean remove(long timestamp)
Description copied from interface:RTimeSeries
Removes object by specifiedtimestamp
.- Specified by:
remove
in interfaceRTimeSeries<V>
- Parameters:
timestamp
- - object timestamp- Returns:
true
if an element was removed as a result of this call
-
removeAsync
public > removeAsync(long timestamp)
Description copied from interface:RTimeSeriesAsync
Removes object by specifiedtimestamp
.- Specified by:
removeAsync
in interfaceRTimeSeriesAsync<V>
- Parameters:
timestamp
- - object timestamp- Returns:
true
if an element was removed as a result of this call
-
last
public V last()
Description copied from interface:RTimeSeries
Returns the tail element ornull
if this time-series collection is empty.- Specified by:
last
in interfaceRTimeSeries<V>
- Returns:
- the tail element or
null
if this time-series collection is empty
-
lastAsync
public RFuture<V> lastAsync()
Description copied from interface:RTimeSeriesAsync
Returns the tail element ornull
if this time-series collection is empty.- Specified by:
lastAsync
in interfaceRTimeSeriesAsync<V>
- Returns:
- the tail element or
null
if this time-series collection is empty
-
lastAsync
public <V>> lastAsync(int count)
Description copied from interface:RTimeSeriesAsync
Returns the tail elements of this time-series collection.- Specified by:
lastAsync
in interfaceRTimeSeriesAsync<V>
- Parameters:
count
- - elements amount- Returns:
- the tail elements
-
first
public V first()
Description copied from interface:RTimeSeries
Returns the head element ornull
if this time-series collection is empty.- Specified by:
first
in interfaceRTimeSeries<V>
- Returns:
- the head element or
null
if this time-series collection is empty
-
firstAsync
public RFuture<V> firstAsync()
Description copied from interface:RTimeSeriesAsync
Returns the head element ornull
if this time-series collection is empty.- Specified by:
firstAsync
in interfaceRTimeSeriesAsync<V>
- Returns:
- the head element or
null
if this time-series collection is empty
-
firstAsync
public <V>> firstAsync(int count)
Description copied from interface:RTimeSeriesAsync
Returns the head elements of this time-series collection.- Specified by:
firstAsync
in interfaceRTimeSeriesAsync<V>
- Parameters:
count
- - elements amount- Returns:
- the head elements
-
first
public <V> first(int count)
Description copied from interface:RTimeSeries
Returns the head elements of this time-series collection.- Specified by:
first
in interfaceRTimeSeries<V>
- Parameters:
count
- - elements amount- Returns:
- the head elements
-
last
public <V> last(int count)
Description copied from interface:RTimeSeries
Returns the tail elements of this time-series collection.- Specified by:
last
in interfaceRTimeSeries<V>
- Parameters:
count
- - elements amount- Returns:
- the tail elements
-
firstTimestamp
public firstTimestamp()
Description copied from interface:RTimeSeries
Returns timestamp of the head timestamp ornull
if this time-series collection is empty.- Specified by:
firstTimestamp
in interfaceRTimeSeries<V>
- Returns:
- timestamp or
null
if this time-series collection is empty
-
firstTimestampAsync
public > firstTimestampAsync()
Description copied from interface:RTimeSeriesAsync
Returns timestamp of the head timestamp ornull
if this time-series collection is empty.- Specified by:
firstTimestampAsync
in interfaceRTimeSeriesAsync<V>
- Returns:
- timestamp or
null
if this time-series collection is empty
-
lastTimestamp
public lastTimestamp()
Description copied from interface:RTimeSeries
Returns timestamp of the tail element ornull
if this time-series collection is empty.- Specified by:
lastTimestamp
in interfaceRTimeSeries<V>
- Returns:
- timestamp or
null
if this time-series collection is empty
-
lastTimestampAsync
public > lastTimestampAsync()
Description copied from interface:RTimeSeriesAsync
Returns timestamp of the tail element ornull
if this time-series collection is empty.- Specified by:
lastTimestampAsync
in interfaceRTimeSeriesAsync<V>
- Returns:
- timestamp or
null
if this time-series collection is empty
-
removeRange
public int removeRange(long startTimestamp, long endTimestamp)
Description copied from interface:RTimeSeries
Removes values within timestamp range. Including boundary values.- Specified by:
removeRange
in interfaceRTimeSeries<V>
- Parameters:
startTimestamp
- - start timestampendTimestamp
- - end timestamp- Returns:
- number of removed elements
-
removeRangeAsync
public > removeRangeAsync(long startTimestamp, long endTimestamp)
Description copied from interface:RTimeSeriesAsync
Removes values within timestamp range. Including boundary values.- Specified by:
removeRangeAsync
in interfaceRTimeSeriesAsync<V>
- Parameters:
startTimestamp
- - start timestampendTimestamp
- - end timestamp- Returns:
- number of removed elements
-
range
public <V> range(long startTimestamp, long endTimestamp)
Description copied from interface:RTimeSeries
Returns ordered elements of this time-series collection within timestamp range. Including boundary values.- Specified by:
range
in interfaceRTimeSeries<V>
- Parameters:
startTimestamp
- - start timestampendTimestamp
- - end timestamp- Returns:
- elements collection
-
entryRange
public <TimeSeriesEntry<V>> entryRange(long startTimestamp, long endTimestamp)
Description copied from interface:RTimeSeries
Returns ordered entries of this time-series collection within timestamp range. Including boundary values.- Specified by:
entryRange
in interfaceRTimeSeries<V>
- Parameters:
startTimestamp
- - start timestampendTimestamp
- - end timestamp- Returns:
- elements collection
-
entryRangeReversed
public <TimeSeriesEntry<V>> entryRangeReversed(long startTimestamp, long endTimestamp)
Description copied from interface:RTimeSeries
Returns entries of this time-series collection in reverse order within timestamp range. Including boundary values.- Specified by:
entryRangeReversed
in interfaceRTimeSeries<V>
- Parameters:
startTimestamp
- - start timestampendTimestamp
- - end timestamp- Returns:
- elements collection
-
entryRangeReversedAsync
public <TimeSeriesEntry<V>>> entryRangeReversedAsync(long startTimestamp, long endTimestamp)
Description copied from interface:RTimeSeriesAsync
Returns entries of this time-series collection in reverse order within timestamp range. Including boundary values.- Specified by:
entryRangeReversedAsync
in interfaceRTimeSeriesAsync<V>
- Parameters:
startTimestamp
- - start timestampendTimestamp
- - end timestamp- Returns:
- elements collection
-
entryRangeAsync
public <TimeSeriesEntry<V>>> entryRangeAsync(long startTimestamp, long endTimestamp)
Description copied from interface:RTimeSeriesAsync
Returns ordered entries of this time-series collection within timestamp range. Including boundary values.- Specified by:
entryRangeAsync
in interfaceRTimeSeriesAsync<V>
- Parameters:
startTimestamp
- - start timestampendTimestamp
- - end timestamp- Returns:
- elements collection
-
entryRangeAsync
public <TimeSeriesEntry<V>>> entryRangeAsync(boolean reverse, long startTimestamp, long endTimestamp)
-
rangeAsync
public <V>> rangeAsync(long startTimestamp, long endTimestamp)
Description copied from interface:RTimeSeriesAsync
Returns ordered elements of this time-series collection within timestamp range. Including boundary values.- Specified by:
rangeAsync
in interfaceRTimeSeriesAsync<V>
- Parameters:
startTimestamp
- - start timestampendTimestamp
- - end timestamp- Returns:
- elements collection
-
rangeReversed
public <V> rangeReversed(long startTimestamp, long endTimestamp)
Description copied from interface:RTimeSeries
Returns elements of this time-series collection in reverse order within timestamp range. Including boundary values.- Specified by:
rangeReversed
in interfaceRTimeSeries<V>
- Parameters:
startTimestamp
- - start timestampendTimestamp
- - end timestamp- Returns:
- elements collection
-
rangeReversedAsync
public <V>> rangeReversedAsync(long startTimestamp, long endTimestamp)
Description copied from interface:RTimeSeriesAsync
Returns elements of this time-series collection in reverse order within timestamp range. Including boundary values.- Specified by:
rangeReversedAsync
in interfaceRTimeSeriesAsync<V>
- Parameters:
startTimestamp
- - start timestampendTimestamp
- - end timestamp- Returns:
- elements collection
-
pollFirst
public <V> pollFirst(int count)
Description copied from interface:RTimeSeries
Removes and returns the head elements ornull
if this time-series collection is empty.- Specified by:
pollFirst
in interfaceRTimeSeries<V>
- Parameters:
count
- - elements amount- Returns:
- the head element,
or
null
if this time-series collection is empty
-
pollLast
public <V> pollLast(int count)
Description copied from interface:RTimeSeries
Removes and returns the tail elements ornull
if this time-series collection is empty.- Specified by:
pollLast
in interfaceRTimeSeries<V>
- Parameters:
count
- - elements amount- Returns:
- the tail element or
null
if this time-series collection is empty
-
pollFirstAsync
public <V>> pollFirstAsync(int count)
Description copied from interface:RTimeSeriesAsync
Removes and returns the head elements ornull
if this time-series collection is empty.- Specified by:
pollFirstAsync
in interfaceRTimeSeriesAsync<V>
- Parameters:
count
- - elements amount- Returns:
- the head element,
or
null
if this time-series collection is empty
-
pollLastAsync
public <V>> pollLastAsync(int count)
Description copied from interface:RTimeSeriesAsync
Removes and returns the tail elements ornull
if this time-series collection is empty.- Specified by:
pollLastAsync
in interfaceRTimeSeriesAsync<V>
- Parameters:
count
- - elements amount- Returns:
- the tail element or
null
if this time-series collection is empty
-
pollFirst
public V pollFirst()
Description copied from interface:RTimeSeries
Removes and returns the head element ornull
if this time-series collection is empty.- Specified by:
pollFirst
in interfaceRTimeSeries<V>
- Returns:
- the head element,
or
null
if this time-series collection is empty
-
pollLast
public V pollLast()
Description copied from interface:RTimeSeries
Removes and returns the tail element ornull
if this time-series collection is empty.- Specified by:
pollLast
in interfaceRTimeSeries<V>
- Returns:
- the tail element or
null
if this time-series collection is empty
-
pollFirstAsync
public RFuture<V> pollFirstAsync()
Description copied from interface:RTimeSeriesAsync
Removes and returns the head element ornull
if this time-series collection is empty.- Specified by:
pollFirstAsync
in interfaceRTimeSeriesAsync<V>
- Returns:
- the head element,
or
null
if this time-series collection is empty
-
pollLastAsync
public RFuture<V> pollLastAsync()
Description copied from interface:RTimeSeriesAsync
Removes and returns the tail element ornull
if this time-series collection is empty.- Specified by:
pollLastAsync
in interfaceRTimeSeriesAsync<V>
- Returns:
- the tail element or
null
if this time-series collection is empty
-
scanIterator
public > scanIterator( name, RedisClient client, long startPos, int count)
-
scanIteratorAsync
public >> scanIteratorAsync( name, RedisClient client, long startPos, int count)
-
iterator
public <V> iterator(int count)
Description copied from interface:RTimeSeries
Returns an iterator over elements in this time-series collection. Elements are loaded in batch. Batch size is defined bycount
param.- Specified by:
iterator
in interfaceRTimeSeries<V>
- Parameters:
count
- - size of elements batch- Returns:
- iterator
-
stream
public <V> stream()
Description copied from interface:RTimeSeries
Returns stream of elements in this time-series collection. Elements are loaded in batch. Batch size is 10.- Specified by:
stream
in interfaceRTimeSeries<V>
- Returns:
- stream of elements
-
stream
public <V> stream(int count)
Description copied from interface:RTimeSeries
Returns stream of elements in this time-series collection. Elements are loaded in batch. Batch size is defined bycount
param.- Specified by:
stream
in interfaceRTimeSeries<V>
- Parameters:
count
- - size of elements batch- Returns:
- stream of elements
-
destroy
public void destroy()
Description copied from interface:RDestroyable
Destroys object when it's not necessary anymore.- Specified by:
destroy
in interfaceRDestroyable
-
deleteAsync
public > 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
-
expireAsync
public > expireAsync(long timeToLive, timeUnit)
Description copied from interface:RExpirableAsync
Set a timeout for object in async mode. After the timeout has expired, the key will automatically be deleted.- 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
-
expireAtAsync
protected > expireAtAsync(long timestamp, ... keys)
-
clearExpireAsync
public > 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
-
sizeInMemoryAsync
public > sizeInMemoryAsync()
Description copied from interface:RObjectAsync
Returns bytes amount used by object in Redis memory.- Specified by:
sizeInMemoryAsync
in interfaceRObjectAsync
- Overrides:
sizeInMemoryAsync
in classRedissonObject
- Returns:
- size in bytes
-
expire
public boolean expire(long timeToLive, timeUnit)
Description copied from interface:RExpirable
Set a timeout for object. After the timeout has expired, the key will automatically be deleted.- 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
-
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
public > expireAtAsync(long timestamp)
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
public boolean expire( instant)
Description copied from interface:RExpirable
Set an expire date for 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
-
expireAsync
public > expireAsync( instant)
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
-
expireAt
public boolean expireAt( timestamp)
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
public > expireAtAsync( timestamp)
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
-
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
-
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
public > 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.
-
expireAsync
protected > expireAsync(long timeToLive, timeUnit, ... keys)
-
clearExpireAsync
protected > clearExpireAsync(... keys)
-
-