public class RedissonBitSet extends RedissonObject implements RBitSet
codec, commandExecutor| Constructor and Description |
|---|
RedissonBitSet(CommandAsyncExecutor connectionManager,
String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
and(String... bitSetNames) |
RFuture<Void> |
andAsync(String... bitSetNames) |
BitSet |
asBitSet() |
long |
cardinality()
Returns the number of bits set to one.
|
RFuture<Long> |
cardinalityAsync()
Returns the number of bits set to one.
|
void |
clear()
Set all bits to zero
|
boolean |
clear(long bitIndex)
Set bit to zero at specified
bitIndex |
void |
clear(long fromIndex,
long toIndex)
Set all bits to zero from
fromIndex (inclusive) to toIndex (exclusive) |
RFuture<Void> |
clearAsync()
Set all bits to zero
|
RFuture<Boolean> |
clearAsync(long bitIndex)
Set bit to zero at specified
bitIndex |
RFuture<Void> |
clearAsync(long fromIndex,
long toIndex)
Set all bits to zero from
fromIndex (inclusive) to toIndex (exclusive) |
boolean |
clearExpire()
Clear an expire timeout or expire date for object.
|
RFuture<Boolean> |
clearExpireAsync()
Clear an expire timeout or expire date for object in async mode.
|
boolean |
expire(long timeToLive,
TimeUnit timeUnit)
Set a timeout for object.
|
RFuture<Boolean> |
expireAsync(long timeToLive,
TimeUnit timeUnit)
Set a timeout for object in async mode.
|
boolean |
expireAt(Date timestamp)
Set an expire date for object.
|
boolean |
expireAt(long timestamp)
Set an expire date for object.
|
RFuture<Boolean> |
expireAtAsync(Date timestamp)
Set an expire date for object in async mode.
|
RFuture<Boolean> |
expireAtAsync(long timestamp)
Set an expire date for object in async mode.
|
boolean |
get(long bitIndex)
Returns
true if bit set to one and false overwise. |
RFuture<Boolean> |
getAsync(long bitIndex)
Returns
true if bit set to one and false overwise. |
long |
length()
Returns "logical size" = index of highest set bit plus one.
|
RFuture<Long> |
lengthAsync()
Returns "logical size" = index of highest set bit plus one.
|
void |
not() |
RFuture<Void> |
notAsync() |
void |
or(String... bitSetNames) |
RFuture<Void> |
orAsync(String... bitSetNames) |
long |
remainTimeToLive()
Remaining time to live of Redisson object that has a timeout
|
RFuture<Long> |
remainTimeToLiveAsync()
Get remaining time to live of object in seconds.
|
void |
set(BitSet bs) |
void |
set(long bitIndex)
Set bit to one at specified bitIndex
|
void |
set(long bitIndex,
boolean value)
Set bit to
value at specified bitIndex |
void |
set(long fromIndex,
long toIndex)
Set all bits to one from
fromIndex (inclusive) to toIndex (exclusive) |
void |
set(long fromIndex,
long toIndex,
boolean value)
Set all bits to
value from fromIndex (inclusive) to toIndex (exclusive) |
RFuture<Void> |
setAsync(BitSet bs) |
RFuture<Boolean> |
setAsync(long bitIndex)
Set bit to one at specified bitIndex
|
RFuture<Boolean> |
setAsync(long bitIndex,
boolean value)
Set bit to
value at specified bitIndex |
RFuture<Void> |
setAsync(long fromIndex,
long toIndex)
Set all bits to one from
fromIndex (inclusive) to toIndex (exclusive) |
RFuture<Void> |
setAsync(long fromIndex,
long toIndex,
boolean value)
Set all bits to
value from fromIndex (inclusive) to toIndex (exclusive) |
long |
size()
Returns number of set bits.
|
RFuture<Long> |
sizeAsync()
Returns number of set bits.
|
byte[] |
toByteArray() |
RFuture<byte[]> |
toByteArrayAsync() |
String |
toString() |
void |
xor(String... bitSetNames) |
RFuture<Void> |
xorAsync(String... bitSetNames) |
await, delete, deleteAsync, encode, encode, encode, encodeMapKey, encodeMapKeys, encodeMapValue, encodeMapValues, get, getCodec, getName, getName, isExists, isExistsAsync, migrate, migrateAsync, move, moveAsync, newPromise, newSucceededFuture, prefixName, rename, renameAsync, renamenx, renamenxAsync, suffixName, touch, touchAsync, unlink, unlinkAsyncclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitclearExpire, expire, expireAt, expireAt, remainTimeToLivedelete, getCodec, getName, isExists, migrate, move, rename, renamenx, touch, unlinkclearExpireAsync, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsyncdeleteAsync, isExistsAsync, migrateAsync, moveAsync, renameAsync, renamenxAsync, touchAsync, unlinkAsyncpublic RedissonBitSet(CommandAsyncExecutor connectionManager, String name)
public long length()
RBitSetpublic boolean get(long bitIndex)
RBitSettrue if bit set to one and false overwise.public RFuture<Boolean> getAsync(long bitIndex)
RBitSetAsynctrue if bit set to one and false overwise.getAsync in interface RBitSetAsyncbitIndex - - index of bittrue if bit set to one and false overwise.public void set(long bitIndex)
RBitSetpublic void set(long fromIndex,
long toIndex,
boolean value)
RBitSetvalue from fromIndex (inclusive) to toIndex (exclusive)public void set(long fromIndex,
long toIndex)
RBitSetfromIndex (inclusive) to toIndex (exclusive)public void set(long bitIndex,
boolean value)
RBitSetvalue at specified bitIndexpublic RFuture<Boolean> setAsync(long bitIndex, boolean value)
RBitSetAsyncvalue at specified bitIndexsetAsync in interface RBitSetAsyncbitIndex - - index of bitvalue - true = 1, false = 0public byte[] toByteArray()
toByteArray in interface RBitSetpublic RFuture<byte[]> toByteArrayAsync()
toByteArrayAsync in interface RBitSetAsyncpublic long cardinality()
RBitSetcardinality in interface RBitSetpublic long size()
RBitSetpublic void clear(long fromIndex,
long toIndex)
RBitSetfromIndex (inclusive) to toIndex (exclusive)public boolean clear(long bitIndex)
RBitSetbitIndexpublic void clear()
RBitSetpublic RFuture<Long> lengthAsync()
RBitSetAsynclengthAsync in interface RBitSetAsyncpublic RFuture<Void> setAsync(long fromIndex, long toIndex, boolean value)
RBitSetAsyncvalue from fromIndex (inclusive) to toIndex (exclusive)setAsync in interface RBitSetAsyncfromIndex - inclusivetoIndex - exclusivevalue - true = 1, false = 0public RFuture<Void> clearAsync(long fromIndex, long toIndex)
RBitSetAsyncfromIndex (inclusive) to toIndex (exclusive)clearAsync in interface RBitSetAsyncfromIndex - inclusivetoIndex - exclusivepublic RFuture<Void> setAsync(BitSet bs)
setAsync in interface RBitSetAsyncpublic RFuture<Void> notAsync()
notAsync in interface RBitSetAsyncpublic RFuture<Void> setAsync(long fromIndex, long toIndex)
RBitSetAsyncfromIndex (inclusive) to toIndex (exclusive)setAsync in interface RBitSetAsyncfromIndex - inclusivetoIndex - exclusivepublic RFuture<Long> sizeAsync()
RBitSetAsyncsizeAsync in interface RBitSetAsyncpublic RFuture<Boolean> setAsync(long bitIndex)
RBitSetAsyncsetAsync in interface RBitSetAsyncbitIndex - - index of bitpublic RFuture<Long> cardinalityAsync()
RBitSetAsynccardinalityAsync in interface RBitSetAsyncpublic RFuture<Boolean> clearAsync(long bitIndex)
RBitSetAsyncbitIndexclearAsync in interface RBitSetAsyncbitIndex - - index of bittrue - if previous value was true,
false - if previous value was falsepublic RFuture<Void> clearAsync()
RBitSetAsyncclearAsync in interface RBitSetAsyncpublic RFuture<Void> orAsync(String... bitSetNames)
orAsync in interface RBitSetAsyncpublic RFuture<Void> andAsync(String... bitSetNames)
andAsync in interface RBitSetAsyncpublic RFuture<Void> xorAsync(String... bitSetNames)
xorAsync in interface RBitSetAsyncpublic boolean expire(long timeToLive,
TimeUnit timeUnit)
RExpirableexpire in interface RExpirabletimeToLive - - timeout before object will be deletedtimeUnit - - timeout time unittrue if the timeout was set and false if notpublic RFuture<Boolean> expireAsync(long timeToLive, TimeUnit timeUnit)
RExpirableAsyncexpireAsync in interface RExpirableAsynctimeToLive - - timeout before object will be deletedtimeUnit - - timeout time unittrue if the timeout was set and false if notpublic boolean expireAt(long timestamp)
RExpirableexpireAt in interface RExpirabletimestamp - - expire date in milliseconds (Unix timestamp)true if the timeout was set and false if notpublic RFuture<Boolean> expireAtAsync(long timestamp)
RExpirableAsyncexpireAtAsync in interface RExpirableAsynctimestamp - - expire date in seconds (Unix timestamp)true if the timeout was set and false if notpublic boolean expireAt(Date timestamp)
RExpirableexpireAt in interface RExpirabletimestamp - - expire datetrue if the timeout was set and false if notpublic RFuture<Boolean> expireAtAsync(Date timestamp)
RExpirableAsyncexpireAtAsync in interface RExpirableAsynctimestamp - - expire datetrue if the timeout was set and false if notpublic boolean clearExpire()
RExpirableclearExpire in interface RExpirabletrue if timeout was removed
false if object does not exist or does not have an associated timeoutpublic RFuture<Boolean> clearExpireAsync()
RExpirableAsyncclearExpireAsync in interface RExpirableAsynctrue if the timeout was cleared and false if notpublic long remainTimeToLive()
RExpirableremainTimeToLive in interface RExpirablepublic RFuture<Long> remainTimeToLiveAsync()
RExpirableAsyncremainTimeToLiveAsync in interface RExpirableAsync-1 if object does not exist or time in secondsCopyright © 2014–2018 The Redisson Project. All rights reserved.