Package org.redisson.api
Interface RBitSetAsync
-
- All Superinterfaces:
RExpirableAsync
,RObjectAsync
- All Known Subinterfaces:
RBitSet
- All Known Implementing Classes:
RedissonBitSet
public interface RBitSetAsync extends RExpirableAsync
Vector of bits that grows as needed. Asynchronous interface.- Author:
- Nikita Koksharov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RFuture<Void>
andAsync(String... bitSetNames)
Executes AND operation over this object and specified bitsets.RFuture<Long>
cardinalityAsync()
Returns the number of bits set to one.RFuture<Void>
clearAsync()
Set all bits to zeroRFuture<Boolean>
clearAsync(long bitIndex)
Set bit to zero at specifiedbitIndex
RFuture<Void>
clearAsync(long fromIndex, long toIndex)
Set all bits to zero fromfromIndex
(inclusive) totoIndex
(exclusive)RFuture<Boolean>
getAsync(long bitIndex)
Returnstrue
if bit set to one andfalse
overwise.RFuture<Byte>
getByteAsync(long offset)
Returns byte number at specifiedoffset
RFuture<Integer>
getIntegerAsync(long offset)
Returns integer number at specifiedoffset
RFuture<Long>
getLongAsync(long offset)
Returns long number at specifiedoffset
RFuture<Short>
getShortAsync(long offset)
Returns short number at specifiedoffset
RFuture<Long>
getSignedAsync(int size, long offset)
Returns signed number at specifiedoffset
andsize
RFuture<Long>
getUnsignedAsync(int size, long offset)
Returns unsigned number at specifiedoffset
andsize
RFuture<Byte>
incrementAndGetByteAsync(long offset, byte increment)
Increments current byte value on definedincrement
value at specifiedoffset
and returns result.RFuture<Integer>
incrementAndGetIntegerAsync(long offset, int increment)
Increments current integer value on definedincrement
value at specifiedoffset
and returns result.RFuture<Long>
incrementAndGetLongAsync(long offset, long increment)
Increments current long value on definedincrement
value at specifiedoffset
and returns result.RFuture<Short>
incrementAndGetShortAsync(long offset, short increment)
Increments current short value on definedincrement
value at specifiedoffset
and returns result.RFuture<Long>
incrementAndGetSignedAsync(int size, long offset, long increment)
Increments current signed value by definedincrement
value andsize
at specifiedoffset
and returns result.RFuture<Long>
incrementAndGetUnsignedAsync(int size, long offset, long increment)
Increments current unsigned value by definedincrement
value andsize
at specifiedoffset
and returns result.RFuture<Long>
lengthAsync()
Returns "logical size" = index of highest set bit plus one.RFuture<Void>
notAsync()
Executes NOT operation over all bitsRFuture<Void>
orAsync(String... bitSetNames)
Executes OR operation over this object and specified bitsets.RFuture<Boolean>
setAsync(long bitIndex)
Set bit to one at specified bitIndexRFuture<Boolean>
setAsync(long bitIndex, boolean value)
Set bit tovalue
at specifiedbitIndex
RFuture<Void>
setAsync(long fromIndex, long toIndex)
Set all bits to one fromfromIndex
(inclusive) totoIndex
(exclusive)RFuture<Void>
setAsync(long fromIndex, long toIndex, boolean value)
Set all bits tovalue
fromfromIndex
(inclusive) totoIndex
(exclusive)RFuture<Void>
setAsync(BitSet bs)
Copy bits state of source BitSet object to this objectRFuture<Byte>
setByteAsync(long offset, byte value)
Returns previous value of byte number and replaces it with definedvalue
at specifiedoffset
RFuture<Integer>
setIntegerAsync(long offset, int value)
Returns previous value of integer number and replaces it with definedvalue
at specifiedoffset
RFuture<Long>
setLongAsync(long offset, long value)
Returns previous value of long number and replaces it with definedvalue
at specifiedoffset
RFuture<Short>
setShortAsync(long offset, short value)
Returns previous value of short number and replaces it with definedvalue
at specifiedoffset
RFuture<Long>
setSignedAsync(int size, long offset, long value)
Returns previous value of signed number and replaces it with definedvalue
at specifiedoffset
RFuture<Long>
setUnsignedAsync(int size, long offset, long value)
Returns previous value of unsigned number and replaces it with definedvalue
at specifiedoffset
RFuture<Long>
sizeAsync()
Returns number of set bits.RFuture<byte[]>
toByteArrayAsync()
RFuture<Void>
xorAsync(String... bitSetNames)
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 Detail
-
getSignedAsync
RFuture<Long> getSignedAsync(int size, long offset)
Returns signed number at specifiedoffset
andsize
- Parameters:
size
- - size of signed number up to 64 bitsoffset
- - offset of signed number- Returns:
- signed number
-
setSignedAsync
RFuture<Long> setSignedAsync(int size, long offset, long value)
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
RFuture<Long> incrementAndGetSignedAsync(int size, long offset, long increment)
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
RFuture<Long> getUnsignedAsync(int size, long offset)
Returns unsigned number at specifiedoffset
andsize
- Parameters:
size
- - size of unsigned number up to 63 bitsoffset
- - offset of unsigned number- Returns:
- unsigned number
-
setUnsignedAsync
RFuture<Long> setUnsignedAsync(int size, long offset, long value)
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
RFuture<Long> incrementAndGetUnsignedAsync(int size, long offset, long increment)
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
RFuture<Byte> getByteAsync(long offset)
Returns byte number at specifiedoffset
- Parameters:
offset
- - offset of number- Returns:
- number
-
setByteAsync
RFuture<Byte> setByteAsync(long offset, byte value)
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
RFuture<Byte> incrementAndGetByteAsync(long offset, byte increment)
Increments current byte value on definedincrement
value at specifiedoffset
and returns result.- Parameters:
offset
- - offset of numberincrement
- - increment value- Returns:
- result value
-
getShortAsync
RFuture<Short> getShortAsync(long offset)
Returns short number at specifiedoffset
- Parameters:
offset
- - offset of number- Returns:
- number
-
setShortAsync
RFuture<Short> setShortAsync(long offset, short value)
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
RFuture<Short> incrementAndGetShortAsync(long offset, short increment)
Increments current short value on definedincrement
value at specifiedoffset
and returns result.- Parameters:
offset
- - offset of numberincrement
- - increment value- Returns:
- result value
-
getIntegerAsync
RFuture<Integer> getIntegerAsync(long offset)
Returns integer number at specifiedoffset
- Parameters:
offset
- - offset of number- Returns:
- number
-
setIntegerAsync
RFuture<Integer> setIntegerAsync(long offset, int value)
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
RFuture<Integer> incrementAndGetIntegerAsync(long offset, int increment)
Increments current integer value on definedincrement
value at specifiedoffset
and returns result.- Parameters:
offset
- - offset of numberincrement
- - increment value- Returns:
- result value
-
getLongAsync
RFuture<Long> getLongAsync(long offset)
Returns long number at specifiedoffset
- Parameters:
offset
- - offset of number- Returns:
- number
-
setLongAsync
RFuture<Long> setLongAsync(long offset, long value)
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
RFuture<Long> incrementAndGetLongAsync(long offset, long increment)
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
RFuture<Long> 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
RFuture<Void> setAsync(long fromIndex, long toIndex, boolean value)
Set all bits tovalue
fromfromIndex
(inclusive) totoIndex
(exclusive)- Parameters:
fromIndex
- inclusivetoIndex
- exclusivevalue
- true = 1, false = 0- Returns:
- void
-
clearAsync
RFuture<Void> clearAsync(long fromIndex, long toIndex)
Set all bits to zero fromfromIndex
(inclusive) totoIndex
(exclusive)- Parameters:
fromIndex
- inclusivetoIndex
- exclusive- Returns:
- void
-
setAsync
RFuture<Void> setAsync(BitSet bs)
Copy bits state of source BitSet object to this object- Parameters:
bs
- - BitSet source- Returns:
- void
-
setAsync
RFuture<Void> setAsync(long fromIndex, long toIndex)
Set all bits to one fromfromIndex
(inclusive) totoIndex
(exclusive)- Parameters:
fromIndex
- inclusivetoIndex
- exclusive- Returns:
- void
-
getAsync
RFuture<Boolean> getAsync(long bitIndex)
Returnstrue
if bit set to one andfalse
overwise.- Parameters:
bitIndex
- - index of bit- Returns:
true
if bit set to one andfalse
overwise.
-
setAsync
RFuture<Boolean> setAsync(long bitIndex)
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
RFuture<Boolean> setAsync(long bitIndex, boolean value)
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
-
cardinalityAsync
RFuture<Long> cardinalityAsync()
Returns the number of bits set to one.- Returns:
- number of bits
-
clearAsync
RFuture<Boolean> clearAsync(long bitIndex)
Set bit to zero at specifiedbitIndex
- Parameters:
bitIndex
- - index of bit- Returns:
true
- if previous value was true,false
- if previous value was false
-
orAsync
RFuture<Void> orAsync(String... bitSetNames)
Executes OR operation over this object and specified bitsets. Stores result into this object.- Parameters:
bitSetNames
- - name of stored bitsets- Returns:
- void
-
andAsync
RFuture<Void> andAsync(String... bitSetNames)
Executes AND operation over this object and specified bitsets. Stores result into this object.- Parameters:
bitSetNames
- - name of stored bitsets- Returns:
- void
-
-