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 specifiedbitIndexRFuture<Void>clearAsync(long fromIndex, long toIndex)Set all bits to zero fromfromIndex(inclusive) totoIndex(exclusive)RFuture<Boolean>getAsync(long bitIndex)Returnstrueif bit set to one andfalseoverwise.RFuture<Byte>getByteAsync(long offset)Returns byte number at specifiedoffsetRFuture<Integer>getIntegerAsync(long offset)Returns integer number at specifiedoffsetRFuture<Long>getLongAsync(long offset)Returns long number at specifiedoffsetRFuture<Short>getShortAsync(long offset)Returns short number at specifiedoffsetRFuture<Long>getSignedAsync(int size, long offset)Returns signed number at specifiedoffsetandsizeRFuture<Long>getUnsignedAsync(int size, long offset)Returns unsigned number at specifiedoffsetandsizeRFuture<Byte>incrementAndGetByteAsync(long offset, byte increment)Increments current byte value on definedincrementvalue at specifiedoffsetand returns result.RFuture<Integer>incrementAndGetIntegerAsync(long offset, int increment)Increments current integer value on definedincrementvalue at specifiedoffsetand returns result.RFuture<Long>incrementAndGetLongAsync(long offset, long increment)Increments current long value on definedincrementvalue at specifiedoffsetand returns result.RFuture<Short>incrementAndGetShortAsync(long offset, short increment)Increments current short value on definedincrementvalue at specifiedoffsetand returns result.RFuture<Long>incrementAndGetSignedAsync(int size, long offset, long increment)Increments current signed value by definedincrementvalue andsizeat specifiedoffsetand returns result.RFuture<Long>incrementAndGetUnsignedAsync(int size, long offset, long increment)Increments current unsigned value by definedincrementvalue andsizeat specifiedoffsetand returns result.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 tovalueat specifiedbitIndexRFuture<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 tovaluefromfromIndex(inclusive) totoIndex(exclusive)RFuture<Void>setAsync(BitSet bs)Copy bits state of source BitSet object to this objectRFuture<Byte>setByteAsync(long offset, byte value)Returns previous value of byte number and replaces it with definedvalueat specifiedoffsetRFuture<Integer>setIntegerAsync(long offset, int value)Returns previous value of integer number and replaces it with definedvalueat specifiedoffsetRFuture<Long>setLongAsync(long offset, long value)Returns previous value of long number and replaces it with definedvalueat specifiedoffsetRFuture<Short>setShortAsync(long offset, short value)Returns previous value of short number and replaces it with definedvalueat specifiedoffsetRFuture<Long>setSignedAsync(int size, long offset, long value)Returns previous value of signed number and replaces it with definedvalueat specifiedoffsetRFuture<Long>setUnsignedAsync(int size, long offset, long value)Returns previous value of unsigned number and replaces it with definedvalueat specifiedoffsetRFuture<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, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsync
-
Methods inherited from interface org.redisson.api.RObjectAsync
addListenerAsync, copyAsync, deleteAsync, dumpAsync, getIdleTimeAsync, isExistsAsync, migrateAsync, moveAsync, removeListenerAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemoryAsync, touchAsync, unlinkAsync
-
-
-
-
Method Detail
-
getSignedAsync
RFuture<Long> getSignedAsync(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
-
setSignedAsync
RFuture<Long> setSignedAsync(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
-
incrementAndGetSignedAsync
RFuture<Long> incrementAndGetSignedAsync(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
-
getUnsignedAsync
RFuture<Long> getUnsignedAsync(int size, long offset)
Returns unsigned number at specifiedoffsetandsize- Parameters:
size- - size of unsigned number up to 63 bitsoffset- - offset of unsigned number- Returns:
- unsigned number
-
setUnsignedAsync
RFuture<Long> setUnsignedAsync(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 63 bitsoffset- - offset of unsigned numbervalue- - value of unsigned number- Returns:
- previous value of unsigned number
-
incrementAndGetUnsignedAsync
RFuture<Long> incrementAndGetUnsignedAsync(int size, long offset, long increment)
Increments current unsigned value by definedincrementvalue andsizeat specifiedoffsetand returns result.- Parameters:
size- - size of unsigned number up to 63 bitsoffset- - offset of unsigned numberincrement- - increment value- Returns:
- result value
-
getByteAsync
RFuture<Byte> getByteAsync(long offset)
Returns byte number at specifiedoffset- Parameters:
offset- - offset of number- Returns:
- number
-
setByteAsync
RFuture<Byte> setByteAsync(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
-
incrementAndGetByteAsync
RFuture<Byte> incrementAndGetByteAsync(long offset, byte increment)
Increments current byte value on definedincrementvalue at specifiedoffsetand returns result.- Parameters:
offset- - offset of numberincrement- - increment value- Returns:
- result value
-
getShortAsync
RFuture<Short> getShortAsync(long offset)
Returns short number at specifiedoffset- Parameters:
offset- - offset of number- Returns:
- number
-
setShortAsync
RFuture<Short> setShortAsync(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
-
incrementAndGetShortAsync
RFuture<Short> incrementAndGetShortAsync(long offset, short increment)
Increments current short value on definedincrementvalue at specifiedoffsetand returns result.- Parameters:
offset- - offset of numberincrement- - increment value- Returns:
- result value
-
getIntegerAsync
RFuture<Integer> getIntegerAsync(long offset)
Returns integer number at specifiedoffset- Parameters:
offset- - offset of number- Returns:
- number
-
setIntegerAsync
RFuture<Integer> setIntegerAsync(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
-
incrementAndGetIntegerAsync
RFuture<Integer> incrementAndGetIntegerAsync(long offset, int increment)
Increments current integer value on definedincrementvalue at specifiedoffsetand returns result.- Parameters:
offset- - offset of numberincrement- - increment value- Returns:
- result value
-
getLongAsync
RFuture<Long> getLongAsync(long offset)
Returns long number at specifiedoffset- Parameters:
offset- - offset of number- Returns:
- number
-
setLongAsync
RFuture<Long> setLongAsync(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
-
incrementAndGetLongAsync
RFuture<Long> incrementAndGetLongAsync(long offset, long increment)
Increments current long value on definedincrementvalue at specifiedoffsetand returns result.- Parameters:
offset- - offset of numberincrement- - increment value- Returns:
- result value
-
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 tovaluefromfromIndex(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)
Returnstrueif bit set to one andfalseoverwise.- Parameters:
bitIndex- - index of bit- Returns:
trueif bit set to one andfalseoverwise.
-
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 tovalueat 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
-
-