Package org.redisson
Class RedissonBitSet
java.lang.Object
org.redisson.RedissonObject
org.redisson.RedissonBitSet
- All Implemented Interfaces:
RBitSet
,RBitSetAsync
,RExpirable
,RExpirableAsync
,RObject
,RObjectAsync
- Author:
- Nikita Koksharov
-
Field Summary
Fields inherited from class org.redisson.RedissonObject
codec, commandExecutor, name
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Executes AND operation over this object and specified bitsets.Executes AND operation over this object and specified bitsets.asBitSet()
long
Returns the number of bits set to one.Returns the number of bits set to one.void
clear()
Set all bits to zeroboolean
clear
(long bitIndex) Set bit to zero at specifiedbitIndex
void
clear
(long fromIndex, long toIndex) Set all bits to zero fromfromIndex
(inclusive) totoIndex
(exclusive)Set all bits to zeroclearAsync
(long bitIndex) Set bit to zero at specifiedbitIndex
clearAsync
(long fromIndex, long toIndex) Set all bits to zero fromfromIndex
(inclusive) totoIndex
(exclusive)boolean
Clear an expire timeout or expire date for object.Clear an expire timeout or expire date for object in async mode.clearExpireAsync
(String... keys) boolean
UseRExpirable.expire(Duration)
insteadboolean
Sets a timeout for this object.boolean
Sets an expiration date for this object.expireAsync
(long timeToLive, TimeUnit timeUnit) UseRExpirableAsync.expireAsync(Duration)
insteadexpireAsync
(long timeToLive, TimeUnit timeUnit, String param, String... keys) expireAsync
(Duration duration) Set a timeout for object.expireAsync
(Instant instant) Set an expire date for object.boolean
expireAt
(long timestamp) UseRExpirable.expire(Instant)
insteadboolean
UseRExpirable.expire(Instant)
insteadexpireAtAsync
(long timestamp) UseRExpirableAsync.expireAsync(Instant)
insteadexpireAtAsync
(long timestamp, String param, String... keys) expireAtAsync
(Date timestamp) UseRExpirableAsync.expireAsync(Instant)
insteadboolean
expireIfGreater
(Duration duration) Sets a timeout for this object only if it's greater than timeout set before.boolean
expireIfGreater
(Instant time) Sets an expiration date for this object only if it's greater than expiration date set before.expireIfGreaterAsync
(Duration duration) Sets a timeout for this object only if it's greater than timeout set before.expireIfGreaterAsync
(Instant time) Sets an expiration date for this object only if it's greater than expiration date set before.boolean
expireIfLess
(Duration duration) Sets a timeout for this object only if it's less than timeout set before.boolean
expireIfLess
(Instant time) Sets an expiration date for this object only if it's less than expiration date set before.expireIfLessAsync
(Duration duration) Sets a timeout for this object only if it's less than timeout set before.expireIfLessAsync
(Instant time) Sets an expiration date for this object only if it's less than expiration date set before.boolean
expireIfNotSet
(Duration duration) Sets a timeout for this object only if it hasn't been set before.boolean
expireIfNotSet
(Instant time) Sets an expiration date for this object only if it hasn't been set before.expireIfNotSetAsync
(Duration duration) Sets a timeout for this object only if it hasn't been set before.expireIfNotSetAsync
(Instant time) Sets an expiration date for this object only if it hasn't been set before.boolean
expireIfSet
(Duration duration) Sets a timeout for this object only if it has been already set.boolean
expireIfSet
(Instant time) Sets an expiration date for this object only if it has been already set.expireIfSetAsync
(Duration duration) Sets a timeout for this object only if it has been already set.expireIfSetAsync
(Instant time) Sets an expiration date for this object only if it has been already set.boolean
get
(long bitIndex) Returnstrue
if bit set to one andfalse
overwise.getAsync
(long bitIndex) Returnstrue
if bit set to one andfalse
overwise.byte
getByte
(long offset) Returns byte number at specifiedoffset
getByteAsync
(long offset) Returns byte number at specifiedoffset
long
Expiration time of Redisson object that has a timeoutExpiration time of Redisson object that has a timeoutint
getInteger
(long offset) Returns integer number at specifiedoffset
getIntegerAsync
(long offset) Returns integer number at specifiedoffset
long
getLong
(long offset) Returns long number at specifiedoffset
getLongAsync
(long offset) Returns long number at specifiedoffset
short
getShort
(long offset) Returns short number at specifiedoffset
getShortAsync
(long offset) Returns short number at specifiedoffset
long
getSigned
(int size, long offset) Returns signed number at specifiedoffset
andsize
getSignedAsync
(int size, long offset) Returns signed number at specifiedoffset
andsize
long
getUnsigned
(int size, long offset) Returns unsigned number at specifiedoffset
andsize
getUnsignedAsync
(int size, long offset) Returns unsigned number at specifiedoffset
andsize
byte
incrementAndGetByte
(long offset, byte increment) Increments current byte value on definedincrement
value at specifiedoffset
and returns result.incrementAndGetByteAsync
(long offset, byte increment) Increments current byte value on definedincrement
value at specifiedoffset
and returns result.int
incrementAndGetInteger
(long offset, int increment) Increments current integer value on definedincrement
value at specifiedoffset
and returns result.incrementAndGetIntegerAsync
(long offset, int increment) Increments current integer value on definedincrement
value at specifiedoffset
and returns result.long
incrementAndGetLong
(long offset, long increment) Increments current long value on definedincrement
value at specifiedoffset
and returns result.incrementAndGetLongAsync
(long offset, long increment) Increments current long value on definedincrement
value at specifiedoffset
and returns result.short
incrementAndGetShort
(long offset, short increment) Increments current short value on definedincrement
value at specifiedoffset
and returns result.incrementAndGetShortAsync
(long offset, short increment) Increments current short value on definedincrement
value at specifiedoffset
and returns result.long
incrementAndGetSigned
(int size, long offset, long increment) Increments current signed value by definedincrement
value andsize
at specifiedoffset
and returns result.incrementAndGetSignedAsync
(int size, long offset, long increment) Increments current signed value by definedincrement
value andsize
at specifiedoffset
and returns result.long
incrementAndGetUnsigned
(int size, long offset, long increment) Increments current unsigned value by definedincrement
value andsize
at specifiedoffset
and returns result.incrementAndGetUnsignedAsync
(int size, long offset, long increment) Increments current unsigned value by definedincrement
value andsize
at specifiedoffset
and returns result.long
length()
Returns "logical size" = index of highest set bit plus one.Returns "logical size" = index of highest set bit plus one.void
not()
Executes NOT operation over all bitsnotAsync()
Executes NOT operation over all bitsvoid
Executes OR operation over this object and specified bitsets.Executes OR operation over this object and specified bitsets.long
Remaining time to live of Redisson object that has a timeoutRemaining time to live of Redisson object that has a timeoutboolean
set
(long bitIndex) Set bit to one at specified bitIndexvoid
set
(long[] indexArray, boolean value) Set all bits tovalue
which index in indexArrayboolean
set
(long bitIndex, boolean value) Set bit tovalue
at specifiedbitIndex
void
set
(long fromIndex, long toIndex) Set all bits to one fromfromIndex
(inclusive) totoIndex
(exclusive)void
set
(long fromIndex, long toIndex, boolean value) Set all bits tovalue
fromfromIndex
(inclusive) totoIndex
(exclusive)void
Copy bits state of source BitSet object to this objectsetAsync
(long bitIndex) Set bit to one at specified bitIndexsetAsync
(long[] indexArray, boolean value) Set all bits tovalue
which index in indexArraysetAsync
(long bitIndex, boolean value) Set bit tovalue
at specifiedbitIndex
setAsync
(long fromIndex, long toIndex) Set all bits to one fromfromIndex
(inclusive) totoIndex
(exclusive)setAsync
(long fromIndex, long toIndex, boolean value) Set all bits tovalue
fromfromIndex
(inclusive) totoIndex
(exclusive)Copy bits state of source BitSet object to this objectbyte
setByte
(long offset, byte value) Returns previous value of byte number and replaces it with definedvalue
at specifiedoffset
setByteAsync
(long offset, byte value) Returns previous value of byte number and replaces it with definedvalue
at specifiedoffset
int
setInteger
(long offset, int value) Returns previous value of integer number and replaces it with definedvalue
at specifiedoffset
setIntegerAsync
(long offset, int value) Returns previous value of integer number and replaces it with definedvalue
at specifiedoffset
long
setLong
(long offset, long value) Returns previous value of long number and replaces it with definedvalue
at specifiedoffset
setLongAsync
(long offset, long value) Returns previous value of long number and replaces it with definedvalue
at specifiedoffset
short
setShort
(long offset, short value) Returns previous value of short number and replaces it with definedvalue
at specifiedoffset
setShortAsync
(long offset, short value) Returns previous value of short number and replaces it with definedvalue
at specifiedoffset
long
setSigned
(int size, long offset, long value) Returns previous value of signed number and replaces it with definedvalue
at specifiedoffset
setSignedAsync
(int size, long offset, long value) Returns previous value of signed number and replaces it with definedvalue
at specifiedoffset
long
setUnsigned
(int size, long offset, long value) Returns previous value of unsigned number and replaces it with definedvalue
at specifiedoffset
setUnsignedAsync
(int size, long offset, long value) Returns previous value of unsigned number and replaces it with definedvalue
at specifiedoffset
long
size()
Returns number of set bits.Returns number of set bits.byte[]
RFuture
<byte[]> protected int
toInt
(boolean value) toString()
void
Executes XOR operation over this object and specified bitsets.Executes XOR operation over this object and specified bitsets.Methods inherited from class org.redisson.RedissonObject
addListener, addListener, addListenerAsync, addListenerAsync, copy, copyAsync, delete, deleteAsync, deleteAsync, dump, dumpAsync, encode, encode, encode, encode, encodeMapKey, encodeMapKey, encodeMapKeys, encodeMapValue, encodeMapValues, get, getCodec, getIdleTime, getIdleTimeAsync, getLockByMapKey, getLockByValue, getName, getRawName, getRawName, getServiceManager, getSubscribeService, isExists, isExistsAsync, map, migrate, migrateAsync, move, moveAsync, prefixName, removeListener, removeListenerAsync, 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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.redisson.api.RExpirable
clearExpire, expire, expire, expire, expireAt, expireAt, expireIfGreater, expireIfGreater, expireIfLess, expireIfLess, expireIfNotSet, expireIfNotSet, expireIfSet, expireIfSet, getExpireTime, remainTimeToLive
Methods inherited from interface org.redisson.api.RExpirableAsync
clearExpireAsync, expireAsync, expireAsync, expireAsync, expireAtAsync, expireAtAsync, expireIfGreaterAsync, expireIfGreaterAsync, expireIfLessAsync, expireIfLessAsync, expireIfNotSetAsync, expireIfNotSetAsync, expireIfSetAsync, expireIfSetAsync, getExpireTimeAsync, 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 Details
-
RedissonBitSet
-
-
Method Details
-
getSigned
public long getSigned(int size, long offset) Description copied from interface:RBitSet
Returns signed number at specifiedoffset
andsize
-
setSigned
public long setSigned(int size, long offset, long value) Description copied from interface:RBitSet
Returns previous value of signed number and replaces it with definedvalue
at specifiedoffset
-
incrementAndGetSigned
public long incrementAndGetSigned(int size, long offset, long increment) Description copied from interface:RBitSet
Increments current signed value by definedincrement
value andsize
at specifiedoffset
and returns result.- Specified by:
incrementAndGetSigned
in interfaceRBitSet
- Parameters:
size
- - size of signed number up to 64 bitsoffset
- - offset of signed numberincrement
- - increment value- Returns:
- result value
-
getUnsigned
public long getUnsigned(int size, long offset) Description copied from interface:RBitSet
Returns unsigned number at specifiedoffset
andsize
- Specified by:
getUnsigned
in interfaceRBitSet
- Parameters:
size
- - size of unsigned number up to 64 bitsoffset
- - offset of unsigned number- Returns:
- unsigned number
-
setUnsigned
public long setUnsigned(int size, long offset, long value) Description copied from interface:RBitSet
Returns previous value of unsigned number and replaces it with definedvalue
at specifiedoffset
- Specified by:
setUnsigned
in interfaceRBitSet
- Parameters:
size
- - size of unsigned number up to 64 bitsoffset
- - offset of unsigned numbervalue
- - value of unsigned number- Returns:
- previous value of unsigned number
-
incrementAndGetUnsigned
public long incrementAndGetUnsigned(int size, long offset, long increment) Description copied from interface:RBitSet
Increments current unsigned value by definedincrement
value andsize
at specifiedoffset
and returns result.- Specified by:
incrementAndGetUnsigned
in interfaceRBitSet
- Parameters:
size
- - size of unsigned number up to 64 bitsoffset
- - offset of unsigned numberincrement
- - increment value- Returns:
- result value
-
getSignedAsync
Description copied from interface:RBitSetAsync
Returns signed number at specifiedoffset
andsize
- Specified by:
getSignedAsync
in interfaceRBitSetAsync
- Parameters:
size
- - size of signed number up to 64 bitsoffset
- - offset of signed number- Returns:
- signed number
-
setSignedAsync
Description copied from interface:RBitSetAsync
Returns previous value of signed number and replaces it with definedvalue
at specifiedoffset
- Specified by:
setSignedAsync
in interfaceRBitSetAsync
- Parameters:
size
- - size of signed number up to 64 bitsoffset
- - offset of signed numbervalue
- - value of signed number- Returns:
- previous value of signed number
-
incrementAndGetSignedAsync
Description copied from interface:RBitSetAsync
Increments current signed value by definedincrement
value andsize
at specifiedoffset
and returns result.- Specified by:
incrementAndGetSignedAsync
in interfaceRBitSetAsync
- Parameters:
size
- - size of signed number up to 64 bitsoffset
- - offset of signed numberincrement
- - increment value- Returns:
- result value
-
getUnsignedAsync
Description copied from interface:RBitSetAsync
Returns unsigned number at specifiedoffset
andsize
- Specified by:
getUnsignedAsync
in interfaceRBitSetAsync
- Parameters:
size
- - size of unsigned number up to 63 bitsoffset
- - offset of unsigned number- Returns:
- unsigned number
-
setUnsignedAsync
Description copied from interface:RBitSetAsync
Returns previous value of unsigned number and replaces it with definedvalue
at specifiedoffset
- Specified by:
setUnsignedAsync
in interfaceRBitSetAsync
- Parameters:
size
- - size of unsigned number up to 63 bitsoffset
- - offset of unsigned numbervalue
- - value of unsigned number- Returns:
- previous value of unsigned number
-
incrementAndGetUnsignedAsync
Description copied from interface:RBitSetAsync
Increments current unsigned value by definedincrement
value andsize
at specifiedoffset
and returns result.- Specified by:
incrementAndGetUnsignedAsync
in interfaceRBitSetAsync
- Parameters:
size
- - size of unsigned number up to 63 bitsoffset
- - offset of unsigned numberincrement
- - increment value- Returns:
- result value
-
getByte
public byte getByte(long offset) Description copied from interface:RBitSet
Returns byte number at specifiedoffset
-
setByte
public byte setByte(long offset, byte value) Description copied from interface:RBitSet
Returns previous value of byte number and replaces it with definedvalue
at specifiedoffset
-
incrementAndGetByte
public byte incrementAndGetByte(long offset, byte increment) Description copied from interface:RBitSet
Increments current byte value on definedincrement
value at specifiedoffset
and returns result.- Specified by:
incrementAndGetByte
in interfaceRBitSet
- Parameters:
offset
- - offset of numberincrement
- - increment value- Returns:
- result value
-
getShort
public short getShort(long offset) Description copied from interface:RBitSet
Returns short number at specifiedoffset
-
setShort
public short setShort(long offset, short value) Description copied from interface:RBitSet
Returns previous value of short number and replaces it with definedvalue
at specifiedoffset
-
incrementAndGetShort
public short incrementAndGetShort(long offset, short increment) Description copied from interface:RBitSet
Increments current short value on definedincrement
value at specifiedoffset
and returns result.- Specified by:
incrementAndGetShort
in interfaceRBitSet
- Parameters:
offset
- - offset of numberincrement
- - increment value- Returns:
- result value
-
getInteger
public int getInteger(long offset) Description copied from interface:RBitSet
Returns integer number at specifiedoffset
- Specified by:
getInteger
in interfaceRBitSet
- Parameters:
offset
- - offset of number- Returns:
- number
-
setInteger
public int setInteger(long offset, int value) Description copied from interface:RBitSet
Returns previous value of integer number and replaces it with definedvalue
at specifiedoffset
- Specified by:
setInteger
in interfaceRBitSet
- Parameters:
offset
- - offset of numbervalue
- - value of number- Returns:
- previous value of number
-
incrementAndGetInteger
public int incrementAndGetInteger(long offset, int increment) Description copied from interface:RBitSet
Increments current integer value on definedincrement
value at specifiedoffset
and returns result.- Specified by:
incrementAndGetInteger
in interfaceRBitSet
- Parameters:
offset
- - offset of numberincrement
- - increment value- Returns:
- result value
-
getLong
public long getLong(long offset) Description copied from interface:RBitSet
Returns long number at specifiedoffset
-
setLong
public long setLong(long offset, long value) Description copied from interface:RBitSet
Returns previous value of long number and replaces it with definedvalue
at specifiedoffset
-
incrementAndGetLong
public long incrementAndGetLong(long offset, long increment) Description copied from interface:RBitSet
Increments current long value on definedincrement
value at specifiedoffset
and returns result.- Specified by:
incrementAndGetLong
in interfaceRBitSet
- Parameters:
offset
- - offset of numberincrement
- - increment value- Returns:
- result value
-
getByteAsync
Description copied from interface:RBitSetAsync
Returns byte number at specifiedoffset
- Specified by:
getByteAsync
in interfaceRBitSetAsync
- Parameters:
offset
- - offset of number- Returns:
- number
-
setByteAsync
Description copied from interface:RBitSetAsync
Returns previous value of byte number and replaces it with definedvalue
at specifiedoffset
- Specified by:
setByteAsync
in interfaceRBitSetAsync
- Parameters:
offset
- - offset of numbervalue
- - value of number- Returns:
- previous value of number
-
incrementAndGetByteAsync
Description copied from interface:RBitSetAsync
Increments current byte value on definedincrement
value at specifiedoffset
and returns result.- Specified by:
incrementAndGetByteAsync
in interfaceRBitSetAsync
- Parameters:
offset
- - offset of numberincrement
- - increment value- Returns:
- result value
-
getShortAsync
Description copied from interface:RBitSetAsync
Returns short number at specifiedoffset
- Specified by:
getShortAsync
in interfaceRBitSetAsync
- Parameters:
offset
- - offset of number- Returns:
- number
-
setShortAsync
Description copied from interface:RBitSetAsync
Returns previous value of short number and replaces it with definedvalue
at specifiedoffset
- Specified by:
setShortAsync
in interfaceRBitSetAsync
- Parameters:
offset
- - offset of numbervalue
- - value of number- Returns:
- previous value of number
-
incrementAndGetShortAsync
Description copied from interface:RBitSetAsync
Increments current short value on definedincrement
value at specifiedoffset
and returns result.- Specified by:
incrementAndGetShortAsync
in interfaceRBitSetAsync
- Parameters:
offset
- - offset of numberincrement
- - increment value- Returns:
- result value
-
getIntegerAsync
Description copied from interface:RBitSetAsync
Returns integer number at specifiedoffset
- Specified by:
getIntegerAsync
in interfaceRBitSetAsync
- Parameters:
offset
- - offset of number- Returns:
- number
-
setIntegerAsync
Description copied from interface:RBitSetAsync
Returns previous value of integer number and replaces it with definedvalue
at specifiedoffset
- Specified by:
setIntegerAsync
in interfaceRBitSetAsync
- Parameters:
offset
- - offset of numbervalue
- - value of number- Returns:
- previous value of number
-
incrementAndGetIntegerAsync
Description copied from interface:RBitSetAsync
Increments current integer value on definedincrement
value at specifiedoffset
and returns result.- Specified by:
incrementAndGetIntegerAsync
in interfaceRBitSetAsync
- Parameters:
offset
- - offset of numberincrement
- - increment value- Returns:
- result value
-
getLongAsync
Description copied from interface:RBitSetAsync
Returns long number at specifiedoffset
- Specified by:
getLongAsync
in interfaceRBitSetAsync
- Parameters:
offset
- - offset of number- Returns:
- number
-
setLongAsync
Description copied from interface:RBitSetAsync
Returns previous value of long number and replaces it with definedvalue
at specifiedoffset
- Specified by:
setLongAsync
in interfaceRBitSetAsync
- Parameters:
offset
- - offset of numbervalue
- - value of number- Returns:
- previous value of number
-
incrementAndGetLongAsync
Description copied from interface:RBitSetAsync
Increments current long value on definedincrement
value at specifiedoffset
and returns result.- Specified by:
incrementAndGetLongAsync
in interfaceRBitSetAsync
- Parameters:
offset
- - offset of numberincrement
- - increment value- Returns:
- result value
-
length
public long length()Description copied from interface:RBitSet
Returns "logical size" = index of highest set bit plus one. Returns zero if there are no any set bit. -
set
Description copied from interface:RBitSet
Copy bits state of source BitSet object to this object -
set
public void set(long[] indexArray, boolean value) Description copied from interface:RBitSet
Set all bits tovalue
which index in indexArray -
get
public boolean get(long bitIndex) Description copied from interface:RBitSet
Returnstrue
if bit set to one andfalse
overwise. -
getAsync
Description copied from interface:RBitSetAsync
Returnstrue
if bit set to one andfalse
overwise.- Specified by:
getAsync
in interfaceRBitSetAsync
- Parameters:
bitIndex
- - index of bit- Returns:
true
if bit set to one andfalse
overwise.
-
set
public boolean set(long bitIndex) Description copied from interface:RBitSet
Set bit to one at specified bitIndex -
set
public void set(long fromIndex, long toIndex, boolean value) Description copied from interface:RBitSet
Set all bits tovalue
fromfromIndex
(inclusive) totoIndex
(exclusive) -
set
public void set(long fromIndex, long toIndex) Description copied from interface:RBitSet
Set all bits to one fromfromIndex
(inclusive) totoIndex
(exclusive) -
set
public boolean set(long bitIndex, boolean value) Description copied from interface:RBitSet
Set bit tovalue
at specifiedbitIndex
-
setAsync
Description copied from interface:RBitSetAsync
Set bit tovalue
at specifiedbitIndex
- Specified by:
setAsync
in interfaceRBitSetAsync
- Parameters:
bitIndex
- - index of bitvalue
- true = 1, false = 0- Returns:
true
- if previous value was true,false
- if previous value was false
-
toInt
protected int toInt(boolean value) -
setAsync
Description copied from interface:RBitSetAsync
Set all bits tovalue
which index in indexArray- Specified by:
setAsync
in interfaceRBitSetAsync
- Parameters:
indexArray
- The index array of bits that needs to be set tovalue
value
- true = 1, false = 0
-
toByteArray
public byte[] toByteArray()- Specified by:
toByteArray
in interfaceRBitSet
-
toByteArrayAsync
- Specified by:
toByteArrayAsync
in interfaceRBitSetAsync
-
cardinality
public long cardinality()Description copied from interface:RBitSet
Returns the number of bits set to one.- Specified by:
cardinality
in interfaceRBitSet
- Returns:
- number of bits
-
size
public long size()Description copied from interface:RBitSet
Returns number of set bits. -
clear
public void clear(long fromIndex, long toIndex) Description copied from interface:RBitSet
Set all bits to zero fromfromIndex
(inclusive) totoIndex
(exclusive) -
clear
public boolean clear(long bitIndex) Description copied from interface:RBitSet
Set bit to zero at specifiedbitIndex
-
clear
public void clear()Description copied from interface:RBitSet
Set all bits to zero -
or
Description copied from interface:RBitSet
Executes OR operation over this object and specified bitsets. Stores result into this object. -
and
Description copied from interface:RBitSet
Executes AND operation over this object and specified bitsets. Stores result into this object. -
xor
Description copied from interface:RBitSet
Executes XOR operation over this object and specified bitsets. Stores result into this object. -
not
public void not()Description copied from interface:RBitSet
Executes NOT operation over all bits -
asBitSet
-
toString
-
lengthAsync
Description copied from interface:RBitSetAsync
Returns "logical size" = index of highest set bit plus one. Returns zero if there are no any set bit.- Specified by:
lengthAsync
in interfaceRBitSetAsync
- Returns:
- "logical size" = index of highest set bit plus one
-
setAsync
Description copied from interface:RBitSetAsync
Set all bits tovalue
fromfromIndex
(inclusive) totoIndex
(exclusive)- Specified by:
setAsync
in interfaceRBitSetAsync
- Parameters:
fromIndex
- inclusivetoIndex
- exclusivevalue
- true = 1, false = 0- Returns:
- void
-
clearAsync
Description copied from interface:RBitSetAsync
Set all bits to zero fromfromIndex
(inclusive) totoIndex
(exclusive)- Specified by:
clearAsync
in interfaceRBitSetAsync
- Parameters:
fromIndex
- inclusivetoIndex
- exclusive- Returns:
- void
-
setAsync
Description copied from interface:RBitSetAsync
Copy bits state of source BitSet object to this object- Specified by:
setAsync
in interfaceRBitSetAsync
- Parameters:
bs
- - BitSet source- Returns:
- void
-
notAsync
Description copied from interface:RBitSetAsync
Executes NOT operation over all bits- Specified by:
notAsync
in interfaceRBitSetAsync
- Returns:
- void
-
setAsync
Description copied from interface:RBitSetAsync
Set all bits to one fromfromIndex
(inclusive) totoIndex
(exclusive)- Specified by:
setAsync
in interfaceRBitSetAsync
- Parameters:
fromIndex
- inclusivetoIndex
- exclusive- Returns:
- void
-
sizeAsync
Description copied from interface:RBitSetAsync
Returns number of set bits.- Specified by:
sizeAsync
in interfaceRBitSetAsync
- Returns:
- number of set bits.
-
setAsync
Description copied from interface:RBitSetAsync
Set bit to one at specified bitIndex- Specified by:
setAsync
in interfaceRBitSetAsync
- Parameters:
bitIndex
- - index of bit- Returns:
true
- if previous value was true,false
- if previous value was false
-
cardinalityAsync
Description copied from interface:RBitSetAsync
Returns the number of bits set to one.- Specified by:
cardinalityAsync
in interfaceRBitSetAsync
- Returns:
- number of bits
-
clearAsync
Description copied from interface:RBitSetAsync
Set bit to zero at specifiedbitIndex
- Specified by:
clearAsync
in interfaceRBitSetAsync
- Parameters:
bitIndex
- - index of bit- Returns:
true
- if previous value was true,false
- if previous value was false
-
clearAsync
Description copied from interface:RBitSetAsync
Set all bits to zero- Specified by:
clearAsync
in interfaceRBitSetAsync
- Returns:
- void
-
orAsync
Description copied from interface:RBitSetAsync
Executes OR operation over this object and specified bitsets. Stores result into this object.- Specified by:
orAsync
in interfaceRBitSetAsync
- Parameters:
bitSetNames
- - name of stored bitsets- Returns:
- void
-
andAsync
Description copied from interface:RBitSetAsync
Executes AND operation over this object and specified bitsets. Stores result into this object.- Specified by:
andAsync
in interfaceRBitSetAsync
- Parameters:
bitSetNames
- - name of stored bitsets- Returns:
- void
-
xorAsync
Description copied from interface:RBitSetAsync
Executes XOR operation over this object and specified bitsets. Stores result into this object.- Specified by:
xorAsync
in interfaceRBitSetAsync
- Parameters:
bitSetNames
- - name of stored bitsets- Returns:
- void
-
expire
Description copied from interface:RExpirable
UseRExpirable.expire(Duration)
instead- 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
Description copied from interface:RExpirableAsync
UseRExpirableAsync.expireAsync(Duration)
instead- 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
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
Description copied from interface:RExpirable
Sets an expiration date for this 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
-
expireIfSet
Description copied from interface:RExpirable
Sets an expiration date for this object only if it has been already set. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfSet
in interfaceRExpirable
- Parameters:
time
- expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireIfSetAsync
Description copied from interface:RExpirableAsync
Sets an expiration date for this object only if it has been already set. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfSetAsync
in interfaceRExpirableAsync
- Parameters:
time
- expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireIfNotSet
Description copied from interface:RExpirable
Sets an expiration date for this object only if it hasn't been set before. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfNotSet
in interfaceRExpirable
- Parameters:
time
- expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireIfNotSetAsync
Description copied from interface:RExpirableAsync
Sets an expiration date for this object only if it hasn't been set before. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfNotSetAsync
in interfaceRExpirableAsync
- Parameters:
time
- expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireIfGreater
Description copied from interface:RExpirable
Sets an expiration date for this object only if it's greater than expiration date set before. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfGreater
in interfaceRExpirable
- Parameters:
time
- expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireIfGreaterAsync
Description copied from interface:RExpirableAsync
Sets an expiration date for this object only if it's greater than expiration date set before. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfGreaterAsync
in interfaceRExpirableAsync
- Parameters:
time
- expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireIfLess
Description copied from interface:RExpirable
Sets an expiration date for this object only if it's less than expiration date set before. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfLess
in interfaceRExpirable
- Parameters:
time
- expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireIfLessAsync
Description copied from interface:RExpirableAsync
Sets an expiration date for this object only if it's less than expiration date set before. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfLessAsync
in interfaceRExpirableAsync
- Parameters:
time
- expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireAsync
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
-
expire
Description copied from interface:RExpirable
Sets a timeout for this object. After the timeout has expired, the key will automatically be deleted.- Specified by:
expire
in interfaceRExpirable
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
expireAsync
Description copied from interface:RExpirableAsync
Set a timeout for object. After the timeout has expired, the key will automatically be deleted.- Specified by:
expireAsync
in interfaceRExpirableAsync
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
expireAt
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
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
-
expireIfSet
Description copied from interface:RExpirable
Sets a timeout for this object only if it has been already set. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfSet
in interfaceRExpirable
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
expireIfSetAsync
Description copied from interface:RExpirableAsync
Sets a timeout for this object only if it has been already set. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfSetAsync
in interfaceRExpirableAsync
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
expireIfNotSet
Description copied from interface:RExpirable
Sets a timeout for this object only if it hasn't been set before. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfNotSet
in interfaceRExpirable
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
expireIfNotSetAsync
Description copied from interface:RExpirableAsync
Sets a timeout for this object only if it hasn't been set before. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfNotSetAsync
in interfaceRExpirableAsync
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
expireIfGreater
Description copied from interface:RExpirable
Sets a timeout for this object only if it's greater than timeout set before. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfGreater
in interfaceRExpirable
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
expireIfGreaterAsync
Description copied from interface:RExpirableAsync
Sets a timeout for this object only if it's greater than timeout set before. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfGreaterAsync
in interfaceRExpirableAsync
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
expireIfLess
Description copied from interface:RExpirable
Sets a timeout for this object only if it's less than timeout set before. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfLess
in interfaceRExpirable
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
expireIfLessAsync
Description copied from interface:RExpirableAsync
Sets a timeout for this object only if it's less than timeout set before. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfLessAsync
in interfaceRExpirableAsync
- Parameters:
duration
- timeout before object will be deleted- 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
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
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.
-
getExpireTime
public long getExpireTime()Description copied from interface:RExpirable
Expiration time of Redisson object that has a timeoutRequires Redis 7.0.0 and higher.
- Specified by:
getExpireTime
in interfaceRExpirable
- Returns:
- expiration time
-
getExpireTimeAsync
Description copied from interface:RExpirableAsync
Expiration time of Redisson object that has a timeoutRequires Redis 7.0.0 and higher.
- Specified by:
getExpireTimeAsync
in interfaceRExpirableAsync
- Returns:
- expiration time
-
expireAsync
-
expireAtAsync
-
clearExpireAsync
-