Package org.redisson.api
Interface RBitSetReactive
-
- All Superinterfaces:
RExpirableReactive
,RObjectReactive
public interface RBitSetReactive extends RExpirableReactive
Vector of bits that grows as needed.- Author:
- Nikita Koksharov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.reactivestreams.Publisher<Void>
and(String... bitSetNames)
Executes AND operation over this object and specified bitsets.org.reactivestreams.Publisher<Long>
cardinality()
Returns the number of bits set to one.org.reactivestreams.Publisher<Void>
clear()
Set all bits to zeroorg.reactivestreams.Publisher<Boolean>
clear(long bitIndex)
Set bit to zero at specifiedbitIndex
org.reactivestreams.Publisher<Void>
clear(long fromIndex, long toIndex)
Set all bits to zero fromfromIndex
(inclusive) totoIndex
(exclusive)org.reactivestreams.Publisher<Boolean>
get(long bitIndex)
Returnstrue
if bit set to one andfalse
overwise.org.reactivestreams.Publisher<Long>
length()
Returns "logical size" = index of highest set bit plus one.org.reactivestreams.Publisher<Void>
not()
Executes NOT operation over all bitsorg.reactivestreams.Publisher<Void>
or(String... bitSetNames)
Executes OR operation over this object and specified bitsets.org.reactivestreams.Publisher<Boolean>
set(long bitIndex)
Set bit to one at specified bitIndexorg.reactivestreams.Publisher<Boolean>
set(long bitIndex, boolean value)
Set bit tovalue
at specifiedbitIndex
org.reactivestreams.Publisher<Void>
set(long fromIndex, long toIndex)
Set all bits to one fromfromIndex
(inclusive) totoIndex
(exclusive)org.reactivestreams.Publisher<Void>
set(long fromIndex, long toIndex, boolean value)
Set all bits tovalue
fromfromIndex
(inclusive) totoIndex
(exclusive)org.reactivestreams.Publisher<Void>
set(BitSet bs)
Copy bits state of source BitSet object to this objectorg.reactivestreams.Publisher<Long>
size()
Returns number of set bits.org.reactivestreams.Publisher<byte[]>
toByteArray()
org.reactivestreams.Publisher<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, remainTimeToLive
-
-
-
-
Method Detail
-
toByteArray
org.reactivestreams.Publisher<byte[]> toByteArray()
-
length
org.reactivestreams.Publisher<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
org.reactivestreams.Publisher<Void> 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
org.reactivestreams.Publisher<Void> clear(long fromIndex, long toIndex)
Set all bits to zero fromfromIndex
(inclusive) totoIndex
(exclusive)- Parameters:
fromIndex
- inclusivetoIndex
- exclusive- Returns:
- void
-
set
org.reactivestreams.Publisher<Void> set(BitSet bs)
Copy bits state of source BitSet object to this object- Parameters:
bs
- - BitSet source- Returns:
- void
-
not
org.reactivestreams.Publisher<Void> not()
Executes NOT operation over all bits- Returns:
- void
-
set
org.reactivestreams.Publisher<Void> set(long fromIndex, long toIndex)
Set all bits to one fromfromIndex
(inclusive) totoIndex
(exclusive)- Parameters:
fromIndex
- inclusivetoIndex
- exclusive- Returns:
- void
-
size
org.reactivestreams.Publisher<Long> size()
Returns number of set bits.- Returns:
- number of set bits.
-
get
org.reactivestreams.Publisher<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
org.reactivestreams.Publisher<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
org.reactivestreams.Publisher<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
org.reactivestreams.Publisher<Long> cardinality()
Returns the number of bits set to one.- Returns:
- number of bits
-
clear
org.reactivestreams.Publisher<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
org.reactivestreams.Publisher<Void> clear()
Set all bits to zero- Returns:
- void
-
or
org.reactivestreams.Publisher<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
org.reactivestreams.Publisher<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
-
-