V
- valueRCollectionReactive<V>
, RExpirableReactive
, RObjectReactive
, RSetReactive<V>
, RSortableReactive<Set<V>>
public class RedissonSetReactive<V> extends Object implements RSetReactive<V>
Set
Constructor | Description |
---|---|
RedissonSetReactive(Codec codec,
CommandReactiveExecutor commandExecutor,
String name) |
|
RedissonSetReactive(Codec codec,
CommandReactiveExecutor commandExecutor,
String name,
RSetAsync<V> instance) |
|
RedissonSetReactive(CommandReactiveExecutor commandExecutor,
String name) |
|
RedissonSetReactive(CommandReactiveExecutor commandExecutor,
String name,
RSetAsync<V> instance) |
Modifier and Type | Method | Description |
---|---|---|
org.reactivestreams.Publisher<Integer> |
add(V e) |
|
org.reactivestreams.Publisher<Integer> |
addAll(Collection<? extends V> c) |
|
org.reactivestreams.Publisher<Integer> |
addAll(org.reactivestreams.Publisher<? extends V> c) |
|
org.reactivestreams.Publisher<Boolean> |
clearExpire() |
Clear an expire timeout or expire date for object in mode.
|
org.reactivestreams.Publisher<Boolean> |
contains(Object o) |
|
org.reactivestreams.Publisher<Boolean> |
containsAll(Collection<?> c) |
|
org.reactivestreams.Publisher<Void> |
copy(String host,
int port,
int database,
long timeout) |
Copy object from source Redis instance to destination Redis instance
|
org.reactivestreams.Publisher<Boolean> |
delete() |
Delete object in mode
|
org.reactivestreams.Publisher<Long> |
diff(String... names) |
Diff sets specified by name and write to current set.
|
org.reactivestreams.Publisher<byte[]> |
dump() |
Returns dump of object
|
protected io.netty.buffer.ByteBuf |
encode(Object value) |
|
protected void |
encode(Collection<Object> params,
Collection<?> values) |
|
protected io.netty.buffer.ByteBuf |
encodeMapKey(Object value) |
|
protected io.netty.buffer.ByteBuf |
encodeMapValue(Object value) |
|
org.reactivestreams.Publisher<Boolean> |
expire(long timeToLive,
TimeUnit timeUnit) |
Set a timeout for object in mode.
|
org.reactivestreams.Publisher<Boolean> |
expireAt(long timestamp) |
Set an expire date for object in mode.
|
org.reactivestreams.Publisher<Boolean> |
expireAt(Date timestamp) |
Set an expire date for object in mode.
|
Codec |
getCodec() |
|
String |
getName() |
|
org.reactivestreams.Publisher<Long> |
intersection(String... names) |
Intersection sets specified by name and write to current set.
|
org.reactivestreams.Publisher<Boolean> |
isExists() |
Check object existence
|
org.reactivestreams.Publisher<V> |
iterator() |
|
org.reactivestreams.Publisher<V> |
iterator(int count) |
Returns an iterator over elements in this set.
|
org.reactivestreams.Publisher<V> |
iterator(String pattern) |
Returns iterator over elements in this set matches
pattern . |
org.reactivestreams.Publisher<V> |
iterator(String pattern,
int count) |
Returns an iterator over elements in this set.
|
org.reactivestreams.Publisher<Void> |
migrate(String host,
int port,
int database,
long timeout) |
Transfer a object from a source Redis instance to a destination Redis instance
in mode
|
org.reactivestreams.Publisher<Boolean> |
move(int database) |
Move object to another database in mode
|
org.reactivestreams.Publisher<Boolean> |
move(String destination,
V member) |
Move a member from this set to the given destination set in async mode.
|
protected <V> reactor.rx.Stream<V> |
newSucceeded(V result) |
|
org.reactivestreams.Publisher<V> |
random() |
Returns random element from set
in async mode
|
<R> org.reactivestreams.Publisher<R> |
reactive(reactor.fn.Supplier<RFuture<R>> supplier) |
|
org.reactivestreams.Publisher<Set<V>> |
readAll() |
Read all elements at once
|
org.reactivestreams.Publisher<Set<V>> |
readDiff(String... names) |
Diff sets specified by name with current set.
|
org.reactivestreams.Publisher<Set<V>> |
readIntersection(String... names) |
Intersection sets specified by name with current set.
|
<T> org.reactivestreams.Publisher<Collection<T>> |
readSorted(String byPattern,
List<String> getPatterns,
SortOrder order) |
Read data in sorted view
|
<T> org.reactivestreams.Publisher<Collection<T>> |
readSorted(String byPattern,
List<String> getPatterns,
SortOrder order,
int offset,
int count) |
Read data in sorted view
|
org.reactivestreams.Publisher<Set<V>> |
readSorted(String byPattern,
SortOrder order) |
Read data in sorted view
|
org.reactivestreams.Publisher<Set<V>> |
readSorted(String byPattern,
SortOrder order,
int offset,
int count) |
Read data in sorted view
|
org.reactivestreams.Publisher<Set<V>> |
readSorted(SortOrder order) |
Read data in sorted view
|
org.reactivestreams.Publisher<Set<V>> |
readSorted(SortOrder order,
int offset,
int count) |
Read data in sorted view
|
org.reactivestreams.Publisher<Set<V>> |
readUnion(String... names) |
Union sets specified by name with current set.
|
org.reactivestreams.Publisher<Long> |
remainTimeToLive() |
Get remaining time to live of object in milliseconds.
|
org.reactivestreams.Publisher<Boolean> |
remove(Object o) |
|
org.reactivestreams.Publisher<Boolean> |
removeAll(Collection<?> c) |
|
org.reactivestreams.Publisher<V> |
removeRandom() |
Removes and returns random element from set
in async mode
|
org.reactivestreams.Publisher<Set<V>> |
removeRandom(int amount) |
Removes and returns random elements from set
in async mode
|
org.reactivestreams.Publisher<Void> |
rename(String newName) |
Rename current object key to
newName
in mode |
org.reactivestreams.Publisher<Boolean> |
renamenx(String newName) |
Rename current object key to
newName
in mode only if new key is not exists |
org.reactivestreams.Publisher<Void> |
restore(byte[] state) |
Restores object using its state returned by
RObjectReactive.dump() method. |
org.reactivestreams.Publisher<Void> |
restore(byte[] state,
long timeToLive,
TimeUnit timeUnit) |
Restores object using its state returned by
RObjectReactive.dump() method and set time to live for it. |
org.reactivestreams.Publisher<Void> |
restoreAndReplace(byte[] state) |
Restores and replaces object if it already exists.
|
org.reactivestreams.Publisher<Void> |
restoreAndReplace(byte[] state,
long timeToLive,
TimeUnit timeUnit) |
Restores and replaces object if it already exists and set time to live for it.
|
org.reactivestreams.Publisher<Boolean> |
retainAll(Collection<?> c) |
|
org.reactivestreams.Publisher<Integer> |
size() |
|
org.reactivestreams.Publisher<Integer> |
sortTo(String destName,
String byPattern,
List<String> getPatterns,
SortOrder order) |
Sort data and store to
destName list |
org.reactivestreams.Publisher<Integer> |
sortTo(String destName,
String byPattern,
List<String> getPatterns,
SortOrder order,
int offset,
int count) |
Sort data and store to
destName list |
org.reactivestreams.Publisher<Integer> |
sortTo(String destName,
String byPattern,
SortOrder order) |
Sort data and store to
destName list |
org.reactivestreams.Publisher<Integer> |
sortTo(String destName,
String byPattern,
SortOrder order,
int offset,
int count) |
Sort data and store to
destName list |
org.reactivestreams.Publisher<Integer> |
sortTo(String destName,
SortOrder order) |
Sort data and store to
destName list |
org.reactivestreams.Publisher<Integer> |
sortTo(String destName,
SortOrder order,
int offset,
int count) |
Sort data and store to
destName list |
org.reactivestreams.Publisher<Boolean> |
touch() |
Update the last access time of an object.
|
org.reactivestreams.Publisher<Long> |
union(String... names) |
Union sets specified by name and write to current set.
|
org.reactivestreams.Publisher<Boolean> |
unlink() |
Delete the objects.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clearExpire, expire, expireAt, expireAt, remainTimeToLive
public RedissonSetReactive(CommandReactiveExecutor commandExecutor, String name)
public RedissonSetReactive(CommandReactiveExecutor commandExecutor, String name, RSetAsync<V> instance)
public RedissonSetReactive(Codec codec, CommandReactiveExecutor commandExecutor, String name)
public RedissonSetReactive(Codec codec, CommandReactiveExecutor commandExecutor, String name, RSetAsync<V> instance)
public org.reactivestreams.Publisher<Integer> addAll(org.reactivestreams.Publisher<? extends V> c)
addAll
in interface RCollectionReactive<V>
public org.reactivestreams.Publisher<Set<V>> removeRandom(int amount)
RSetReactive
removeRandom
in interface RSetReactive<V>
amount
- of random valuespublic org.reactivestreams.Publisher<Integer> size()
size
in interface RCollectionReactive<V>
public org.reactivestreams.Publisher<Boolean> contains(Object o)
contains
in interface RCollectionReactive<V>
public org.reactivestreams.Publisher<Set<V>> readAll()
RSetReactive
readAll
in interface RSetReactive<V>
public org.reactivestreams.Publisher<Integer> add(V e)
add
in interface RCollectionReactive<V>
public org.reactivestreams.Publisher<V> removeRandom()
RSetReactive
removeRandom
in interface RSetReactive<V>
public org.reactivestreams.Publisher<V> random()
RSetReactive
random
in interface RSetReactive<V>
public org.reactivestreams.Publisher<Boolean> remove(Object o)
remove
in interface RCollectionReactive<V>
public org.reactivestreams.Publisher<Boolean> move(String destination, V member)
RSetReactive
move
in interface RSetReactive<V>
destination
- the destination setmember
- the member to movepublic org.reactivestreams.Publisher<Boolean> containsAll(Collection<?> c)
containsAll
in interface RCollectionReactive<V>
public org.reactivestreams.Publisher<Integer> addAll(Collection<? extends V> c)
addAll
in interface RCollectionReactive<V>
public org.reactivestreams.Publisher<Boolean> retainAll(Collection<?> c)
retainAll
in interface RCollectionReactive<V>
public org.reactivestreams.Publisher<Boolean> removeAll(Collection<?> c)
removeAll
in interface RCollectionReactive<V>
public org.reactivestreams.Publisher<Set<V>> readIntersection(String... names)
RSetReactive
readIntersection
in interface RSetReactive<V>
names
- - name of setspublic org.reactivestreams.Publisher<Long> intersection(String... names)
RSetReactive
intersection
in interface RSetReactive<V>
names
- - name of setspublic org.reactivestreams.Publisher<Long> diff(String... names)
RSetReactive
diff
in interface RSetReactive<V>
names
- - name of setspublic org.reactivestreams.Publisher<Set<V>> readDiff(String... names)
RSetReactive
readDiff
in interface RSetReactive<V>
names
- - name of setspublic org.reactivestreams.Publisher<Long> union(String... names)
RSetReactive
union
in interface RSetReactive<V>
names
- - name of setspublic org.reactivestreams.Publisher<Set<V>> readUnion(String... names)
RSetReactive
readUnion
in interface RSetReactive<V>
names
- - name of setspublic org.reactivestreams.Publisher<V> iterator(int count)
RSetReactive
count
param.iterator
in interface RSetReactive<V>
count
- - size of elements batchpublic org.reactivestreams.Publisher<V> iterator(String pattern)
RSetReactive
pattern
.iterator
in interface RSetReactive<V>
pattern
- - search patternpublic org.reactivestreams.Publisher<V> iterator(String pattern, int count)
RSetReactive
count
param.
If pattern is not null then only elements match this pattern are loaded.iterator
in interface RSetReactive<V>
pattern
- - search patterncount
- - size of elements batchpublic org.reactivestreams.Publisher<V> iterator()
iterator
in interface RCollectionReactive<V>
public org.reactivestreams.Publisher<Set<V>> readSorted(SortOrder order)
RSortableReactive
readSorted
in interface RSortableReactive<V>
order
- for sorted datapublic org.reactivestreams.Publisher<Set<V>> readSorted(SortOrder order, int offset, int count)
RSortableReactive
readSorted
in interface RSortableReactive<V>
order
- for sorted dataoffset
- of sorted datacount
- of sorted datapublic org.reactivestreams.Publisher<Set<V>> readSorted(String byPattern, SortOrder order)
RSortableReactive
readSorted
in interface RSortableReactive<V>
byPattern
- that is used to generate the keys that are used for sortingorder
- for sorted datapublic org.reactivestreams.Publisher<Set<V>> readSorted(String byPattern, SortOrder order, int offset, int count)
RSortableReactive
readSorted
in interface RSortableReactive<V>
byPattern
- that is used to generate the keys that are used for sortingorder
- for sorted dataoffset
- of sorted datacount
- of sorted datapublic <T> org.reactivestreams.Publisher<Collection<T>> readSorted(String byPattern, List<String> getPatterns, SortOrder order)
RSortableReactive
readSorted
in interface RSortableReactive<V>
T
- object typebyPattern
- 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 datapublic <T> org.reactivestreams.Publisher<Collection<T>> readSorted(String byPattern, List<String> getPatterns, SortOrder order, int offset, int count)
RSortableReactive
readSorted
in interface RSortableReactive<V>
T
- object typebyPattern
- 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 datapublic org.reactivestreams.Publisher<Integer> sortTo(String destName, SortOrder order)
RSortableReactive
destName
listsortTo
in interface RSortableReactive<V>
destName
- list object destinationorder
- for sorted datapublic org.reactivestreams.Publisher<Integer> sortTo(String destName, SortOrder order, int offset, int count)
RSortableReactive
destName
listsortTo
in interface RSortableReactive<V>
destName
- list object destinationorder
- for sorted dataoffset
- of sorted datacount
- of sorted datapublic org.reactivestreams.Publisher<Integer> sortTo(String destName, String byPattern, SortOrder order)
RSortableReactive
destName
listsortTo
in interface RSortableReactive<V>
destName
- list object destinationbyPattern
- that is used to generate the keys that are used for sortingorder
- for sorted datapublic org.reactivestreams.Publisher<Integer> sortTo(String destName, String byPattern, SortOrder order, int offset, int count)
RSortableReactive
destName
listsortTo
in interface RSortableReactive<V>
destName
- list object destinationbyPattern
- that is used to generate the keys that are used for sortingorder
- for sorted dataoffset
- of sorted datacount
- of sorted datapublic org.reactivestreams.Publisher<Integer> sortTo(String destName, String byPattern, List<String> getPatterns, SortOrder order)
RSortableReactive
destName
listsortTo
in interface RSortableReactive<V>
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 datapublic org.reactivestreams.Publisher<Integer> sortTo(String destName, String byPattern, List<String> getPatterns, SortOrder order, int offset, int count)
RSortableReactive
destName
listsortTo
in interface RSortableReactive<V>
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 datapublic org.reactivestreams.Publisher<Boolean> expire(long timeToLive, TimeUnit timeUnit)
RExpirableReactive
expire
in interface RExpirableReactive
timeToLive
- - timeout before object will be deletedtimeUnit
- - timeout time unittrue
if the timeout was set and false
if notpublic org.reactivestreams.Publisher<Boolean> expireAt(long timestamp)
RExpirableReactive
expireAt
in interface RExpirableReactive
timestamp
- - expire date in milliseconds (Unix timestamp)true
if the timeout was set and false
if notpublic org.reactivestreams.Publisher<Boolean> expireAt(Date timestamp)
RExpirableReactive
expireAt
in interface RExpirableReactive
timestamp
- - expire datetrue
if the timeout was set and false
if notpublic org.reactivestreams.Publisher<Boolean> clearExpire()
RExpirableReactive
clearExpire
in interface RExpirableReactive
true
if the timeout was cleared and false
if notpublic org.reactivestreams.Publisher<Long> remainTimeToLive()
RExpirableReactive
remainTimeToLive
in interface RExpirableReactive
public <R> org.reactivestreams.Publisher<R> reactive(reactor.fn.Supplier<RFuture<R>> supplier)
protected <V> reactor.rx.Stream<V> newSucceeded(V result)
public String getName()
getName
in interface RObjectReactive
public Codec getCodec()
getCodec
in interface RObjectReactive
protected void encode(Collection<Object> params, Collection<?> values)
protected io.netty.buffer.ByteBuf encode(Object value)
protected io.netty.buffer.ByteBuf encodeMapKey(Object value)
protected io.netty.buffer.ByteBuf encodeMapValue(Object value)
public org.reactivestreams.Publisher<Void> restore(byte[] state)
RObjectReactive
RObjectReactive.dump()
method.restore
in interface RObjectReactive
state
- - state of objectpublic org.reactivestreams.Publisher<Void> restore(byte[] state, long timeToLive, TimeUnit timeUnit)
RObjectReactive
RObjectReactive.dump()
method and set time to live for it.restore
in interface RObjectReactive
state
- - state of objecttimeToLive
- - time to live of the objecttimeUnit
- - time unitpublic org.reactivestreams.Publisher<Void> restoreAndReplace(byte[] state)
RObjectReactive
restoreAndReplace
in interface RObjectReactive
state
- - state of the objectpublic org.reactivestreams.Publisher<Void> restoreAndReplace(byte[] state, long timeToLive, TimeUnit timeUnit)
RObjectReactive
restoreAndReplace
in interface RObjectReactive
state
- - state of the objecttimeToLive
- - time to live of the objecttimeUnit
- - time unitpublic org.reactivestreams.Publisher<byte[]> dump()
RObjectReactive
dump
in interface RObjectReactive
public org.reactivestreams.Publisher<Boolean> touch()
RObjectReactive
touch
in interface RObjectReactive
true
if object was touched else false
public org.reactivestreams.Publisher<Boolean> unlink()
RObjectReactive
Requires Redis 4.0+
unlink
in interface RObjectReactive
true
if it was exist and deleted else false
public org.reactivestreams.Publisher<Void> copy(String host, int port, int database, long timeout)
RObjectReactive
copy
in interface RObjectReactive
host
- - destination hostport
- - destination portdatabase
- - destination databasetimeout
- - maximum idle time in any moment of the communication with the destination instance in millisecondspublic org.reactivestreams.Publisher<Void> rename(String newName)
RObjectReactive
newName
in moderename
in interface RObjectReactive
newName
- - new name of objectpublic org.reactivestreams.Publisher<Void> migrate(String host, int port, int database, long timeout)
RObjectReactive
migrate
in interface RObjectReactive
host
- - destination hostport
- - destination portdatabase
- - destination databasetimeout
- - maximum idle time in any moment of the communication with the destination instance in millisecondspublic org.reactivestreams.Publisher<Boolean> move(int database)
RObjectReactive
move
in interface RObjectReactive
database
- - number of Redis databasetrue
if key was moved false
if notpublic org.reactivestreams.Publisher<Boolean> renamenx(String newName)
RObjectReactive
newName
in mode only if new key is not existsrenamenx
in interface RObjectReactive
newName
- - new name of objecttrue
if object has been renamed successfully and false
otherwisepublic org.reactivestreams.Publisher<Boolean> delete()
RObjectReactive
delete
in interface RObjectReactive
true
if object was deleted false
if notpublic org.reactivestreams.Publisher<Boolean> isExists()
RObjectReactive
isExists
in interface RObjectReactive
true
if object exists and false
otherwiseCopyright © 2014–2018 The Redisson Project. All rights reserved.