Package org.redisson
Class RedissonBitSet
- java.lang.Object
-
- org.redisson.RedissonObject
-
- org.redisson.RedissonBitSet
-
- All Implemented Interfaces:
RBitSet,RBitSetAsync,RExpirable,RExpirableAsync,RObject,RObjectAsync
public class RedissonBitSet extends RedissonObject implements RBitSet
- Author:
- Nikita Koksharov
-
-
Field Summary
-
Fields inherited from class org.redisson.RedissonObject
codec, commandExecutor, name
-
-
Constructor Summary
Constructors Constructor Description RedissonBitSet(CommandAsyncExecutor connectionManager, String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidand(String... bitSetNames)Executes AND operation over this object and specified bitsets.RFuture<Void>andAsync(String... bitSetNames)Executes AND operation over this object and specified bitsets.BitSetasBitSet()longcardinality()Returns the number of bits set to one.RFuture<Long>cardinalityAsync()Returns the number of bits set to one.voidclear()Set all bits to zerobooleanclear(long bitIndex)Set bit to zero at specifiedbitIndexvoidclear(long fromIndex, long toIndex)Set all bits to zero fromfromIndex(inclusive) totoIndex(exclusive)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)booleanclearExpire()Clear an expire timeout or expire date for object.RFuture<Boolean>clearExpireAsync()Clear an expire timeout or expire date for object in async mode.protected RFuture<Boolean>clearExpireAsync(String... keys)booleanexpire(long timeToLive, TimeUnit timeUnit)Set a timeout for object.booleanexpire(Instant instant)Set an expire date for object.RFuture<Boolean>expireAsync(long timeToLive, TimeUnit timeUnit)Set a timeout for object in async mode.protected RFuture<Boolean>expireAsync(long timeToLive, TimeUnit timeUnit, String... keys)RFuture<Boolean>expireAsync(Instant instant)Set an expire date for object.booleanexpireAt(long timestamp)UseRExpirable.expire(Instant)insteadbooleanexpireAt(Date timestamp)UseRExpirable.expire(Instant)insteadRFuture<Boolean>expireAtAsync(long timestamp)UseRExpirableAsync.expireAsync(Instant)insteadprotected RFuture<Boolean>expireAtAsync(long timestamp, String... keys)RFuture<Boolean>expireAtAsync(Date timestamp)UseRExpirableAsync.expireAsync(Instant)insteadbooleanget(long bitIndex)Returnstrueif bit set to one andfalseoverwise.RFuture<Boolean>getAsync(long bitIndex)Returnstrueif bit set to one andfalseoverwise.bytegetByte(long offset)Returns byte number at specifiedoffsetRFuture<Byte>getByteAsync(long offset)Returns byte number at specifiedoffsetintgetInteger(long offset)Returns integer number at specifiedoffsetRFuture<Integer>getIntegerAsync(long offset)Returns integer number at specifiedoffsetlonggetLong(long offset)Returns long number at specifiedoffsetRFuture<Long>getLongAsync(long offset)Returns long number at specifiedoffsetshortgetShort(long offset)Returns short number at specifiedoffsetRFuture<Short>getShortAsync(long offset)Returns short number at specifiedoffsetlonggetSigned(int size, long offset)Returns signed number at specifiedoffsetandsizeRFuture<Long>getSignedAsync(int size, long offset)Returns signed number at specifiedoffsetandsizelonggetUnsigned(int size, long offset)Returns unsigned number at specifiedoffsetandsizeRFuture<Long>getUnsignedAsync(int size, long offset)Returns unsigned number at specifiedoffsetandsizebyteincrementAndGetByte(long offset, byte increment)Increments current byte value on definedincrementvalue at specifiedoffsetand returns result.RFuture<Byte>incrementAndGetByteAsync(long offset, byte increment)Increments current byte value on definedincrementvalue at specifiedoffsetand returns result.intincrementAndGetInteger(long offset, int increment)Increments current integer value on definedincrementvalue at specifiedoffsetand returns result.RFuture<Integer>incrementAndGetIntegerAsync(long offset, int increment)Increments current integer value on definedincrementvalue at specifiedoffsetand returns result.longincrementAndGetLong(long offset, long increment)Increments current long value on definedincrementvalue at specifiedoffsetand returns result.RFuture<Long>incrementAndGetLongAsync(long offset, long increment)Increments current long value on definedincrementvalue at specifiedoffsetand returns result.shortincrementAndGetShort(long offset, short increment)Increments current short value on definedincrementvalue at specifiedoffsetand returns result.RFuture<Short>incrementAndGetShortAsync(long offset, short increment)Increments current short value on definedincrementvalue at specifiedoffsetand returns result.longincrementAndGetSigned(int size, long offset, long increment)Increments current signed value by definedincrementvalue andsizeat specifiedoffsetand returns result.RFuture<Long>incrementAndGetSignedAsync(int size, long offset, long increment)Increments current signed value by definedincrementvalue andsizeat specifiedoffsetand returns result.longincrementAndGetUnsigned(int size, long offset, long increment)Increments current unsigned 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.longlength()Returns "logical size" = index of highest set bit plus one.RFuture<Long>lengthAsync()Returns "logical size" = index of highest set bit plus one.voidnot()Executes NOT operation over all bitsRFuture<Void>notAsync()Executes NOT operation over all bitsvoidor(String... bitSetNames)Executes OR operation over this object and specified bitsets.RFuture<Void>orAsync(String... bitSetNames)Executes OR operation over this object and specified bitsets.longremainTimeToLive()Remaining time to live of Redisson object that has a timeoutRFuture<Long>remainTimeToLiveAsync()Remaining time to live of Redisson object that has a timeoutbooleanset(long bitIndex)Set bit to one at specified bitIndexbooleanset(long bitIndex, boolean value)Set bit tovalueat specifiedbitIndexvoidset(long fromIndex, long toIndex)Set all bits to one fromfromIndex(inclusive) totoIndex(exclusive)voidset(long fromIndex, long toIndex, boolean value)Set all bits tovaluefromfromIndex(inclusive) totoIndex(exclusive)voidset(BitSet bs)Copy bits state of source BitSet object to this objectRFuture<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 objectbytesetByte(long offset, byte value)Returns previous value of byte number and replaces it with definedvalueat specifiedoffsetRFuture<Byte>setByteAsync(long offset, byte value)Returns previous value of byte number and replaces it with definedvalueat specifiedoffsetintsetInteger(long offset, int value)Returns previous value of integer number and replaces it with definedvalueat specifiedoffsetRFuture<Integer>setIntegerAsync(long offset, int value)Returns previous value of integer number and replaces it with definedvalueat specifiedoffsetlongsetLong(long offset, long value)Returns previous value of long number and replaces it with definedvalueat specifiedoffsetRFuture<Long>setLongAsync(long offset, long value)Returns previous value of long number and replaces it with definedvalueat specifiedoffsetshortsetShort(long offset, short value)Returns previous value of short number and replaces it with definedvalueat specifiedoffsetRFuture<Short>setShortAsync(long offset, short value)Returns previous value of short number and replaces it with definedvalueat specifiedoffsetlongsetSigned(int size, long offset, long value)Returns previous value of signed 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 specifiedoffsetlongsetUnsigned(int size, long offset, long value)Returns previous value of unsigned 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 specifiedoffsetlongsize()Returns number of set bits.RFuture<Long>sizeAsync()Returns number of set bits.byte[]toByteArray()RFuture<byte[]>toByteArrayAsync()protected inttoInt(boolean value)StringtoString()voidxor(String... bitSetNames)Executes XOR operation over this object and specified bitsets.RFuture<Void>xorAsync(String... bitSetNames)Executes XOR operation over this object and specified bitsets.-
Methods inherited from class org.redisson.RedissonObject
addListener, addListener, addListenerAsync, addListenerAsync, copy, copyAsync, delete, deleteAsync, deleteAsync, dump, dumpAsync, encode, encode, encode, encode, encodeMapKey, encodeMapKeys, encodeMapValue, encodeMapValues, get, getCodec, getIdleTime, getIdleTimeAsync, getLockByMapKey, getLockByValue, getName, getRawName, getRawName, isExists, isExistsAsync, migrate, migrateAsync, move, moveAsync, prefixName, removeListener, removeListenerAsync, removeListenersAsync, rename, renameAsync, renamenx, renamenxAsync, restore, restore, restoreAndReplace, restoreAndReplace, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, setName, sizeInMemory, sizeInMemoryAsync, sizeInMemoryAsync, sizeInMemoryAsync, suffixName, toSeconds, toStream, touch, touchAsync, unlink, unlinkAsync
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.redisson.api.RExpirable
clearExpire, expire, expire, expireAt, expireAt, remainTimeToLive
-
Methods inherited from interface org.redisson.api.RExpirableAsync
clearExpireAsync, expireAsync, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsync
-
Methods inherited from interface org.redisson.api.RObject
addListener, copy, delete, dump, getCodec, getIdleTime, getName, isExists, migrate, move, removeListener, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlink
-
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
-
-
-
-
Constructor Detail
-
RedissonBitSet
public RedissonBitSet(CommandAsyncExecutor connectionManager, String name)
-
-
Method Detail
-
getSigned
public long getSigned(int size, long offset)Description copied from interface:RBitSetReturns signed number at specifiedoffsetandsize
-
setSigned
public long setSigned(int size, long offset, long value)Description copied from interface:RBitSetReturns previous value of signed number and replaces it with definedvalueat specifiedoffset
-
incrementAndGetSigned
public long incrementAndGetSigned(int size, long offset, long increment)Description copied from interface:RBitSetIncrements current signed value by definedincrementvalue andsizeat specifiedoffsetand returns result.- Specified by:
incrementAndGetSignedin interfaceRBitSet- Parameters:
size- - size of signed number up to 64 bitsoffset- - offset of signed numberincrement- - increment value- Returns:
- result value
-
getUnsigned
public long getUnsigned(int size, long offset)Description copied from interface:RBitSetReturns unsigned number at specifiedoffsetandsize- Specified by:
getUnsignedin interfaceRBitSet- Parameters:
size- - size of unsigned number up to 64 bitsoffset- - offset of unsigned number- Returns:
- unsigned number
-
setUnsigned
public long setUnsigned(int size, long offset, long value)Description copied from interface:RBitSetReturns previous value of unsigned number and replaces it with definedvalueat specifiedoffset- Specified by:
setUnsignedin interfaceRBitSet- 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
public long incrementAndGetUnsigned(int size, long offset, long increment)Description copied from interface:RBitSetIncrements current unsigned value by definedincrementvalue andsizeat specifiedoffsetand returns result.- Specified by:
incrementAndGetUnsignedin interfaceRBitSet- Parameters:
size- - size of unsigned number up to 64 bitsoffset- - offset of unsigned numberincrement- - increment value- Returns:
- result value
-
getSignedAsync
public RFuture<Long> getSignedAsync(int size, long offset)
Description copied from interface:RBitSetAsyncReturns signed number at specifiedoffsetandsize- Specified by:
getSignedAsyncin interfaceRBitSetAsync- Parameters:
size- - size of signed number up to 64 bitsoffset- - offset of signed number- Returns:
- signed number
-
setSignedAsync
public RFuture<Long> setSignedAsync(int size, long offset, long value)
Description copied from interface:RBitSetAsyncReturns previous value of signed number and replaces it with definedvalueat specifiedoffset- Specified by:
setSignedAsyncin interfaceRBitSetAsync- 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
public RFuture<Long> incrementAndGetSignedAsync(int size, long offset, long increment)
Description copied from interface:RBitSetAsyncIncrements current signed value by definedincrementvalue andsizeat specifiedoffsetand returns result.- Specified by:
incrementAndGetSignedAsyncin interfaceRBitSetAsync- Parameters:
size- - size of signed number up to 64 bitsoffset- - offset of signed numberincrement- - increment value- Returns:
- result value
-
getUnsignedAsync
public RFuture<Long> getUnsignedAsync(int size, long offset)
Description copied from interface:RBitSetAsyncReturns unsigned number at specifiedoffsetandsize- Specified by:
getUnsignedAsyncin interfaceRBitSetAsync- Parameters:
size- - size of unsigned number up to 63 bitsoffset- - offset of unsigned number- Returns:
- unsigned number
-
setUnsignedAsync
public RFuture<Long> setUnsignedAsync(int size, long offset, long value)
Description copied from interface:RBitSetAsyncReturns previous value of unsigned number and replaces it with definedvalueat specifiedoffset- Specified by:
setUnsignedAsyncin interfaceRBitSetAsync- 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
public RFuture<Long> incrementAndGetUnsignedAsync(int size, long offset, long increment)
Description copied from interface:RBitSetAsyncIncrements current unsigned value by definedincrementvalue andsizeat specifiedoffsetand returns result.- Specified by:
incrementAndGetUnsignedAsyncin interfaceRBitSetAsync- Parameters:
size- - size of unsigned number up to 63 bitsoffset- - offset of unsigned numberincrement- - increment value- Returns:
- result value
-
getByte
public byte getByte(long offset)
Description copied from interface:RBitSetReturns byte number at specifiedoffset
-
setByte
public byte setByte(long offset, byte value)Description copied from interface:RBitSetReturns previous value of byte number and replaces it with definedvalueat specifiedoffset
-
incrementAndGetByte
public byte incrementAndGetByte(long offset, byte increment)Description copied from interface:RBitSetIncrements current byte value on definedincrementvalue at specifiedoffsetand returns result.- Specified by:
incrementAndGetBytein interfaceRBitSet- Parameters:
offset- - offset of numberincrement- - increment value- Returns:
- result value
-
getShort
public short getShort(long offset)
Description copied from interface:RBitSetReturns short number at specifiedoffset
-
setShort
public short setShort(long offset, short value)Description copied from interface:RBitSetReturns previous value of short number and replaces it with definedvalueat specifiedoffset
-
incrementAndGetShort
public short incrementAndGetShort(long offset, short increment)Description copied from interface:RBitSetIncrements current short value on definedincrementvalue at specifiedoffsetand returns result.- Specified by:
incrementAndGetShortin interfaceRBitSet- Parameters:
offset- - offset of numberincrement- - increment value- Returns:
- result value
-
getInteger
public int getInteger(long offset)
Description copied from interface:RBitSetReturns integer number at specifiedoffset- Specified by:
getIntegerin interfaceRBitSet- Parameters:
offset- - offset of number- Returns:
- number
-
setInteger
public int setInteger(long offset, int value)Description copied from interface:RBitSetReturns previous value of integer number and replaces it with definedvalueat specifiedoffset- Specified by:
setIntegerin interfaceRBitSet- Parameters:
offset- - offset of numbervalue- - value of number- Returns:
- previous value of number
-
incrementAndGetInteger
public int incrementAndGetInteger(long offset, int increment)Description copied from interface:RBitSetIncrements current integer value on definedincrementvalue at specifiedoffsetand returns result.- Specified by:
incrementAndGetIntegerin interfaceRBitSet- Parameters:
offset- - offset of numberincrement- - increment value- Returns:
- result value
-
getLong
public long getLong(long offset)
Description copied from interface:RBitSetReturns long number at specifiedoffset
-
setLong
public long setLong(long offset, long value)Description copied from interface:RBitSetReturns previous value of long number and replaces it with definedvalueat specifiedoffset
-
incrementAndGetLong
public long incrementAndGetLong(long offset, long increment)Description copied from interface:RBitSetIncrements current long value on definedincrementvalue at specifiedoffsetand returns result.- Specified by:
incrementAndGetLongin interfaceRBitSet- Parameters:
offset- - offset of numberincrement- - increment value- Returns:
- result value
-
getByteAsync
public RFuture<Byte> getByteAsync(long offset)
Description copied from interface:RBitSetAsyncReturns byte number at specifiedoffset- Specified by:
getByteAsyncin interfaceRBitSetAsync- Parameters:
offset- - offset of number- Returns:
- number
-
setByteAsync
public RFuture<Byte> setByteAsync(long offset, byte value)
Description copied from interface:RBitSetAsyncReturns previous value of byte number and replaces it with definedvalueat specifiedoffset- Specified by:
setByteAsyncin interfaceRBitSetAsync- Parameters:
offset- - offset of numbervalue- - value of number- Returns:
- previous value of number
-
incrementAndGetByteAsync
public RFuture<Byte> incrementAndGetByteAsync(long offset, byte increment)
Description copied from interface:RBitSetAsyncIncrements current byte value on definedincrementvalue at specifiedoffsetand returns result.- Specified by:
incrementAndGetByteAsyncin interfaceRBitSetAsync- Parameters:
offset- - offset of numberincrement- - increment value- Returns:
- result value
-
getShortAsync
public RFuture<Short> getShortAsync(long offset)
Description copied from interface:RBitSetAsyncReturns short number at specifiedoffset- Specified by:
getShortAsyncin interfaceRBitSetAsync- Parameters:
offset- - offset of number- Returns:
- number
-
setShortAsync
public RFuture<Short> setShortAsync(long offset, short value)
Description copied from interface:RBitSetAsyncReturns previous value of short number and replaces it with definedvalueat specifiedoffset- Specified by:
setShortAsyncin interfaceRBitSetAsync- Parameters:
offset- - offset of numbervalue- - value of number- Returns:
- previous value of number
-
incrementAndGetShortAsync
public RFuture<Short> incrementAndGetShortAsync(long offset, short increment)
Description copied from interface:RBitSetAsyncIncrements current short value on definedincrementvalue at specifiedoffsetand returns result.- Specified by:
incrementAndGetShortAsyncin interfaceRBitSetAsync- Parameters:
offset- - offset of numberincrement- - increment value- Returns:
- result value
-
getIntegerAsync
public RFuture<Integer> getIntegerAsync(long offset)
Description copied from interface:RBitSetAsyncReturns integer number at specifiedoffset- Specified by:
getIntegerAsyncin interfaceRBitSetAsync- Parameters:
offset- - offset of number- Returns:
- number
-
setIntegerAsync
public RFuture<Integer> setIntegerAsync(long offset, int value)
Description copied from interface:RBitSetAsyncReturns previous value of integer number and replaces it with definedvalueat specifiedoffset- Specified by:
setIntegerAsyncin interfaceRBitSetAsync- Parameters:
offset- - offset of numbervalue- - value of number- Returns:
- previous value of number
-
incrementAndGetIntegerAsync
public RFuture<Integer> incrementAndGetIntegerAsync(long offset, int increment)
Description copied from interface:RBitSetAsyncIncrements current integer value on definedincrementvalue at specifiedoffsetand returns result.- Specified by:
incrementAndGetIntegerAsyncin interfaceRBitSetAsync- Parameters:
offset- - offset of numberincrement- - increment value- Returns:
- result value
-
getLongAsync
public RFuture<Long> getLongAsync(long offset)
Description copied from interface:RBitSetAsyncReturns long number at specifiedoffset- Specified by:
getLongAsyncin interfaceRBitSetAsync- Parameters:
offset- - offset of number- Returns:
- number
-
setLongAsync
public RFuture<Long> setLongAsync(long offset, long value)
Description copied from interface:RBitSetAsyncReturns previous value of long number and replaces it with definedvalueat specifiedoffset- Specified by:
setLongAsyncin interfaceRBitSetAsync- Parameters:
offset- - offset of numbervalue- - value of number- Returns:
- previous value of number
-
incrementAndGetLongAsync
public RFuture<Long> incrementAndGetLongAsync(long offset, long increment)
Description copied from interface:RBitSetAsyncIncrements current long value on definedincrementvalue at specifiedoffsetand returns result.- Specified by:
incrementAndGetLongAsyncin interfaceRBitSetAsync- Parameters:
offset- - offset of numberincrement- - increment value- Returns:
- result value
-
length
public long length()
Description copied from interface:RBitSetReturns "logical size" = index of highest set bit plus one. Returns zero if there are no any set bit.
-
set
public void set(BitSet bs)
Description copied from interface:RBitSetCopy bits state of source BitSet object to this object
-
get
public boolean get(long bitIndex)
Description copied from interface:RBitSetReturnstrueif bit set to one andfalseoverwise.
-
getAsync
public RFuture<Boolean> getAsync(long bitIndex)
Description copied from interface:RBitSetAsyncReturnstrueif bit set to one andfalseoverwise.- Specified by:
getAsyncin interfaceRBitSetAsync- Parameters:
bitIndex- - index of bit- Returns:
trueif bit set to one andfalseoverwise.
-
set
public boolean set(long bitIndex)
Description copied from interface:RBitSetSet bit to one at specified bitIndex
-
set
public void set(long fromIndex, long toIndex, boolean value)Description copied from interface:RBitSetSet all bits tovaluefromfromIndex(inclusive) totoIndex(exclusive)
-
set
public void set(long fromIndex, long toIndex)Description copied from interface:RBitSetSet all bits to one fromfromIndex(inclusive) totoIndex(exclusive)
-
set
public boolean set(long bitIndex, boolean value)Description copied from interface:RBitSetSet bit tovalueat specifiedbitIndex
-
setAsync
public RFuture<Boolean> setAsync(long bitIndex, boolean value)
Description copied from interface:RBitSetAsyncSet bit tovalueat specifiedbitIndex- Specified by:
setAsyncin interfaceRBitSetAsync- Parameters:
bitIndex- - index of bitvalue- true = 1, false = 0- Returns:
true- if previous value was true,false- if previous value was false
-
toInt
protected int toInt(boolean value)
-
toByteArray
public byte[] toByteArray()
- Specified by:
toByteArrayin interfaceRBitSet
-
toByteArrayAsync
public RFuture<byte[]> toByteArrayAsync()
- Specified by:
toByteArrayAsyncin interfaceRBitSetAsync
-
cardinality
public long cardinality()
Description copied from interface:RBitSetReturns the number of bits set to one.- Specified by:
cardinalityin interfaceRBitSet- Returns:
- number of bits
-
size
public long size()
Description copied from interface:RBitSetReturns number of set bits.
-
clear
public void clear(long fromIndex, long toIndex)Description copied from interface:RBitSetSet all bits to zero fromfromIndex(inclusive) totoIndex(exclusive)
-
clear
public boolean clear(long bitIndex)
Description copied from interface:RBitSetSet bit to zero at specifiedbitIndex
-
clear
public void clear()
Description copied from interface:RBitSetSet all bits to zero
-
or
public void or(String... bitSetNames)
Description copied from interface:RBitSetExecutes OR operation over this object and specified bitsets. Stores result into this object.
-
and
public void and(String... bitSetNames)
Description copied from interface:RBitSetExecutes AND operation over this object and specified bitsets. Stores result into this object.
-
xor
public void xor(String... bitSetNames)
Description copied from interface:RBitSetExecutes XOR operation over this object and specified bitsets. Stores result into this object.
-
not
public void not()
Description copied from interface:RBitSetExecutes NOT operation over all bits
-
lengthAsync
public RFuture<Long> lengthAsync()
Description copied from interface:RBitSetAsyncReturns "logical size" = index of highest set bit plus one. Returns zero if there are no any set bit.- Specified by:
lengthAsyncin interfaceRBitSetAsync- Returns:
- "logical size" = index of highest set bit plus one
-
setAsync
public RFuture<Void> setAsync(long fromIndex, long toIndex, boolean value)
Description copied from interface:RBitSetAsyncSet all bits tovaluefromfromIndex(inclusive) totoIndex(exclusive)- Specified by:
setAsyncin interfaceRBitSetAsync- Parameters:
fromIndex- inclusivetoIndex- exclusivevalue- true = 1, false = 0- Returns:
- void
-
clearAsync
public RFuture<Void> clearAsync(long fromIndex, long toIndex)
Description copied from interface:RBitSetAsyncSet all bits to zero fromfromIndex(inclusive) totoIndex(exclusive)- Specified by:
clearAsyncin interfaceRBitSetAsync- Parameters:
fromIndex- inclusivetoIndex- exclusive- Returns:
- void
-
setAsync
public RFuture<Void> setAsync(BitSet bs)
Description copied from interface:RBitSetAsyncCopy bits state of source BitSet object to this object- Specified by:
setAsyncin interfaceRBitSetAsync- Parameters:
bs- - BitSet source- Returns:
- void
-
notAsync
public RFuture<Void> notAsync()
Description copied from interface:RBitSetAsyncExecutes NOT operation over all bits- Specified by:
notAsyncin interfaceRBitSetAsync- Returns:
- void
-
setAsync
public RFuture<Void> setAsync(long fromIndex, long toIndex)
Description copied from interface:RBitSetAsyncSet all bits to one fromfromIndex(inclusive) totoIndex(exclusive)- Specified by:
setAsyncin interfaceRBitSetAsync- Parameters:
fromIndex- inclusivetoIndex- exclusive- Returns:
- void
-
sizeAsync
public RFuture<Long> sizeAsync()
Description copied from interface:RBitSetAsyncReturns number of set bits.- Specified by:
sizeAsyncin interfaceRBitSetAsync- Returns:
- number of set bits.
-
setAsync
public RFuture<Boolean> setAsync(long bitIndex)
Description copied from interface:RBitSetAsyncSet bit to one at specified bitIndex- Specified by:
setAsyncin interfaceRBitSetAsync- Parameters:
bitIndex- - index of bit- Returns:
true- if previous value was true,false- if previous value was false
-
cardinalityAsync
public RFuture<Long> cardinalityAsync()
Description copied from interface:RBitSetAsyncReturns the number of bits set to one.- Specified by:
cardinalityAsyncin interfaceRBitSetAsync- Returns:
- number of bits
-
clearAsync
public RFuture<Boolean> clearAsync(long bitIndex)
Description copied from interface:RBitSetAsyncSet bit to zero at specifiedbitIndex- Specified by:
clearAsyncin interfaceRBitSetAsync- Parameters:
bitIndex- - index of bit- Returns:
true- if previous value was true,false- if previous value was false
-
clearAsync
public RFuture<Void> clearAsync()
Description copied from interface:RBitSetAsyncSet all bits to zero- Specified by:
clearAsyncin interfaceRBitSetAsync- Returns:
- void
-
orAsync
public RFuture<Void> orAsync(String... bitSetNames)
Description copied from interface:RBitSetAsyncExecutes OR operation over this object and specified bitsets. Stores result into this object.- Specified by:
orAsyncin interfaceRBitSetAsync- Parameters:
bitSetNames- - name of stored bitsets- Returns:
- void
-
andAsync
public RFuture<Void> andAsync(String... bitSetNames)
Description copied from interface:RBitSetAsyncExecutes AND operation over this object and specified bitsets. Stores result into this object.- Specified by:
andAsyncin interfaceRBitSetAsync- Parameters:
bitSetNames- - name of stored bitsets- Returns:
- void
-
xorAsync
public RFuture<Void> xorAsync(String... bitSetNames)
Description copied from interface:RBitSetAsyncExecutes XOR operation over this object and specified bitsets. Stores result into this object.- Specified by:
xorAsyncin interfaceRBitSetAsync- Parameters:
bitSetNames- - name of stored bitsets- Returns:
- void
-
expire
public boolean expire(long timeToLive, TimeUnit timeUnit)Description copied from interface:RExpirableSet a timeout for object. After the timeout has expired, the key will automatically be deleted.- Specified by:
expirein interfaceRExpirable- Parameters:
timeToLive- - timeout before object will be deletedtimeUnit- - timeout time unit- Returns:
trueif the timeout was set andfalseif not
-
expireAsync
public RFuture<Boolean> expireAsync(long timeToLive, TimeUnit timeUnit)
Description copied from interface:RExpirableAsyncSet a timeout for object in async mode. After the timeout has expired, the key will automatically be deleted.- Specified by:
expireAsyncin interfaceRExpirableAsync- Parameters:
timeToLive- - timeout before object will be deletedtimeUnit- - timeout time unit- Returns:
trueif the timeout was set andfalseif not
-
expireAt
public boolean expireAt(long timestamp)
Description copied from interface:RExpirableUseRExpirable.expire(Instant)instead- Specified by:
expireAtin interfaceRExpirable- Parameters:
timestamp- - expire date in milliseconds (Unix timestamp)- Returns:
trueif the timeout was set andfalseif not
-
expireAtAsync
public RFuture<Boolean> expireAtAsync(long timestamp)
Description copied from interface:RExpirableAsyncUseRExpirableAsync.expireAsync(Instant)instead- Specified by:
expireAtAsyncin interfaceRExpirableAsync- Parameters:
timestamp- - expire date in milliseconds (Unix timestamp)- Returns:
trueif the timeout was set andfalseif not
-
expire
public boolean expire(Instant instant)
Description copied from interface:RExpirableSet an expire date for object. When expire date comes the key will automatically be deleted.- Specified by:
expirein interfaceRExpirable- Parameters:
instant- - expire date- Returns:
trueif the timeout was set andfalseif not
-
expireAsync
public RFuture<Boolean> expireAsync(Instant instant)
Description copied from interface:RExpirableAsyncSet an expire date for object. When expire date comes the key will automatically be deleted.- Specified by:
expireAsyncin interfaceRExpirableAsync- Parameters:
instant- - expire date- Returns:
trueif the timeout was set andfalseif not
-
expireAt
public boolean expireAt(Date timestamp)
Description copied from interface:RExpirableUseRExpirable.expire(Instant)instead- Specified by:
expireAtin interfaceRExpirable- Parameters:
timestamp- - expire date- Returns:
trueif the timeout was set andfalseif not
-
expireAtAsync
public RFuture<Boolean> expireAtAsync(Date timestamp)
Description copied from interface:RExpirableAsyncUseRExpirableAsync.expireAsync(Instant)instead- Specified by:
expireAtAsyncin interfaceRExpirableAsync- Parameters:
timestamp- - expire date- Returns:
trueif the timeout was set andfalseif not
-
clearExpire
public boolean clearExpire()
Description copied from interface:RExpirableClear an expire timeout or expire date for object.- Specified by:
clearExpirein interfaceRExpirable- Returns:
trueif timeout was removedfalseif object does not exist or does not have an associated timeout
-
clearExpireAsync
public RFuture<Boolean> clearExpireAsync()
Description copied from interface:RExpirableAsyncClear an expire timeout or expire date for object in async mode. Object will not be deleted.- Specified by:
clearExpireAsyncin interfaceRExpirableAsync- Returns:
trueif the timeout was cleared andfalseif not
-
remainTimeToLive
public long remainTimeToLive()
Description copied from interface:RExpirableRemaining time to live of Redisson object that has a timeout- Specified by:
remainTimeToLivein interfaceRExpirable- Returns:
- time in milliseconds -2 if the key does not exist. -1 if the key exists but has no associated expire.
-
remainTimeToLiveAsync
public RFuture<Long> remainTimeToLiveAsync()
Description copied from interface:RExpirableAsyncRemaining time to live of Redisson object that has a timeout- Specified by:
remainTimeToLiveAsyncin interfaceRExpirableAsync- Returns:
- time in milliseconds -2 if the key does not exist. -1 if the key exists but has no associated expire.
-
expireAsync
protected RFuture<Boolean> expireAsync(long timeToLive, TimeUnit timeUnit, String... keys)
-
-