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 RFuture<Void>
andAsync(String... bitSetNames)
Executes AND operation over this object and specified bitsets.RFuture<Long>
cardinalityAsync()
Returns the number of bits set to one.RFuture<Void>
clearAsync()
Set all bits to zeroRFuture<Boolean>
clearAsync(long bitIndex)
Set bit to zero at specifiedbitIndex
RFuture<Void>
clearAsync(long fromIndex, long toIndex)
Set all bits to zero fromfromIndex
(inclusive) totoIndex
(exclusive)RFuture<Boolean>
getAsync(long bitIndex)
Returnstrue
if bit set to one andfalse
overwise.RFuture<Long>
lengthAsync()
Returns "logical size" = index of highest set bit plus one.RFuture<Void>
notAsync()
Executes NOT operation over all bitsRFuture<Void>
orAsync(String... bitSetNames)
Executes OR operation over this object and specified bitsets.RFuture<Boolean>
setAsync(long bitIndex)
Set bit to one at specified bitIndexRFuture<Boolean>
setAsync(long bitIndex, boolean value)
Set bit tovalue
at specifiedbitIndex
RFuture<Void>
setAsync(long fromIndex, long toIndex)
Set all bits to one fromfromIndex
(inclusive) totoIndex
(exclusive)RFuture<Void>
setAsync(long fromIndex, long toIndex, boolean value)
Set all bits tovalue
fromfromIndex
(inclusive) totoIndex
(exclusive)RFuture<Void>
setAsync(BitSet bs)
Copy bits state of source BitSet object to this objectRFuture<Long>
sizeAsync()
Returns number of set bits.RFuture<byte[]>
toByteArrayAsync()
RFuture<Void>
xorAsync(String... bitSetNames)
Executes XOR operation over this object and specified bitsets.-
Methods inherited from interface org.redisson.api.RExpirableAsync
clearExpireAsync, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsync
-
Methods inherited from interface org.redisson.api.RObjectAsync
copyAsync, deleteAsync, dumpAsync, isExistsAsync, migrateAsync, moveAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, touchAsync, unlinkAsync
-
-
-
-
Method Detail
-
toByteArrayAsync
RFuture<byte[]> toByteArrayAsync()
-
lengthAsync
RFuture<Long> 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
RFuture<Void> 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
RFuture<Void> clearAsync(long fromIndex, long toIndex)
Set all bits to zero fromfromIndex
(inclusive) totoIndex
(exclusive)- Parameters:
fromIndex
- inclusivetoIndex
- exclusive- Returns:
- void
-
setAsync
RFuture<Void> setAsync(BitSet bs)
Copy bits state of source BitSet object to this object- Parameters:
bs
- - BitSet source- Returns:
- void
-
setAsync
RFuture<Void> setAsync(long fromIndex, long toIndex)
Set all bits to one fromfromIndex
(inclusive) totoIndex
(exclusive)- Parameters:
fromIndex
- inclusivetoIndex
- exclusive- Returns:
- void
-
getAsync
RFuture<Boolean> 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
RFuture<Boolean> 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
RFuture<Boolean> 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
RFuture<Long> cardinalityAsync()
Returns the number of bits set to one.- Returns:
- number of bits
-
clearAsync
RFuture<Boolean> 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
-
orAsync
RFuture<Void> orAsync(String... bitSetNames)
Executes OR operation over this object and specified bitsets. Stores result into this object.- Parameters:
bitSetNames
- - name of stored bitsets- Returns:
- void
-
andAsync
RFuture<Void> andAsync(String... bitSetNames)
Executes AND operation over this object and specified bitsets. Stores result into this object.- Parameters:
bitSetNames
- - name of stored bitsets- Returns:
- void
-
-