Package org.redisson.api
Interface RSetAsync<V>
-
- Type Parameters:
V
- value
- All Superinterfaces:
RCollectionAsync<V>
,RExpirableAsync
,RObjectAsync
,RSortableAsync<Set<V>>
- All Known Subinterfaces:
RSet<V>
- All Known Implementing Classes:
RedissonSet
,RedissonSetMultimapValues
,RedissonTransactionalSet
public interface RSetAsync<V> extends RCollectionAsync<V>, RSortableAsync<Set<V>>
Async set functions- Author:
- Nikita Koksharov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RFuture<Integer>
diffAsync(String... names)
Diff sets specified by name and write to current set.RFuture<Integer>
intersectionAsync(String... names)
Intersection sets specified by name and write to current set.RFuture<Boolean>
moveAsync(String destination, V member)
Move a member from this set to the given destination set in async mode.RFuture<V>
randomAsync()
Returns random element from set in async modeRFuture<Set<V>>
randomAsync(int count)
Returns random elements from set limited bycount
RFuture<Set<V>>
readAllAsync()
Read all elements at onceRFuture<Set<V>>
readDiffAsync(String... names)
Diff sets specified by name with current set.RFuture<Set<V>>
readIntersectionAsync(String... names)
Intersection sets specified by name with current set.RFuture<Set<V>>
readUnionAsync(String... names)
Union sets specified by name with current set.RFuture<V>
removeRandomAsync()
Removes and returns random element from set in async modeRFuture<Set<V>>
removeRandomAsync(int amount)
Removes and returns random elements from set in async modeRFuture<Boolean>
tryAddAsync(V... values)
Tries to add elements only if none of them in set.RFuture<Integer>
unionAsync(String... names)
Union sets specified by name and write to current set.-
Methods inherited from interface org.redisson.api.RCollectionAsync
addAllAsync, addAsync, containsAllAsync, containsAsync, removeAllAsync, removeAsync, retainAllAsync, sizeAsync
-
Methods inherited from interface org.redisson.api.RExpirableAsync
clearExpireAsync, expireAsync, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsync
-
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
-
Methods inherited from interface org.redisson.api.RSortableAsync
readSortAlphaAsync, readSortAlphaAsync, readSortAlphaAsync, readSortAlphaAsync, readSortAlphaAsync, readSortAlphaAsync, readSortAsync, readSortAsync, readSortAsync, readSortAsync, readSortAsync, readSortAsync, sortToAsync, sortToAsync, sortToAsync, sortToAsync, sortToAsync, sortToAsync
-
-
-
-
Method Detail
-
removeRandomAsync
RFuture<Set<V>> removeRandomAsync(int amount)
Removes and returns random elements from set in async mode- Parameters:
amount
- of random values- Returns:
- random values
-
removeRandomAsync
RFuture<V> removeRandomAsync()
Removes and returns random element from set in async mode- Returns:
- value
-
randomAsync
RFuture<Set<V>> randomAsync(int count)
Returns random elements from set limited bycount
- Parameters:
count
- - values amount to return- Returns:
- value
-
moveAsync
RFuture<Boolean> moveAsync(String destination, V member)
Move a member from this set to the given destination set in async mode.- Parameters:
destination
- the destination setmember
- the member to move- Returns:
true
if the element is moved,false
if the element is not a member of this set or no operation was performed
-
unionAsync
RFuture<Integer> unionAsync(String... names)
Union sets specified by name and write to current set. If current set already exists, it is overwritten.- Parameters:
names
- - name of sets- Returns:
- size of union
-
readUnionAsync
RFuture<Set<V>> readUnionAsync(String... names)
Union sets specified by name with current set. Without current set state change.- Parameters:
names
- - name of sets- Returns:
- values
-
diffAsync
RFuture<Integer> diffAsync(String... names)
Diff sets specified by name and write to current set. If current set already exists, it is overwritten.- Parameters:
names
- - name of sets- Returns:
- size of diff
-
readDiffAsync
RFuture<Set<V>> readDiffAsync(String... names)
Diff sets specified by name with current set. Without current set state change.- Parameters:
names
- - name of sets- Returns:
- values
-
intersectionAsync
RFuture<Integer> intersectionAsync(String... names)
Intersection sets specified by name and write to current set. If current set already exists, it is overwritten.- Parameters:
names
- - name of sets- Returns:
- size of intersection
-
readIntersectionAsync
RFuture<Set<V>> readIntersectionAsync(String... names)
Intersection sets specified by name with current set. Without current set state change.- Parameters:
names
- - name of sets- Returns:
- values
-
-