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 Details

    • getSignedAsync

      RFuture<Long> getSignedAsync(int size, long offset)
      Returns signed number at specified offset and size
      Parameters:
      size - - size of signed number up to 64 bits
      offset - - 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 defined value at specified offset
      Parameters:
      size - - size of signed number up to 64 bits
      offset - - offset of signed number
      value - - 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 defined increment value and size at specified offset and returns result.
      Parameters:
      size - - size of signed number up to 64 bits
      offset - - offset of signed number
      increment - - increment value
      Returns:
      result value
    • getUnsignedAsync

      RFuture<Long> getUnsignedAsync(int size, long offset)
      Returns unsigned number at specified offset and size
      Parameters:
      size - - size of unsigned number up to 63 bits
      offset - - 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 defined value at specified offset
      Parameters:
      size - - size of unsigned number up to 63 bits
      offset - - offset of unsigned number
      value - - 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 defined increment value and size at specified offset and returns result.
      Parameters:
      size - - size of unsigned number up to 63 bits
      offset - - offset of unsigned number
      increment - - increment value
      Returns:
      result value
    • getByteAsync

      RFuture<Byte> getByteAsync(long offset)
      Returns byte number at specified offset
      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 defined value at specified offset
      Parameters:
      offset - - offset of number
      value - - value of number
      Returns:
      previous value of number
    • incrementAndGetByteAsync

      RFuture<Byte> incrementAndGetByteAsync(long offset, byte increment)
      Increments current byte value on defined increment value at specified offset and returns result.
      Parameters:
      offset - - offset of number
      increment - - increment value
      Returns:
      result value
    • getShortAsync

      RFuture<Short> getShortAsync(long offset)
      Returns short number at specified offset
      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 defined value at specified offset
      Parameters:
      offset - - offset of number
      value - - value of number
      Returns:
      previous value of number
    • incrementAndGetShortAsync

      RFuture<Short> incrementAndGetShortAsync(long offset, short increment)
      Increments current short value on defined increment value at specified offset and returns result.
      Parameters:
      offset - - offset of number
      increment - - increment value
      Returns:
      result value
    • getIntegerAsync

      RFuture<Integer> getIntegerAsync(long offset)
      Returns integer number at specified offset
      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 defined value at specified offset
      Parameters:
      offset - - offset of number
      value - - value of number
      Returns:
      previous value of number
    • incrementAndGetIntegerAsync

      RFuture<Integer> incrementAndGetIntegerAsync(long offset, int increment)
      Increments current integer value on defined increment value at specified offset and returns result.
      Parameters:
      offset - - offset of number
      increment - - increment value
      Returns:
      result value
    • getLongAsync

      RFuture<Long> getLongAsync(long offset)
      Returns long number at specified offset
      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 defined value at specified offset
      Parameters:
      offset - - offset of number
      value - - value of number
      Returns:
      previous value of number
    • incrementAndGetLongAsync

      RFuture<Long> incrementAndGetLongAsync(long offset, long increment)
      Increments current long value on defined increment value at specified offset and returns result.
      Parameters:
      offset - - offset of number
      increment - - 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 to value from fromIndex (inclusive) to toIndex (exclusive)
      Parameters:
      fromIndex - inclusive
      toIndex - exclusive
      value - true = 1, false = 0
      Returns:
      void
    • clearAsync

      RFuture<Void> clearAsync(long fromIndex, long toIndex)
      Set all bits to zero from fromIndex (inclusive) to toIndex (exclusive)
      Parameters:
      fromIndex - inclusive
      toIndex - 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
    • notAsync

      RFuture<Void> notAsync()
      Executes NOT operation over all bits
      Returns:
      void
    • setAsync

      RFuture<Void> setAsync(long fromIndex, long toIndex)
      Set all bits to one from fromIndex (inclusive) to toIndex (exclusive)
      Parameters:
      fromIndex - inclusive
      toIndex - exclusive
      Returns:
      void
    • sizeAsync

      RFuture<Long> sizeAsync()
      Returns number of set bits.
      Returns:
      number of set bits.
    • getAsync

      RFuture<Boolean> getAsync(long bitIndex)
      Returns true if bit set to one and false overwise.
      Parameters:
      bitIndex - - index of bit
      Returns:
      true if bit set to one and false 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 to value at specified bitIndex
      Parameters:
      bitIndex - - index of bit
      value - true = 1, false = 0
      Returns:
      true - if previous value was true, false - if previous value was false
    • setAsync

      RFuture<Void> setAsync(long[] indexArray, boolean value)
      Set all bits to value which index in indexArray
      Parameters:
      indexArray - The index array of bits that needs to be set to value
      value - true = 1, false = 0
    • 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 specified bitIndex
      Parameters:
      bitIndex - - index of bit
      Returns:
      true - if previous value was true, false - if previous value was false
    • clearAsync

      RFuture<Void> clearAsync()
      Set all bits to zero
      Returns:
      void
    • 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
    • xorAsync

      RFuture<Void> xorAsync(String... bitSetNames)
      Executes XOR operation over this object and specified bitsets. Stores result into this object.
      Parameters:
      bitSetNames - - name of stored bitsets
      Returns:
      void