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 >
... bitSetNames)
Executes AND operation over this object and specified bitsets.>
cardinalityAsync()
Returns the number of bits set to one.>
clearAsync()
Set all bits to zero>
clearAsync(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.>
lengthAsync()
Returns "logical size" = index of highest set bit plus one.>
notAsync()
Executes NOT operation over all bits>
... bitSetNames)
Executes OR operation over this object and specified bitsets.>
setAsync(long bitIndex)
Set bit to one at specified bitIndex>
setAsync(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)>
bs)
Copy bits state of source BitSet object to this object>
setByteAsync(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
>
sizeAsync()
Returns number of set bits.RFuture<byte[]>
toByteArrayAsync()
>
... bitSetNames)
Executes XOR operation over this object and specified bitsets.-
Methods inherited from interface org.redisson.api.RExpirableAsync
clearExpireAsync, expireAsync, expireAsync, expireAtAsync, expireAtAsync, 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
> 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
> 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
> 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
> 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
> 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
> 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
> getByteAsync(long offset)
Returns byte number at specifiedoffset
- Parameters:
offset
- - offset of number- Returns:
- number
-
setByteAsync
> 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
> 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
> getShortAsync(long offset)
Returns short number at specifiedoffset
- Parameters:
offset
- - offset of number- Returns:
- number
-
setShortAsync
> 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
> 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
> getIntegerAsync(long offset)
Returns integer number at specifiedoffset
- Parameters:
offset
- - offset of number- Returns:
- number
-
setIntegerAsync
> 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
> 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
> getLongAsync(long offset)
Returns long number at specifiedoffset
- Parameters:
offset
- - offset of number- Returns:
- number
-
setLongAsync
> 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
> 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
> 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
> 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
> clearAsync(long fromIndex, long toIndex)
Set all bits to zero fromfromIndex
(inclusive) totoIndex
(exclusive)- Parameters:
fromIndex
- inclusivetoIndex
- exclusive- Returns:
- void
-
setAsync
> setAsync( bs)
Copy bits state of source BitSet object to this object- Parameters:
bs
- - BitSet source- Returns:
- void
-
notAsync
> notAsync()
Executes NOT operation over all bits- Returns:
- void
-
setAsync
> setAsync(long fromIndex, long toIndex)
Set all bits to one fromfromIndex
(inclusive) totoIndex
(exclusive)- Parameters:
fromIndex
- inclusivetoIndex
- exclusive- Returns:
- void
-
sizeAsync
> sizeAsync()
Returns number of set bits.- Returns:
- number of set bits.
-
getAsync
> 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
> 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
> 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
> cardinalityAsync()
Returns the number of bits set to one.- Returns:
- number of bits
-
clearAsync
> 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
-
clearAsync
> clearAsync()
Set all bits to zero- Returns:
- void
-
orAsync
> orAsync(... bitSetNames)
Executes OR operation over this object and specified bitsets. Stores result into this object.- Parameters:
bitSetNames
- - name of stored bitsets- Returns:
- void
-
andAsync
> andAsync(... bitSetNames)
Executes AND operation over this object and specified bitsets. Stores result into this object.- Parameters:
bitSetNames
- - name of stored bitsets- Returns:
- void
-
xorAsync
> xorAsync(... bitSetNames)
Executes XOR operation over this object and specified bitsets. Stores result into this object.- Parameters:
bitSetNames
- - name of stored bitsets- Returns:
- void
-
-