RBitSetReactive
, RExpirableReactive
, RObjectReactive
public class RedissonBitSetReactive extends Object implements RBitSetReactive
Constructor | Description |
---|---|
RedissonBitSetReactive(CommandReactiveExecutor connectionManager,
String name) |
|
RedissonBitSetReactive(CommandReactiveExecutor connectionManager,
String name,
RBitSetAsync instance) |
Modifier and Type | Method | Description |
---|---|---|
org.reactivestreams.Publisher<Void> |
and(String... bitSetNames) |
Executes AND operation over this object and specified bitsets.
|
org.reactivestreams.Publisher<BitSet> |
asBitSet() |
|
org.reactivestreams.Publisher<Long> |
cardinality() |
Returns the number of bits set to one.
|
org.reactivestreams.Publisher<Void> |
clear() |
Set all bits to zero
|
org.reactivestreams.Publisher<Boolean> |
clear(long bitIndex) |
Set bit to zero at specified
bitIndex |
org.reactivestreams.Publisher<Void> |
clear(long fromIndex,
long toIndex) |
Set all bits to zero from
fromIndex (inclusive) to toIndex (exclusive) |
org.reactivestreams.Publisher<Boolean> |
clearExpire() |
Clear an expire timeout or expire date for object in mode.
|
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<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.
|
org.reactivestreams.Publisher<Boolean> |
get(long bitIndex) |
Returns
true if bit set to one and false overwise. |
Codec |
getCodec() |
|
String |
getName() |
|
org.reactivestreams.Publisher<Boolean> |
isExists() |
Check object existence
|
org.reactivestreams.Publisher<Long> |
length() |
Returns "logical size" = index of highest set bit plus one.
|
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
|
protected <V> reactor.rx.Stream<V> |
newSucceeded(V result) |
|
org.reactivestreams.Publisher<Void> |
not() |
Executes NOT operation over all bits
|
org.reactivestreams.Publisher<Void> |
or(String... bitSetNames) |
Executes OR operation over this object and specified bitsets.
|
<R> org.reactivestreams.Publisher<R> |
reactive(reactor.fn.Supplier<RFuture<R>> supplier) |
|
org.reactivestreams.Publisher<Long> |
remainTimeToLive() |
Get remaining time to live of object in milliseconds.
|
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> |
set(long bitIndex) |
Set bit to one at specified bitIndex
|
org.reactivestreams.Publisher<Boolean> |
set(long bitIndex,
boolean value) |
Set bit to
value at specified bitIndex |
org.reactivestreams.Publisher<Void> |
set(long fromIndex,
long toIndex) |
Set all bits to one from
fromIndex (inclusive) to toIndex (exclusive) |
org.reactivestreams.Publisher<Void> |
set(long fromIndex,
long toIndex,
boolean value) |
Set all bits to
value from fromIndex (inclusive) to toIndex (exclusive) |
org.reactivestreams.Publisher<Void> |
set(BitSet bs) |
Copy bits state of source BitSet object to this object
|
org.reactivestreams.Publisher<Long> |
size() |
Returns number of set bits.
|
org.reactivestreams.Publisher<byte[]> |
toByteArray() |
|
String |
toString() |
|
org.reactivestreams.Publisher<Boolean> |
touch() |
Update the last access time of an object.
|
org.reactivestreams.Publisher<Boolean> |
unlink() |
Delete the objects.
|
org.reactivestreams.Publisher<Void> |
xor(String... bitSetNames) |
Executes XOR operation over this object and specified bitsets.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
clearExpire, expire, expireAt, expireAt, remainTimeToLive
public RedissonBitSetReactive(CommandReactiveExecutor connectionManager, String name)
public RedissonBitSetReactive(CommandReactiveExecutor connectionManager, String name, RBitSetAsync instance)
public org.reactivestreams.Publisher<Boolean> get(long bitIndex)
RBitSetReactive
true
if bit set to one and false
overwise.get
in interface RBitSetReactive
bitIndex
- - index of bittrue
if bit set to one and false
overwise.public org.reactivestreams.Publisher<Boolean> set(long bitIndex, boolean value)
RBitSetReactive
value
at specified bitIndex
set
in interface RBitSetReactive
bitIndex
- - index of bitvalue
- true = 1, false = 0true
- if previous value was true,
false
- if previous value was falsepublic org.reactivestreams.Publisher<byte[]> toByteArray()
toByteArray
in interface RBitSetReactive
public org.reactivestreams.Publisher<BitSet> asBitSet()
asBitSet
in interface RBitSetReactive
public org.reactivestreams.Publisher<Long> length()
RBitSetReactive
length
in interface RBitSetReactive
public org.reactivestreams.Publisher<Void> set(long fromIndex, long toIndex, boolean value)
RBitSetReactive
value
from fromIndex
(inclusive) to toIndex
(exclusive)set
in interface RBitSetReactive
fromIndex
- inclusivetoIndex
- exclusivevalue
- true = 1, false = 0public org.reactivestreams.Publisher<Void> clear(long fromIndex, long toIndex)
RBitSetReactive
fromIndex
(inclusive) to toIndex
(exclusive)clear
in interface RBitSetReactive
fromIndex
- inclusivetoIndex
- exclusivepublic org.reactivestreams.Publisher<Void> set(BitSet bs)
RBitSetReactive
set
in interface RBitSetReactive
bs
- - BitSet sourcepublic org.reactivestreams.Publisher<Void> not()
RBitSetReactive
not
in interface RBitSetReactive
public org.reactivestreams.Publisher<Void> set(long fromIndex, long toIndex)
RBitSetReactive
fromIndex
(inclusive) to toIndex
(exclusive)set
in interface RBitSetReactive
fromIndex
- inclusivetoIndex
- exclusivepublic org.reactivestreams.Publisher<Long> size()
RBitSetReactive
size
in interface RBitSetReactive
public org.reactivestreams.Publisher<Boolean> set(long bitIndex)
RBitSetReactive
set
in interface RBitSetReactive
bitIndex
- - index of bittrue
- if previous value was true,
false
- if previous value was falsepublic org.reactivestreams.Publisher<Long> cardinality()
RBitSetReactive
cardinality
in interface RBitSetReactive
public org.reactivestreams.Publisher<Boolean> clear(long bitIndex)
RBitSetReactive
bitIndex
clear
in interface RBitSetReactive
bitIndex
- - index of bittrue
- if previous value was true,
false
- if previous value was falsepublic org.reactivestreams.Publisher<Void> clear()
RBitSetReactive
clear
in interface RBitSetReactive
public org.reactivestreams.Publisher<Void> or(String... bitSetNames)
RBitSetReactive
or
in interface RBitSetReactive
bitSetNames
- - name of stored bitsetspublic org.reactivestreams.Publisher<Void> and(String... bitSetNames)
RBitSetReactive
and
in interface RBitSetReactive
bitSetNames
- - name of stored bitsetspublic org.reactivestreams.Publisher<Void> xor(String... bitSetNames)
RBitSetReactive
xor
in interface RBitSetReactive
bitSetNames
- - name of stored bitsetspublic 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.