Package org.redisson
Class RedissonSet<V>
-
- org.redisson.RedissonObject
-
- org.redisson.RedissonSet<V>
-
- Type Parameters:
V
- value
- All Implemented Interfaces:
<V>
,<V>
,<V>
,<V>>
,<V>>
,ScanIterator
- Direct Known Subclasses:
RedissonTransactionalSet
public class RedissonSet<V> extends RedissonObject implements RSet<V>, ScanIterator
Distributed and concurrent implementation of- Author:
- Nikita Koksharov
-
-
Field Summary
-
Fields inherited from class org.redisson.RedissonObject
codec, commandExecutor, name
-
-
Constructor Summary
Constructors Constructor Description RedissonSet(Codec codec, CommandAsyncExecutor commandExecutor, name, RedissonClient redisson)
RedissonSet(CommandAsyncExecutor commandExecutor, name, RedissonClient redisson)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
add(V e)
boolean
<? extends V> c)
>
<? extends V> c)
Adds all elements contained in the specified collection>
addAsync(V e)
Adds element into this collection.void
clear()
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)
boolean
o)
boolean
<?> c)
>
<?> c)
Returnstrue
if this collection contains all of the elements in the specified collection.>
o)
Returnstrue
if this collection contains encoded state of the specified element.int
... names)
Diff sets specified by name and write to current set.>
... names)
Diff sets specified by name and write to current set.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)
insteadRCountDownLatch
getCountDownLatch(V value)
ReturnsRCountDownLatch
instance associated withvalue
RLock
getFairLock(V value)
ReturnsRLock
instance associated withvalue
RLock
getLock(V value)
Returns lock instance associated withvalue
RPermitExpirableSemaphore
getPermitExpirableSemaphore(V value)
ReturnsRPermitExpirableSemaphore
instance associated withvalue
RReadWriteLock
getReadWriteLock(V value)
ReturnsRReadWriteLock
instance associated withvalue
RSemaphore
getSemaphore(V value)
ReturnsRSemaphore
instance associated withvalue
int
... names)
Intersection sets specified by name and write to current set.>
... names)
Intersection sets specified by name and write to current set.boolean
isEmpty()
<V>
iterator()
<V>
iterator(int count)
Returns elements iterator fetches elements in a batch.<V>
pattern)
Returns elements iterator.<V>
pattern, int count)
Returns elements iterator fetches elements in a batch.<KOut,VOut>
RCollectionMapReduce<V,KOut,VOut>mapReduce()
ReturnsRMapReduce
object associated with this objectboolean
destination, V member)
Move a member from this set to the given destination set in.>
destination, V member)
Move a member from this set to the given destination set in async mode.V
random()
Returns random element<V>
random(int count)
Returns random elements from set limited bycount
RFuture<V>
randomAsync()
Returns random element from set in async mode<V>>
randomAsync(int count)
Returns random elements from set limited bycount
<V>
readAll()
Read all elements at once<V>>
readAllAsync()
Read all elements at once<V>
... names)
Diff sets specified by name with current set.<V>>
... names)
Diff sets specified by name with current set.<V>
... names)
Intersection sets specified by name with current set without current set state change.<V>>
... names)
Intersection sets specified by name with current set.<T> <T>
byPattern, <> getPatterns, SortOrder order)
Read data in sorted view<T> <T>
byPattern, <> getPatterns, SortOrder order, int offset, int count)
Read data in sorted view<V>
byPattern, SortOrder order)
Read data in sorted view<V>
byPattern, SortOrder order, int offset, int count)
Read data in sorted view<V>
readSort(SortOrder order)
Read data in sorted view<V>
readSort(SortOrder order, int offset, int count)
Read data in sorted view<T> <T>
byPattern, <> getPatterns, SortOrder order)
Read data in sorted view lexicographically<T> <T>
byPattern, <> getPatterns, SortOrder order, int offset, int count)
Read data in sorted view lexicographically<V>
byPattern, SortOrder order)
Read data in sorted view lexicographically<V>
byPattern, SortOrder order, int offset, int count)
Read data in sorted view lexicographically<V>
readSortAlpha(SortOrder order)
Read data in sorted view lexicographically<V>
readSortAlpha(SortOrder order, int offset, int count)
Read data in sorted view lexicographically<T> <T>>
byPattern, <> getPatterns, SortOrder order)
Read data in sorted view lexicographically<T> <T>>
byPattern, <> getPatterns, SortOrder order, int offset, int count)
Read data in sorted view lexicographically<V>>
byPattern, SortOrder order)
Read data in sorted view lexicographically<V>>
byPattern, SortOrder order, int offset, int count)
Read data in sorted view lexicographically<V>>
readSortAlphaAsync(SortOrder order)
Read data in sorted view lexicographically<V>>
readSortAlphaAsync(SortOrder order, int offset, int count)
Read data in sorted view lexicographically<T> <T>>
byPattern, <> getPatterns, SortOrder order)
Read data in sorted view<T> <T>>
byPattern, <> getPatterns, SortOrder order, int offset, int count)
Read data in sorted view<V>>
byPattern, SortOrder order)
Read data in sorted view<V>>
byPattern, SortOrder order, int offset, int count)
Read data in sorted view<V>>
readSortAsync(SortOrder order)
Read data in sorted view<V>>
readSortAsync(SortOrder order, int offset, int count)
Read data in sorted view<V>
... names)
Union sets specified by name with current set without current set state change.<V>>
... names)
Union sets specified by name with current set.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
value)
boolean
<?> c)
>
<?> c)
Removes all of this collection's elements that are also contained in the specified collection.>
o)
Removes a single instance of the specified element from this collection, if it is present.V
removeRandom()
Removes and returns random element<V>
removeRandom(int amount)
Removes and returns random elements limited byamount
RFuture<V>
removeRandomAsync()
Removes and returns random element from set in async mode<V>>
removeRandomAsync(int amount)
Removes and returns random elements from set in async modeboolean
<?> c)
>
<?> c)
Retains only the elements in this collection that are contained in the specified collection.>
name, RedisClient client, long startPos, pattern, int count)
>>
name, RedisClient client, long startPos, pattern, int count)
int
size()
>
sizeAsync()
Returns number of elements in this collection.int
destName, byPattern, <> getPatterns, SortOrder order)
Sort data and store todestName
listint
destName, byPattern, <> getPatterns, SortOrder order, int offset, int count)
Sort data and store todestName
listint
destName, byPattern, SortOrder order)
Sort data and store todestName
listint
destName, byPattern, SortOrder order, int offset, int count)
Sort data and store todestName
listint
destName, SortOrder order)
Sort data and store todestName
listint
destName, SortOrder order, int offset, int count)
Sort data and store todestName
list>
destName, byPattern, <> getPatterns, SortOrder order)
Sort data and store todestName
list>
destName, byPattern, <> getPatterns, SortOrder order, int offset, int count)
Sort data and store todestName
list>
destName, byPattern, SortOrder order)
Sort data and store todestName
list>
destName, byPattern, SortOrder order, int offset, int count)
Sort data and store todestName
list>
destName, SortOrder order)
Sort data and store todestName
list>
destName, SortOrder order, int offset, int count)
Sort data and store todestName
list<V>
stream(int count)
Returns stream of elements fetches elements in a batch.<V>
pattern)
Returns stream of elements.<V>
pattern, int count)
Returns stream of elements fetches elements in a batch.[]
toArray()
<T> T[]
toArray(T[] a)
toString()
boolean
tryAdd(V... values)
Tries to add elements only if none of them in set.>
tryAddAsync(V... values)
Tries to add elements only if none of them in set.int
... names)
Union sets specified by name and write to current set.>
... names)
Union sets specified by name and write to current set.-
Methods inherited from class org.redisson.RedissonObject
addListener, addListener, addListenerAsync, addListenerAsync, copy, copyAsync, delete, deleteAsync, 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, 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
clearExpireAsync, expireAsync, 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, deleteAsync, dumpAsync, getIdleTimeAsync, isExistsAsync, migrateAsync, moveAsync, removeListenerAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemoryAsync, touchAsync, unlinkAsync
-
-
-
-
Constructor Detail
-
RedissonSet
public RedissonSet(CommandAsyncExecutor commandExecutor, name, RedissonClient redisson)
-
RedissonSet
public RedissonSet(Codec codec, CommandAsyncExecutor commandExecutor, name, RedissonClient redisson)
-
-
Method Detail
-
mapReduce
public <KOut,VOut> RCollectionMapReduce<V,KOut,VOut> mapReduce()
Description copied from interface:RSet
ReturnsRMapReduce
object associated with this object
-
sizeAsync
public > sizeAsync()
Description copied from interface:RCollectionAsync
Returns number of elements in this collection.- Specified by:
sizeAsync
in interfaceRCollectionAsync<V>
- Returns:
- size of collection
-
containsAsync
public > containsAsync( o)
Description copied from interface:RCollectionAsync
Returnstrue
if this collection contains encoded state of the specified element.- Specified by:
containsAsync
in interfaceRCollectionAsync<V>
- Parameters:
o
- element whose presence in this collection is to be tested- Returns:
true
if this collection contains the specified element andfalse
otherwise
-
scanIterator
public > scanIterator( name, RedisClient client, long startPos, pattern, int count)
- Specified by:
scanIterator
in interfaceScanIterator
-
iterator
public <V> iterator(int count)
Description copied from interface:RSet
Returns elements iterator fetches elements in a batch. Batch size is defined bycount
param.
-
iterator
public < pattern)
Description copied from interface:RSet
Returns elements iterator. Ifpattern
is not null then only elements match this pattern are loaded.
-
iterator
public < pattern, int count)
Description copied from interface:RSet
Returns elements iterator fetches elements in a batch. Batch size is defined bycount
param. If pattern is not null then only elements match this pattern are loaded.
-
iterator
public <V> iterator()
-
readAllAsync
public <V>> readAllAsync()
Description copied from interface:RSetAsync
Read all elements at once- Specified by:
readAllAsync
in interfaceRSetAsync<V>
- Returns:
- values
-
toArray
public <T> T[] toArray(T[] a)
-
addAsync
public > addAsync(V e)
Description copied from interface:RCollectionAsync
Adds element into this collection.- Specified by:
addAsync
in interfaceRCollectionAsync<V>
- Parameters:
e
- - element to add- Returns:
true
if an element was added andfalse
if it is already present
-
removeRandom
public V removeRandom()
Description copied from interface:RSet
Removes and returns random element- Specified by:
removeRandom
in interfaceRSet<V>
- Returns:
- random element
-
removeRandomAsync
public RFuture<V> removeRandomAsync()
Description copied from interface:RSetAsync
Removes and returns random element from set in async mode- Specified by:
removeRandomAsync
in interfaceRSetAsync<V>
- Returns:
- value
-
removeRandom
public <V> removeRandom(int amount)
Description copied from interface:RSet
Removes and returns random elements limited byamount
- Specified by:
removeRandom
in interfaceRSet<V>
- Parameters:
amount
- of random elements- Returns:
- random elements
-
removeRandomAsync
public <V>> removeRandomAsync(int amount)
Description copied from interface:RSetAsync
Removes and returns random elements from set in async mode- Specified by:
removeRandomAsync
in interfaceRSetAsync<V>
- Parameters:
amount
- of random values- Returns:
- random values
-
randomAsync
public RFuture<V> randomAsync()
Description copied from interface:RSetAsync
Returns random element from set in async mode- Specified by:
randomAsync
in interfaceRSetAsync<V>
- Returns:
- value
-
random
public <V> random(int count)
Description copied from interface:RSet
Returns random elements from set limited bycount
-
randomAsync
public <V>> randomAsync(int count)
Description copied from interface:RSetAsync
Returns random elements from set limited bycount
- Specified by:
randomAsync
in interfaceRSetAsync<V>
- Parameters:
count
- - values amount to return- Returns:
- value
-
removeAsync
public > removeAsync( o)
Description copied from interface:RCollectionAsync
Removes a single instance of the specified element from this collection, if it is present.- Specified by:
removeAsync
in interfaceRCollectionAsync<V>
- Parameters:
o
- element to be removed from this collection, if present- Returns:
true
if an element was removed as a result of this call
-
remove
public boolean remove( value)
- Specified by:
in interface
<V>
- Specified by:
remove
in interfaceScanIterator
- Specified by:
in interface
<V>
-
moveAsync
public > moveAsync( destination, V member)
Description copied from interface:RSetAsync
Move a member from this set to the given destination set in async mode.
-
move
public boolean move( destination, V member)
Description copied from interface:RSet
Move a member from this set to the given destination set in.
-
containsAll
public boolean containsAll(<?> c)
-
containsAllAsync
public > containsAllAsync(<?> c)
Description copied from interface:RCollectionAsync
Returnstrue
if this collection contains all of the elements in the specified collection.- Specified by:
containsAllAsync
in interfaceRCollectionAsync<V>
- Parameters:
c
- collection to be checked for containment in this collection- Returns:
true
if this collection contains all of the elements in the specified collection
-
addAll
public boolean addAll(<? extends V> c)
-
addAllAsync
public > addAllAsync(<? extends V> c)
Description copied from interface:RCollectionAsync
Adds all elements contained in the specified collection- Specified by:
addAllAsync
in interfaceRCollectionAsync<V>
- Parameters:
c
- - collection of elements to add- Returns:
true
if at least one element was added andfalse
if all elements are already present
-
retainAll
public boolean retainAll(<?> c)
-
retainAllAsync
public > retainAllAsync(<?> c)
Description copied from interface:RCollectionAsync
Retains only the elements in this collection that are contained in the specified collection.- Specified by:
retainAllAsync
in interfaceRCollectionAsync<V>
- Parameters:
c
- collection containing elements to be retained in this collection- Returns:
true
if this collection changed as a result of the call
-
removeAllAsync
public > removeAllAsync(<?> c)
Description copied from interface:RCollectionAsync
Removes all of this collection's elements that are also contained in the specified collection.- Specified by:
removeAllAsync
in interfaceRCollectionAsync<V>
- Parameters:
c
- collection containing elements to be removed from this collection- Returns:
true
if this collection changed as a result of the call
-
removeAll
public boolean removeAll(<?> c)
-
union
public int union(... names)
Description copied from interface:RSet
Union sets specified by name and write to current set. If current set already exists, it is overwritten.
-
unionAsync
public > unionAsync(... names)
Description copied from interface:RSetAsync
Union sets specified by name and write to current set. If current set already exists, it is overwritten.- Specified by:
unionAsync
in interfaceRSetAsync<V>
- Parameters:
names
- - name of sets- Returns:
- size of union
-
readUnion
public <... names)
Description copied from interface:RSet
Union sets specified by name with current set without current set state change.
-
readUnionAsync
public <... names)
Description copied from interface:RSetAsync
Union sets specified by name with current set. Without current set state change.- Specified by:
readUnionAsync
in interfaceRSetAsync<V>
- Parameters:
names
- - name of sets- Returns:
- values
-
diff
public int diff(... names)
Description copied from interface:RSet
Diff sets specified by name and write to current set. If current set already exists, it is overwritten.
-
diffAsync
public > diffAsync(... names)
Description copied from interface:RSetAsync
Diff sets specified by name and write to current set. If current set already exists, it is overwritten.
-
readDiff
public <... names)
Description copied from interface:RSet
Diff sets specified by name with current set. Without current set state change.
-
readDiffAsync
public <... names)
Description copied from interface:RSetAsync
Diff sets specified by name with current set. Without current set state change.- Specified by:
readDiffAsync
in interfaceRSetAsync<V>
- Parameters:
names
- - name of sets- Returns:
- values
-
intersection
public int intersection(... names)
Description copied from interface:RSet
Intersection sets specified by name and write to current set. If current set already exists, it is overwritten.- Specified by:
intersection
in interfaceRSet<V>
- Parameters:
names
- - name of sets- Returns:
- size of intersection
-
intersectionAsync
public > intersectionAsync(... names)
Description copied from interface:RSetAsync
Intersection sets specified by name and write to current set. If current set already exists, it is overwritten.- Specified by:
intersectionAsync
in interfaceRSetAsync<V>
- Parameters:
names
- - name of sets- Returns:
- size of intersection
-
readIntersection
public <... names)
Description copied from interface:RSet
Intersection sets specified by name with current set without current set state change.- Specified by:
readIntersection
in interfaceRSet<V>
- Parameters:
names
- - name of sets- Returns:
- values
-
readIntersectionAsync
public <... names)
Description copied from interface:RSetAsync
Intersection sets specified by name with current set. Without current set state change.- Specified by:
readIntersectionAsync
in interfaceRSetAsync<V>
- Parameters:
names
- - name of sets- Returns:
- values
-
toString
public toString()
- Overrides:
in class
-
readSort
public <V> readSort(SortOrder order)
Description copied from interface:RSortable
Read data in sorted view
-
readSortAsync
public <V>> readSortAsync(SortOrder order)
Description copied from interface:RSortableAsync
Read data in sorted view- Specified by:
readSortAsync
in interfaceRSortableAsync<V>
- Parameters:
order
- for sorted data- Returns:
- sorted collection
-
readSort
public <V> readSort(SortOrder order, int offset, int count)
Description copied from interface:RSortable
Read data in sorted view
-
readSortAsync
public <V>> readSortAsync(SortOrder order, int offset, int count)
Description copied from interface:RSortableAsync
Read data in sorted view- Specified by:
readSortAsync
in interfaceRSortableAsync<V>
- Parameters:
order
- for sorted dataoffset
- of sorted datacount
- of sorted data- Returns:
- sorted collection
-
readSort
public < byPattern, SortOrder order)
Description copied from interface:RSortable
Read data in sorted view
-
readSortAsync
public < byPattern, SortOrder order)
Description copied from interface:RSortableAsync
Read data in sorted view- Specified by:
readSortAsync
in interfaceRSortableAsync<V>
- Parameters:
byPattern
- that is used to generate the keys that are used for sortingorder
- for sorted data- Returns:
- sorted collection
-
readSort
public < byPattern, SortOrder order, int offset, int count)
Description copied from interface:RSortable
Read data in sorted view
-
readSortAsync
public < byPattern, SortOrder order, int offset, int count)
Description copied from interface:RSortableAsync
Read data in sorted view- Specified by:
readSortAsync
in interfaceRSortableAsync<V>
- Parameters:
byPattern
- that is used to generate the keys that are used for sortingorder
- for sorted dataoffset
- of sorted datacount
- of sorted data- Returns:
- sorted collection
-
readSort
public <T> <T> readSort( byPattern, <> getPatterns, SortOrder order)
Description copied from interface:RSortable
Read data in sorted view
-
readSortAsync
public <T> <T>> readSortAsync( byPattern, <> getPatterns, SortOrder order)
Description copied from interface:RSortableAsync
Read data in sorted view- Specified by:
readSortAsync
in interfaceRSortableAsync<V>
- Type Parameters:
T
- object type- Parameters:
byPattern
- that is used to generate the keys that are used for sortinggetPatterns
- that is used to load values by keys in sorted vieworder
- for sorted data- Returns:
- sorted collection
-
readSort
public <T> <T> readSort( byPattern, <> getPatterns, SortOrder order, int offset, int count)
Description copied from interface:RSortable
Read data in sorted view- Specified by:
readSort
in interfaceRSortable<V>
- Type Parameters:
T
- object type- Parameters:
byPattern
- that is used to generate the keys that are used for sortinggetPatterns
- that is used to load values by keys in sorted vieworder
- for sorted dataoffset
- of sorted datacount
- of sorted data- Returns:
- sorted collection
-
readSortAsync
public <T> <T>> readSortAsync( byPattern, <> getPatterns, SortOrder order, int offset, int count)
Description copied from interface:RSortableAsync
Read data in sorted view- Specified by:
readSortAsync
in interfaceRSortableAsync<V>
- Type Parameters:
T
- object type- Parameters:
byPattern
- that is used to generate the keys that are used for sortinggetPatterns
- that is used to load values by keys in sorted vieworder
- for sorted dataoffset
- of sorted datacount
- of sorted data- Returns:
- sorted collection
-
readSortAlpha
public <V> readSortAlpha(SortOrder order)
Description copied from interface:RSortable
Read data in sorted view lexicographically- Specified by:
readSortAlpha
in interfaceRSortable<V>
- Parameters:
order
- for sorted data- Returns:
- sorted collection lexicographically
-
readSortAlpha
public <V> readSortAlpha(SortOrder order, int offset, int count)
Description copied from interface:RSortable
Read data in sorted view lexicographically- Specified by:
readSortAlpha
in interfaceRSortable<V>
- Parameters:
order
- for sorted dataoffset
- of sorted datacount
- of sorted data- Returns:
- sorted collection lexicographically
-
readSortAlpha
public < byPattern, SortOrder order)
Description copied from interface:RSortable
Read data in sorted view lexicographically- Specified by:
readSortAlpha
in interfaceRSortable<V>
- Parameters:
byPattern
- that is used to generate the keys that are used for sortingorder
- for sorted data- Returns:
- sorted collection lexicographically
-
readSortAlpha
public < byPattern, SortOrder order, int offset, int count)
Description copied from interface:RSortable
Read data in sorted view lexicographically- Specified by:
readSortAlpha
in interfaceRSortable<V>
- Parameters:
byPattern
- that is used to generate the keys that are used for sortingorder
- for sorted dataoffset
- of sorted datacount
- of sorted data- Returns:
- sorted collection lexicographically
-
readSortAlpha
public <T> <T> readSortAlpha( byPattern, <> getPatterns, SortOrder order)
Description copied from interface:RSortable
Read data in sorted view lexicographically- Specified by:
readSortAlpha
in interfaceRSortable<V>
- Type Parameters:
T
- object type- Parameters:
byPattern
- that is used to generate the keys that are used for sortinggetPatterns
- that is used to load values by keys in sorted vieworder
- for sorted data- Returns:
- sorted collection lexicographically
-
readSortAlpha
public <T> <T> readSortAlpha( byPattern, <> getPatterns, SortOrder order, int offset, int count)
Description copied from interface:RSortable
Read data in sorted view lexicographically- Specified by:
readSortAlpha
in interfaceRSortable<V>
- Type Parameters:
T
- object type- Parameters:
byPattern
- that is used to generate the keys that are used for sortinggetPatterns
- that is used to load values by keys in sorted vieworder
- for sorted dataoffset
- of sorted datacount
- of sorted data- Returns:
- sorted collection lexicographically
-
readSortAlphaAsync
public <V>> readSortAlphaAsync(SortOrder order)
Description copied from interface:RSortableAsync
Read data in sorted view lexicographically- Specified by:
readSortAlphaAsync
in interfaceRSortableAsync<V>
- Parameters:
order
- for sorted data- Returns:
- sorted collection lexicographically
-
readSortAlphaAsync
public <V>> readSortAlphaAsync(SortOrder order, int offset, int count)
Description copied from interface:RSortableAsync
Read data in sorted view lexicographically- Specified by:
readSortAlphaAsync
in interfaceRSortableAsync<V>
- Parameters:
order
- for sorted dataoffset
- of sorted datacount
- of sorted data- Returns:
- sorted collection lexicographically
-
readSortAlphaAsync
public < byPattern, SortOrder order)
Description copied from interface:RSortableAsync
Read data in sorted view lexicographically- Specified by:
readSortAlphaAsync
in interfaceRSortableAsync<V>
- Parameters:
byPattern
- that is used to generate the keys that are used for sortingorder
- for sorted data- Returns:
- sorted collection lexicographically
-
readSortAlphaAsync
public < byPattern, SortOrder order, int offset, int count)
Description copied from interface:RSortableAsync
Read data in sorted view lexicographically- Specified by:
readSortAlphaAsync
in interfaceRSortableAsync<V>
- Parameters:
byPattern
- that is used to generate the keys that are used for sortingorder
- for sorted dataoffset
- of sorted datacount
- of sorted data- Returns:
- sorted collection lexicographically
-
readSortAlphaAsync
public <T> <T>> readSortAlphaAsync( byPattern, <> getPatterns, SortOrder order)
Description copied from interface:RSortableAsync
Read data in sorted view lexicographically- Specified by:
readSortAlphaAsync
in interfaceRSortableAsync<V>
- Type Parameters:
T
- object type- Parameters:
byPattern
- that is used to generate the keys that are used for sortinggetPatterns
- that is used to load values by keys in sorted vieworder
- for sorted data- Returns:
- sorted collection lexicographically
-
readSortAlphaAsync
public <T> <T>> readSortAlphaAsync( byPattern, <> getPatterns, SortOrder order, int offset, int count)
Description copied from interface:RSortableAsync
Read data in sorted view lexicographically- Specified by:
readSortAlphaAsync
in interfaceRSortableAsync<V>
- Type Parameters:
T
- object type- Parameters:
byPattern
- that is used to generate the keys that are used for sortinggetPatterns
- that is used to load values by keys in sorted vieworder
- for sorted dataoffset
- of sorted datacount
- of sorted data- Returns:
- sorted collection lexicographically
-
sortTo
public int sortTo( destName, SortOrder order)
Description copied from interface:RSortable
Sort data and store todestName
list
-
sortToAsync
public > sortToAsync( destName, SortOrder order)
Description copied from interface:RSortableAsync
Sort data and store todestName
list- Specified by:
sortToAsync
in interfaceRSortableAsync<V>
- Parameters:
destName
- list object destinationorder
- for sorted data- Returns:
- length of sorted data
-
sortTo
public int sortTo( destName, SortOrder order, int offset, int count)
Description copied from interface:RSortable
Sort data and store todestName
list
-
sortToAsync
public > sortToAsync( destName, SortOrder order, int offset, int count)
Description copied from interface:RSortableAsync
Sort data and store todestName
list- Specified by:
sortToAsync
in interfaceRSortableAsync<V>
- Parameters:
destName
- list object destinationorder
- for sorted dataoffset
- of sorted datacount
- of sorted data- Returns:
- length of sorted data
-
sortTo
public int sortTo( destName, byPattern, SortOrder order, int offset, int count)
Description copied from interface:RSortable
Sort data and store todestName
list
-
sortTo
public int sortTo( destName, byPattern, SortOrder order)
Description copied from interface:RSortable
Sort data and store todestName
list
-
sortToAsync
public > sortToAsync( destName, byPattern, SortOrder order)
Description copied from interface:RSortableAsync
Sort data and store todestName
list- Specified by:
sortToAsync
in interfaceRSortableAsync<V>
- Parameters:
destName
- list object destinationbyPattern
- that is used to generate the keys that are used for sortingorder
- for sorted data- Returns:
- length of sorted data
-
sortToAsync
public > sortToAsync( destName, byPattern, SortOrder order, int offset, int count)
Description copied from interface:RSortableAsync
Sort data and store todestName
list- Specified by:
sortToAsync
in interfaceRSortableAsync<V>
- Parameters:
destName
- list object destinationbyPattern
- that is used to generate the keys that are used for sortingorder
- for sorted dataoffset
- of sorted datacount
- of sorted data- Returns:
- length of sorted data
-
sortTo
public int sortTo( destName, byPattern, <> getPatterns, SortOrder order)
Description copied from interface:RSortable
Sort data and store todestName
list
-
sortToAsync
public > sortToAsync( destName, byPattern, <> getPatterns, SortOrder order)
Description copied from interface:RSortableAsync
Sort data and store todestName
list- Specified by:
sortToAsync
in interfaceRSortableAsync<V>
- Parameters:
destName
- list object destinationbyPattern
- that is used to generate the keys that are used for sortinggetPatterns
- that is used to load values by keys in sorted vieworder
- for sorted data- Returns:
- length of sorted data
-
sortTo
public int sortTo( destName, byPattern, <> getPatterns, SortOrder order, int offset, int count)
Description copied from interface:RSortable
Sort data and store todestName
list- Specified by:
sortTo
in interfaceRSortable<V>
- Parameters:
destName
- list object destinationbyPattern
- that is used to generate the keys that are used for sortinggetPatterns
- that is used to load values by keys in sorted vieworder
- for sorted dataoffset
- of sorted datacount
- of sorted data- Returns:
- length of sorted data
-
sortToAsync
public > sortToAsync( destName, byPattern, <> getPatterns, SortOrder order, int offset, int count)
Description copied from interface:RSortableAsync
Sort data and store todestName
list- Specified by:
sortToAsync
in interfaceRSortableAsync<V>
- Parameters:
destName
- list object destinationbyPattern
- that is used to generate the keys that are used for sortinggetPatterns
- that is used to load values by keys in sorted vieworder
- for sorted dataoffset
- of sorted datacount
- of sorted data- Returns:
- length of sorted data
-
tryAdd
public boolean tryAdd(V... values)
Description copied from interface:RSet
Tries to add elements only if none of them in set.
-
tryAddAsync
public > tryAddAsync(V... values)
Description copied from interface:RSetAsync
Tries to add elements only if none of them in set.- Specified by:
tryAddAsync
in interfaceRSetAsync<V>
- Parameters:
values
- - values to add- Returns:
true
if elements successfully added, otherwisefalse
.
-
getPermitExpirableSemaphore
public RPermitExpirableSemaphore getPermitExpirableSemaphore(V value)
Description copied from interface:RSet
ReturnsRPermitExpirableSemaphore
instance associated withvalue
- Specified by:
getPermitExpirableSemaphore
in interfaceRSet<V>
- Parameters:
value
- - set value- Returns:
- RPermitExpirableSemaphore object
-
getSemaphore
public RSemaphore getSemaphore(V value)
Description copied from interface:RSet
ReturnsRSemaphore
instance associated withvalue
- Specified by:
getSemaphore
in interfaceRSet<V>
- Parameters:
value
- - set value- Returns:
- RSemaphore object
-
getCountDownLatch
public RCountDownLatch getCountDownLatch(V value)
Description copied from interface:RSet
ReturnsRCountDownLatch
instance associated withvalue
- Specified by:
getCountDownLatch
in interfaceRSet<V>
- Parameters:
value
- - set value- Returns:
- RCountDownLatch object
-
getFairLock
public RLock getFairLock(V value)
Description copied from interface:RSet
ReturnsRLock
instance associated withvalue
- Specified by:
getFairLock
in interfaceRSet<V>
- Parameters:
value
- - set value- Returns:
- RLock object
-
getLock
public RLock getLock(V value)
Description copied from interface:RSet
Returns lock instance associated withvalue
-
getReadWriteLock
public RReadWriteLock getReadWriteLock(V value)
Description copied from interface:RSet
ReturnsRReadWriteLock
instance associated withvalue
- Specified by:
getReadWriteLock
in interfaceRSet<V>
- Parameters:
value
- - set value- Returns:
- RReadWriteLock object
-
scanIteratorAsync
public >> scanIteratorAsync( name, RedisClient client, long startPos, pattern, int count)
- Specified by:
scanIteratorAsync
in interfaceScanIterator
-
stream
public <V> stream(int count)
Description copied from interface:RSet
Returns stream of elements fetches elements in a batch. Batch size is defined bycount
param.
-
stream
public < pattern, int count)
Description copied from interface:RSet
Returns stream of elements fetches elements in a batch. Batch size is defined bycount
param. If pattern is not null then only elements match this pattern are loaded.
-
stream
public < pattern)
Description copied from interface:RSet
Returns stream of elements. If pattern is not null then only elements match this pattern are loaded.
-
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
-
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
-
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
-
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
-
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)
-
expireAtAsync
protected > expireAtAsync(long timestamp, ... keys)
-
clearExpireAsync
protected > clearExpireAsync(... keys)
-
-