Package org.redisson.api
Interface RBitSetRx
- All Superinterfaces:
RExpirableRx
,RObjectRx
RxJava2 interface for BitSet object
- Author:
- Nikita Koksharov
-
Method Summary
Modifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Completable
Executes AND operation over this object and specified bitsets.io.reactivex.rxjava3.core.Single
<Long> Returns the number of bits set to one.io.reactivex.rxjava3.core.Completable
clear()
Set all bits to zeroio.reactivex.rxjava3.core.Single
<Boolean> clear
(long bitIndex) Set bit to zero at specifiedbitIndex
io.reactivex.rxjava3.core.Completable
clear
(long fromIndex, long toIndex) Set all bits to zero fromfromIndex
(inclusive) totoIndex
(exclusive)io.reactivex.rxjava3.core.Single
<Boolean> get
(long bitIndex) Returnstrue
if bit set to one andfalse
overwise.io.reactivex.rxjava3.core.Single
<Byte> getByte
(long offset) Returns byte number at specifiedoffset
io.reactivex.rxjava3.core.Single
<Integer> getInteger
(long offset) Returns integer number at specifiedoffset
io.reactivex.rxjava3.core.Single
<Long> getLong
(long offset) Returns long number at specifiedoffset
io.reactivex.rxjava3.core.Single
<Short> getShort
(long offset) Returns short number at specifiedoffset
io.reactivex.rxjava3.core.Single
<Long> getSigned
(int size, long offset) Returns signed number at specifiedoffset
andsize
io.reactivex.rxjava3.core.Single
<Long> getUnsigned
(int size, long offset) Returns unsigned number at specifiedoffset
andsize
io.reactivex.rxjava3.core.Single
<Byte> incrementAndGetByte
(long offset, byte increment) Increments current byte value on definedincrement
value at specifiedoffset
and returns result.io.reactivex.rxjava3.core.Single
<Integer> incrementAndGetInteger
(long offset, int increment) Increments current integer value on definedincrement
value at specifiedoffset
and returns result.io.reactivex.rxjava3.core.Single
<Long> incrementAndGetLong
(long offset, long increment) Increments current long value on definedincrement
value at specifiedoffset
and returns result.io.reactivex.rxjava3.core.Single
<Short> incrementAndGetShort
(long offset, short increment) Increments current short value on definedincrement
value at specifiedoffset
and returns result.io.reactivex.rxjava3.core.Single
<Long> incrementAndGetSigned
(int size, long offset, long increment) Increments current signed value by definedincrement
value andsize
at specifiedoffset
and returns result.io.reactivex.rxjava3.core.Single
<Long> incrementAndGetUnsigned
(int size, long offset, long increment) Increments current unsigned value by definedincrement
value andsize
at specifiedoffset
and returns result.io.reactivex.rxjava3.core.Single
<Long> length()
Returns "logical size" = index of highest set bit plus one.io.reactivex.rxjava3.core.Completable
not()
Executes NOT operation over all bitsio.reactivex.rxjava3.core.Completable
Executes OR operation over this object and specified bitsets.io.reactivex.rxjava3.core.Single
<Boolean> set
(long bitIndex) Set bit to one at specified bitIndexio.reactivex.rxjava3.core.Single
<Boolean> set
(long bitIndex, boolean value) Set bit tovalue
at specifiedbitIndex
io.reactivex.rxjava3.core.Completable
set
(long fromIndex, long toIndex) Set all bits to one fromfromIndex
(inclusive) totoIndex
(exclusive)io.reactivex.rxjava3.core.Completable
set
(long fromIndex, long toIndex, boolean value) Set all bits tovalue
fromfromIndex
(inclusive) totoIndex
(exclusive)io.reactivex.rxjava3.core.Completable
Copy bits state of source BitSet object to this objectio.reactivex.rxjava3.core.Single
<Byte> setByte
(long offset, byte value) Returns previous value of byte number and replaces it with definedvalue
at specifiedoffset
io.reactivex.rxjava3.core.Single
<Integer> setInteger
(long offset, int value) Returns previous value of integer number and replaces it with definedvalue
at specifiedoffset
io.reactivex.rxjava3.core.Single
<Long> setLong
(long offset, long value) Returns previous value of long number and replaces it with definedvalue
at specifiedoffset
io.reactivex.rxjava3.core.Single
<Short> setShort
(long offset, short value) Returns previous value of short number and replaces it with definedvalue
at specifiedoffset
io.reactivex.rxjava3.core.Single
<Long> setSigned
(int size, long offset, long value) Returns previous value of signed number and replaces it with definedvalue
at specifiedoffset
io.reactivex.rxjava3.core.Single
<Long> setUnsigned
(int size, long offset, long value) Returns previous value of unsigned number and replaces it with definedvalue
at specifiedoffset
io.reactivex.rxjava3.core.Single
<Long> size()
Returns number of set bits.io.reactivex.rxjava3.core.Single
<byte[]> io.reactivex.rxjava3.core.Completable
Executes XOR operation over this object and specified bitsets.Methods inherited from interface org.redisson.api.RExpirableRx
clearExpire, expire, expire, expire, expireAt, expireAt, expireIfGreater, expireIfGreater, expireIfLess, expireIfLess, expireIfNotSet, expireIfNotSet, expireIfSet, expireIfSet, getExpireTime, remainTimeToLive
Methods inherited from interface org.redisson.api.RObjectRx
addListener, copy, delete, dump, getCodec, getIdleTime, getName, isExists, migrate, move, removeListener, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlink
-
Method Details
-
getSigned
Returns signed number at specifiedoffset
andsize
- Parameters:
size
- - size of signed number up to 64 bitsoffset
- - offset of signed number- Returns:
- signed number
-
setSigned
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
-
incrementAndGetSigned
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
-
getUnsigned
Returns unsigned number at specifiedoffset
andsize
- Parameters:
size
- - size of unsigned number up to 64 bitsoffset
- - offset of unsigned number- Returns:
- unsigned number
-
setUnsigned
Returns previous value of unsigned number and replaces it with definedvalue
at specifiedoffset
- 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
io.reactivex.rxjava3.core.Single<Long> incrementAndGetUnsigned(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 64 bitsoffset
- - offset of unsigned numberincrement
- - increment value- Returns:
- result value
-
getByte
Returns byte number at specifiedoffset
- Parameters:
offset
- - offset of number- Returns:
- number
-
setByte
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
-
incrementAndGetByte
Increments current byte value on definedincrement
value at specifiedoffset
and returns result.- Parameters:
offset
- - offset of numberincrement
- - increment value- Returns:
- result value
-
getShort
Returns short number at specifiedoffset
- Parameters:
offset
- - offset of number- Returns:
- number
-
setShort
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
-
incrementAndGetShort
Increments current short value on definedincrement
value at specifiedoffset
and returns result.- Parameters:
offset
- - offset of numberincrement
- - increment value- Returns:
- result value
-
getInteger
Returns integer number at specifiedoffset
- Parameters:
offset
- - offset of number- Returns:
- number
-
setInteger
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
-
incrementAndGetInteger
Increments current integer value on definedincrement
value at specifiedoffset
and returns result.- Parameters:
offset
- - offset of numberincrement
- - increment value- Returns:
- result value
-
getLong
Returns long number at specifiedoffset
- Parameters:
offset
- - offset of number- Returns:
- number
-
setLong
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
-
incrementAndGetLong
Increments current long value on definedincrement
value at specifiedoffset
and returns result.- Parameters:
offset
- - offset of numberincrement
- - increment value- Returns:
- result value
-
toByteArray
io.reactivex.rxjava3.core.Single<byte[]> toByteArray() -
length
io.reactivex.rxjava3.core.Single<Long> length()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
-
set
io.reactivex.rxjava3.core.Completable set(long fromIndex, long toIndex, boolean value) Set all bits tovalue
fromfromIndex
(inclusive) totoIndex
(exclusive)- Parameters:
fromIndex
- inclusivetoIndex
- exclusivevalue
- true = 1, false = 0- Returns:
- void
-
clear
io.reactivex.rxjava3.core.Completable clear(long fromIndex, long toIndex) Set all bits to zero fromfromIndex
(inclusive) totoIndex
(exclusive)- Parameters:
fromIndex
- inclusivetoIndex
- exclusive- Returns:
- void
-
set
Copy bits state of source BitSet object to this object- Parameters:
bs
- - BitSet source- Returns:
- void
-
not
io.reactivex.rxjava3.core.Completable not()Executes NOT operation over all bits- Returns:
- void
-
set
io.reactivex.rxjava3.core.Completable set(long fromIndex, long toIndex) Set all bits to one fromfromIndex
(inclusive) totoIndex
(exclusive)- Parameters:
fromIndex
- inclusivetoIndex
- exclusive- Returns:
- void
-
size
io.reactivex.rxjava3.core.Single<Long> size()Returns number of set bits.- Returns:
- number of set bits.
-
get
Returnstrue
if bit set to one andfalse
overwise.- Parameters:
bitIndex
- - index of bit- Returns:
true
if bit set to one andfalse
overwise.
-
set
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
-
set
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
-
cardinality
io.reactivex.rxjava3.core.Single<Long> cardinality()Returns the number of bits set to one.- Returns:
- number of bits
-
clear
Set bit to zero at specifiedbitIndex
- Parameters:
bitIndex
- - index of bit- Returns:
true
- if previous value was true,false
- if previous value was false
-
clear
io.reactivex.rxjava3.core.Completable clear()Set all bits to zero- Returns:
- void
-
or
Executes OR operation over this object and specified bitsets. Stores result into this object.- Parameters:
bitSetNames
- - name of stored bitsets- Returns:
- void
-
and
Executes AND operation over this object and specified bitsets. Stores result into this object.- Parameters:
bitSetNames
- - name of stored bitsets- Returns:
- void
-
xor
Executes XOR operation over this object and specified bitsets. Stores result into this object.- Parameters:
bitSetNames
- - name of stored bitsets- Returns:
- void
-