Package org.redisson.api
Interface RBitSetRx
-
- All Superinterfaces:
RExpirableRx
,RObjectRx
public interface RBitSetRx extends RExpirableRx
RxJava2 interface for BitSet object- Author:
- Nikita Koksharov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description io.reactivex.rxjava3.core.Completable
and(String... bitSetNames)
Executes AND operation over this object and specified bitsets.io.reactivex.rxjava3.core.Single<Long>
cardinality()
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
or(String... bitSetNames)
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
set(BitSet bs)
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[]>
toByteArray()
io.reactivex.rxjava3.core.Completable
xor(String... bitSetNames)
Executes XOR operation over this object and specified bitsets.-
Methods inherited from interface org.redisson.api.RExpirableRx
clearExpire, expire, expireAt, expireAt, expireAt, 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 Detail
-
getSigned
io.reactivex.rxjava3.core.Single<Long> getSigned(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
-
setSigned
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
- 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
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.- Parameters:
size
- - size of signed number up to 64 bitsoffset
- - offset of signed numberincrement
- - increment value- Returns:
- result value
-
getUnsigned
io.reactivex.rxjava3.core.Single<Long> getUnsigned(int size, long offset)
Returns unsigned number at specifiedoffset
andsize
- Parameters:
size
- - size of unsigned number up to 64 bitsoffset
- - offset of unsigned number- Returns:
- unsigned number
-
setUnsigned
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
- 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
io.reactivex.rxjava3.core.Single<Byte> getByte(long offset)
Returns byte number at specifiedoffset
- Parameters:
offset
- - offset of number- Returns:
- number
-
setByte
io.reactivex.rxjava3.core.Single<Byte> setByte(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
-
incrementAndGetByte
io.reactivex.rxjava3.core.Single<Byte> incrementAndGetByte(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
-
getShort
io.reactivex.rxjava3.core.Single<Short> getShort(long offset)
Returns short number at specifiedoffset
- Parameters:
offset
- - offset of number- Returns:
- number
-
setShort
io.reactivex.rxjava3.core.Single<Short> setShort(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
-
incrementAndGetShort
io.reactivex.rxjava3.core.Single<Short> incrementAndGetShort(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
-
getInteger
io.reactivex.rxjava3.core.Single<Integer> getInteger(long offset)
Returns integer number at specifiedoffset
- Parameters:
offset
- - offset of number- Returns:
- number
-
setInteger
io.reactivex.rxjava3.core.Single<Integer> setInteger(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
-
incrementAndGetInteger
io.reactivex.rxjava3.core.Single<Integer> incrementAndGetInteger(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
-
getLong
io.reactivex.rxjava3.core.Single<Long> getLong(long offset)
Returns long number at specifiedoffset
- Parameters:
offset
- - offset of number- Returns:
- number
-
setLong
io.reactivex.rxjava3.core.Single<Long> setLong(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
-
incrementAndGetLong
io.reactivex.rxjava3.core.Single<Long> incrementAndGetLong(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
-
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
io.reactivex.rxjava3.core.Completable set(BitSet bs)
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
io.reactivex.rxjava3.core.Single<Boolean> get(long bitIndex)
Returnstrue
if bit set to one andfalse
overwise.- Parameters:
bitIndex
- - index of bit- Returns:
true
if bit set to one andfalse
overwise.
-
set
io.reactivex.rxjava3.core.Single<Boolean> set(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
-
set
io.reactivex.rxjava3.core.Single<Boolean> set(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
-
cardinality
io.reactivex.rxjava3.core.Single<Long> cardinality()
Returns the number of bits set to one.- Returns:
- number of bits
-
clear
io.reactivex.rxjava3.core.Single<Boolean> clear(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
-
clear
io.reactivex.rxjava3.core.Completable clear()
Set all bits to zero- Returns:
- void
-
or
io.reactivex.rxjava3.core.Completable or(String... bitSetNames)
Executes OR operation over this object and specified bitsets. Stores result into this object.- Parameters:
bitSetNames
- - name of stored bitsets- Returns:
- void
-
and
io.reactivex.rxjava3.core.Completable and(String... bitSetNames)
Executes AND operation over this object and specified bitsets. Stores result into this object.- Parameters:
bitSetNames
- - name of stored bitsets- Returns:
- void
-
xor
io.reactivex.rxjava3.core.Completable xor(String... bitSetNames)
Executes XOR operation over this object and specified bitsets. Stores result into this object.- Parameters:
bitSetNames
- - name of stored bitsets- Returns:
- void
-
-