Package org.redisson.api
Interface RBitSetAsync
- All Superinterfaces:
RExpirableAsync
,RObjectAsync
- All Known Subinterfaces:
RBitSet
- All Known Implementing Classes:
RedissonBitSet
Vector of bits that grows as needed. Asynchronous interface.
- Author:
- Nikita Koksharov
-
Method Summary
Modifier and TypeMethodDescriptionExecutes AND operation over this object and specified bitsets.Returns the number of bits set to one.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)getAsync
(long bitIndex) Returnstrue
if bit set to one andfalse
overwise.getByteAsync
(long offset) Returns byte number at specifiedoffset
getIntegerAsync
(long offset) Returns integer number at specifiedoffset
getLongAsync
(long offset) Returns long number at specifiedoffset
getShortAsync
(long offset) Returns short number at specifiedoffset
getSignedAsync
(int size, long offset) Returns signed number at specifiedoffset
andsize
getUnsignedAsync
(int size, long offset) Returns unsigned number at specifiedoffset
andsize
incrementAndGetByteAsync
(long offset, byte increment) Increments current byte 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.incrementAndGetLongAsync
(long offset, long increment) Increments current long 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.incrementAndGetSignedAsync
(int size, long offset, long increment) Increments current signed 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.Returns "logical size" = index of highest set bit plus one.notAsync()
Executes NOT operation over all bitsExecutes OR operation over this object and specified bitsets.setAsync
(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 objectsetByteAsync
(long offset, byte value) Returns previous value of byte 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
setLongAsync
(long offset, long value) Returns previous value of long 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
setSignedAsync
(int size, long offset, long value) Returns previous value of signed 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
Returns number of set bits.RFuture
<byte[]> Executes XOR operation over this object and specified bitsets.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.RObjectAsync
addListenerAsync, copyAsync, deleteAsync, dumpAsync, getIdleTimeAsync, isExistsAsync, migrateAsync, moveAsync, removeListenerAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemoryAsync, touchAsync, unlinkAsync
-
Method Details
-
getSignedAsync
Returns signed number at specifiedoffset
andsize
- Parameters:
size
- - size of signed number up to 64 bitsoffset
- - offset of signed number- Returns:
- signed number
-
setSignedAsync
Returns previous value of signed number and replaces it with definedvalue
at specifiedoffset
- 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
Increments current signed value by definedincrement
value andsize
at specifiedoffset
and returns result.- Parameters:
size
- - size of signed number up to 64 bitsoffset
- - offset of signed numberincrement
- - increment value- Returns:
- result value
-
getUnsignedAsync
Returns unsigned number at specifiedoffset
andsize
- Parameters:
size
- - size of unsigned number up to 63 bitsoffset
- - offset of unsigned number- Returns:
- unsigned number
-
setUnsignedAsync
Returns previous value of unsigned number and replaces it with definedvalue
at specifiedoffset
- 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
Increments current unsigned value by definedincrement
value andsize
at specifiedoffset
and returns result.- Parameters:
size
- - size of unsigned number up to 63 bitsoffset
- - offset of unsigned numberincrement
- - increment value- Returns:
- result value
-
getByteAsync
Returns byte number at specifiedoffset
- Parameters:
offset
- - offset of number- Returns:
- number
-
setByteAsync
Returns previous value of byte number and replaces it with definedvalue
at specifiedoffset
- Parameters:
offset
- - offset of numbervalue
- - value of number- Returns:
- previous value of number
-
incrementAndGetByteAsync
Increments current byte value on definedincrement
value at specifiedoffset
and returns result.- Parameters:
offset
- - offset of numberincrement
- - increment value- Returns:
- result value
-
getShortAsync
Returns short number at specifiedoffset
- Parameters:
offset
- - offset of number- Returns:
- number
-
setShortAsync
Returns previous value of short number and replaces it with definedvalue
at specifiedoffset
- Parameters:
offset
- - offset of numbervalue
- - value of number- Returns:
- previous value of number
-
incrementAndGetShortAsync
Increments current short value on definedincrement
value at specifiedoffset
and returns result.- Parameters:
offset
- - offset of numberincrement
- - increment value- Returns:
- result value
-
getIntegerAsync
Returns integer number at specifiedoffset
- Parameters:
offset
- - offset of number- Returns:
- number
-
setIntegerAsync
Returns previous value of integer number and replaces it with definedvalue
at specifiedoffset
- Parameters:
offset
- - offset of numbervalue
- - value of number- Returns:
- previous value of number
-
incrementAndGetIntegerAsync
Increments current integer value on definedincrement
value at specifiedoffset
and returns result.- Parameters:
offset
- - offset of numberincrement
- - increment value- Returns:
- result value
-
getLongAsync
Returns long number at specifiedoffset
- Parameters:
offset
- - offset of number- Returns:
- number
-
setLongAsync
Returns previous value of long number and replaces it with definedvalue
at specifiedoffset
- Parameters:
offset
- - offset of numbervalue
- - value of number- Returns:
- previous value of number
-
incrementAndGetLongAsync
Increments current long value on definedincrement
value at specifiedoffset
and returns result.- Parameters:
offset
- - offset of numberincrement
- - increment value- Returns:
- result value
-
toByteArrayAsync
RFuture<byte[]> toByteArrayAsync() -
lengthAsync
Returns "logical size" = index of highest set bit plus one. Returns zero if there are no any set bit.- Returns:
- "logical size" = index of highest set bit plus one
-
setAsync
Set all bits tovalue
fromfromIndex
(inclusive) totoIndex
(exclusive)- Parameters:
fromIndex
- inclusivetoIndex
- exclusivevalue
- true = 1, false = 0- Returns:
- void
-
clearAsync
Set all bits to zero fromfromIndex
(inclusive) totoIndex
(exclusive)- Parameters:
fromIndex
- inclusivetoIndex
- exclusive- Returns:
- void
-
setAsync
Copy bits state of source BitSet object to this object- Parameters:
bs
- - BitSet source- Returns:
- void
-
notAsync
Executes NOT operation over all bits- Returns:
- void
-
setAsync
Set all bits to one fromfromIndex
(inclusive) totoIndex
(exclusive)- Parameters:
fromIndex
- inclusivetoIndex
- exclusive- Returns:
- void
-
sizeAsync
Returns number of set bits.- Returns:
- number of set bits.
-
getAsync
Returnstrue
if bit set to one andfalse
overwise.- Parameters:
bitIndex
- - index of bit- Returns:
true
if bit set to one andfalse
overwise.
-
setAsync
Set bit to one at specified bitIndex- Parameters:
bitIndex
- - index of bit- Returns:
true
- if previous value was true,false
- if previous value was false
-
setAsync
Set bit tovalue
at specifiedbitIndex
- Parameters:
bitIndex
- - index of bitvalue
- true = 1, false = 0- Returns:
true
- if previous value was true,false
- if previous value was false
-
setAsync
Set all bits tovalue
which index in indexArray- Parameters:
indexArray
- The index array of bits that needs to be set tovalue
value
- true = 1, false = 0
-
cardinalityAsync
Returns the number of bits set to one.- Returns:
- number of bits
-
clearAsync
Set bit to zero at specifiedbitIndex
- Parameters:
bitIndex
- - index of bit- Returns:
true
- if previous value was true,false
- if previous value was false
-
clearAsync
Set all bits to zero- Returns:
- void
-
orAsync
Executes OR operation over this object and specified bitsets. Stores result into this object.- Parameters:
bitSetNames
- - name of stored bitsets- Returns:
- void
-
andAsync
Executes AND operation over this object and specified bitsets. Stores result into this object.- Parameters:
bitSetNames
- - name of stored bitsets- Returns:
- void
-
xorAsync
Executes XOR operation over this object and specified bitsets. Stores result into this object.- Parameters:
bitSetNames
- - name of stored bitsets- Returns:
- void
-