Package org.redisson.api
Interface RBitSetReactive
-
- All Superinterfaces:
RExpirableReactive,RObjectReactive
public interface RBitSetReactive extends RExpirableReactive
Reactive interface for BitSet object- Author:
- Nikita Koksharov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description reactor.core.publisher.Mono<Void>and(String... bitSetNames)Executes AND operation over this object and specified bitsets.reactor.core.publisher.Mono<Long>cardinality()Returns the number of bits set to one.reactor.core.publisher.Mono<Void>clear()Set all bits to zeroreactor.core.publisher.Mono<Boolean>clear(long bitIndex)Set bit to zero at specifiedbitIndexreactor.core.publisher.Mono<Void>clear(long fromIndex, long toIndex)Set all bits to zero fromfromIndex(inclusive) totoIndex(exclusive)reactor.core.publisher.Mono<Boolean>get(long bitIndex)Returnstrueif bit set to one andfalseoverwise.reactor.core.publisher.Mono<Byte>getByte(long offset)Returns byte number at specifiedoffsetreactor.core.publisher.Mono<Integer>getInteger(long offset)Returns integer number at specifiedoffsetreactor.core.publisher.Mono<Long>getLong(long offset)Returns long number at specifiedoffsetreactor.core.publisher.Mono<Short>getShort(long offset)Returns short number at specifiedoffsetreactor.core.publisher.Mono<Long>getSigned(int size, long offset)Returns signed number at specifiedoffsetandsizereactor.core.publisher.Mono<Long>getUnsigned(int size, long offset)Returns unsigned number at specifiedoffsetandsizereactor.core.publisher.Mono<Byte>incrementAndGetByte(long offset, byte increment)Increments current byte value on definedincrementvalue at specifiedoffsetand returns result.reactor.core.publisher.Mono<Integer>incrementAndGetInteger(long offset, int increment)Increments current integer value on definedincrementvalue at specifiedoffsetand returns result.reactor.core.publisher.Mono<Long>incrementAndGetLong(long offset, long increment)Increments current long value on definedincrementvalue at specifiedoffsetand returns result.reactor.core.publisher.Mono<Short>incrementAndGetShort(long offset, short increment)Increments current short value on definedincrementvalue at specifiedoffsetand returns result.reactor.core.publisher.Mono<Long>incrementAndGetSigned(int size, long offset, long increment)Increments current signed value by definedincrementvalue andsizeat specifiedoffsetand returns result.reactor.core.publisher.Mono<Long>incrementAndGetUnsigned(int size, long offset, long increment)Increments current unsigned value by definedincrementvalue andsizeat specifiedoffsetand returns result.reactor.core.publisher.Mono<Long>length()Returns "logical size" = index of highest set bit plus one.reactor.core.publisher.Mono<Void>not()Executes NOT operation over all bitsreactor.core.publisher.Mono<Void>or(String... bitSetNames)Executes OR operation over this object and specified bitsets.reactor.core.publisher.Mono<Boolean>set(long bitIndex)Set bit to one at specified bitIndexreactor.core.publisher.Mono<Boolean>set(long bitIndex, boolean value)Set bit tovalueat specifiedbitIndexreactor.core.publisher.Mono<Void>set(long fromIndex, long toIndex)Set all bits to one fromfromIndex(inclusive) totoIndex(exclusive)reactor.core.publisher.Mono<Void>set(long fromIndex, long toIndex, boolean value)Set all bits tovaluefromfromIndex(inclusive) totoIndex(exclusive)reactor.core.publisher.Mono<Void>set(BitSet bs)Copy bits state of source BitSet object to this objectreactor.core.publisher.Mono<Byte>setByte(long offset, byte value)Returns previous value of byte number and replaces it with definedvalueat specifiedoffsetreactor.core.publisher.Mono<Integer>setInteger(long offset, int value)Returns previous value of integer number and replaces it with definedvalueat specifiedoffsetreactor.core.publisher.Mono<Long>setLong(long offset, long value)Returns previous value of long number and replaces it with definedvalueat specifiedoffsetreactor.core.publisher.Mono<Short>setShort(long offset, short value)Returns previous value of short number and replaces it with definedvalueat specifiedoffsetreactor.core.publisher.Mono<Long>setSigned(int size, long offset, long value)Returns previous value of signed number and replaces it with definedvalueat specifiedoffsetreactor.core.publisher.Mono<Long>setUnsigned(int size, long offset, long value)Returns previous value of unsigned number and replaces it with definedvalueat specifiedoffsetreactor.core.publisher.Mono<Long>size()Returns number of set bits.reactor.core.publisher.Mono<byte[]>toByteArray()reactor.core.publisher.Mono<Void>xor(String... bitSetNames)Executes XOR operation over this object and specified bitsets.-
Methods inherited from interface org.redisson.api.RExpirableReactive
clearExpire, expire, expireAt, expireAt, expireAt, remainTimeToLive
-
Methods inherited from interface org.redisson.api.RObjectReactive
addListener, copy, delete, dump, getCodec, getIdleTime, getName, isExists, migrate, move, removeListener, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlink
-
-
-
-
Method Detail
-
getSigned
reactor.core.publisher.Mono<Long> getSigned(int size, long offset)
Returns signed number at specifiedoffsetandsize- Parameters:
size- - size of signed number up to 64 bitsoffset- - offset of signed number- Returns:
- signed number
-
setSigned
reactor.core.publisher.Mono<Long> setSigned(int size, long offset, long value)
Returns previous value of signed number and replaces it with definedvalueat 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
reactor.core.publisher.Mono<Long> incrementAndGetSigned(int size, long offset, long increment)
Increments current signed value by definedincrementvalue andsizeat specifiedoffsetand returns result.- Parameters:
size- - size of signed number up to 64 bitsoffset- - offset of signed numberincrement- - increment value- Returns:
- result value
-
getUnsigned
reactor.core.publisher.Mono<Long> getUnsigned(int size, long offset)
Returns unsigned number at specifiedoffsetandsize- Parameters:
size- - size of unsigned number up to 64 bitsoffset- - offset of unsigned number- Returns:
- unsigned number
-
setUnsigned
reactor.core.publisher.Mono<Long> setUnsigned(int size, long offset, long value)
Returns previous value of unsigned number and replaces it with definedvalueat 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
reactor.core.publisher.Mono<Long> incrementAndGetUnsigned(int size, long offset, long increment)
Increments current unsigned value by definedincrementvalue andsizeat specifiedoffsetand returns result.- Parameters:
size- - size of unsigned number up to 64 bitsoffset- - offset of unsigned numberincrement- - increment value- Returns:
- result value
-
getByte
reactor.core.publisher.Mono<Byte> getByte(long offset)
Returns byte number at specifiedoffset- Parameters:
offset- - offset of number- Returns:
- number
-
setByte
reactor.core.publisher.Mono<Byte> setByte(long offset, byte value)
Returns previous value of byte number and replaces it with definedvalueat specifiedoffset- Parameters:
offset- - offset of numbervalue- - value of number- Returns:
- previous value of number
-
incrementAndGetByte
reactor.core.publisher.Mono<Byte> incrementAndGetByte(long offset, byte increment)
Increments current byte value on definedincrementvalue at specifiedoffsetand returns result.- Parameters:
offset- - offset of numberincrement- - increment value- Returns:
- result value
-
getShort
reactor.core.publisher.Mono<Short> getShort(long offset)
Returns short number at specifiedoffset- Parameters:
offset- - offset of number- Returns:
- number
-
setShort
reactor.core.publisher.Mono<Short> setShort(long offset, short value)
Returns previous value of short number and replaces it with definedvalueat specifiedoffset- Parameters:
offset- - offset of numbervalue- - value of number- Returns:
- previous value of number
-
incrementAndGetShort
reactor.core.publisher.Mono<Short> incrementAndGetShort(long offset, short increment)
Increments current short value on definedincrementvalue at specifiedoffsetand returns result.- Parameters:
offset- - offset of numberincrement- - increment value- Returns:
- result value
-
getInteger
reactor.core.publisher.Mono<Integer> getInteger(long offset)
Returns integer number at specifiedoffset- Parameters:
offset- - offset of number- Returns:
- number
-
setInteger
reactor.core.publisher.Mono<Integer> setInteger(long offset, int value)
Returns previous value of integer number and replaces it with definedvalueat specifiedoffset- Parameters:
offset- - offset of numbervalue- - value of number- Returns:
- previous value of number
-
incrementAndGetInteger
reactor.core.publisher.Mono<Integer> incrementAndGetInteger(long offset, int increment)
Increments current integer value on definedincrementvalue at specifiedoffsetand returns result.- Parameters:
offset- - offset of numberincrement- - increment value- Returns:
- result value
-
getLong
reactor.core.publisher.Mono<Long> getLong(long offset)
Returns long number at specifiedoffset- Parameters:
offset- - offset of number- Returns:
- number
-
setLong
reactor.core.publisher.Mono<Long> setLong(long offset, long value)
Returns previous value of long number and replaces it with definedvalueat specifiedoffset- Parameters:
offset- - offset of numbervalue- - value of number- Returns:
- previous value of number
-
incrementAndGetLong
reactor.core.publisher.Mono<Long> incrementAndGetLong(long offset, long increment)
Increments current long value on definedincrementvalue at specifiedoffsetand returns result.- Parameters:
offset- - offset of numberincrement- - increment value- Returns:
- result value
-
toByteArray
reactor.core.publisher.Mono<byte[]> toByteArray()
-
length
reactor.core.publisher.Mono<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
reactor.core.publisher.Mono<Void> set(long fromIndex, long toIndex, boolean value)
Set all bits tovaluefromfromIndex(inclusive) totoIndex(exclusive)- Parameters:
fromIndex- inclusivetoIndex- exclusivevalue- true = 1, false = 0- Returns:
- void
-
clear
reactor.core.publisher.Mono<Void> clear(long fromIndex, long toIndex)
Set all bits to zero fromfromIndex(inclusive) totoIndex(exclusive)- Parameters:
fromIndex- inclusivetoIndex- exclusive- Returns:
- void
-
set
reactor.core.publisher.Mono<Void> set(BitSet bs)
Copy bits state of source BitSet object to this object- Parameters:
bs- - BitSet source- Returns:
- void
-
not
reactor.core.publisher.Mono<Void> not()
Executes NOT operation over all bits- Returns:
- void
-
set
reactor.core.publisher.Mono<Void> set(long fromIndex, long toIndex)
Set all bits to one fromfromIndex(inclusive) totoIndex(exclusive)- Parameters:
fromIndex- inclusivetoIndex- exclusive- Returns:
- void
-
size
reactor.core.publisher.Mono<Long> size()
Returns number of set bits.- Returns:
- number of set bits.
-
get
reactor.core.publisher.Mono<Boolean> get(long bitIndex)
Returnstrueif bit set to one andfalseoverwise.- Parameters:
bitIndex- - index of bit- Returns:
trueif bit set to one andfalseoverwise.
-
set
reactor.core.publisher.Mono<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
reactor.core.publisher.Mono<Boolean> set(long bitIndex, boolean value)
Set bit tovalueat specifiedbitIndex- Parameters:
bitIndex- - index of bitvalue- true = 1, false = 0- Returns:
true- if previous value was true,false- if previous value was false
-
cardinality
reactor.core.publisher.Mono<Long> cardinality()
Returns the number of bits set to one.- Returns:
- number of bits
-
clear
reactor.core.publisher.Mono<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
reactor.core.publisher.Mono<Void> clear()
Set all bits to zero- Returns:
- void
-
or
reactor.core.publisher.Mono<Void> 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
reactor.core.publisher.Mono<Void> 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
-
-