Interface RBitSetReactive

All Superinterfaces:
RExpirableReactive, RObjectReactive

public interface RBitSetReactive extends RExpirableReactive
Reactive interface for BitSet object
Author:
Nikita Koksharov
  • Method Summary

    Modifier and Type
    Method
    Description
    reactor.core.publisher.Mono<Long>
    and(String... bitSetNames)
    Executes AND operation over this object and specified bitsets.
    reactor.core.publisher.Mono<Long>
    andOr(String... bitSetNames)
    Executes bitwise ANDOR operation over this object and specified bitsets.
    reactor.core.publisher.Mono<Long>
    Returns the number of bits set to one.
    reactor.core.publisher.Mono<Void>
    Set all bits to zero
    reactor.core.publisher.Mono<Boolean>
    clear(long bitIndex)
    Set bit to zero at specified bitIndex
    reactor.core.publisher.Mono<Void>
    clear(long fromIndex, long toIndex)
    Set all bits to zero from fromIndex (inclusive) to toIndex (exclusive)
    reactor.core.publisher.Mono<Long>
    diff(String... bitSetNames)
    Executes bitwise DIFF operation over this object and specified bitsets.
    reactor.core.publisher.Mono<Long>
    diffInverse(String... bitSetNames)
    Executes bitwise DIFF1 operation over this object and specified bitsets.
    reactor.core.publisher.Mono<Boolean>
    get(long bitIndex)
    Returns true if bit set to one and false overwise.
    reactor.core.publisher.Mono<boolean[]>
    get(long... bitIndexes)
    Returns a boolean array where each element of the array corresponds to the query result of the input parameters.
    reactor.core.publisher.Mono<Byte>
    getByte(long offset)
    Returns byte number at specified offset
    reactor.core.publisher.Mono<Integer>
    getInteger(long offset)
    Returns integer number at specified offset
    reactor.core.publisher.Mono<Long>
    getLong(long offset)
    Returns long number at specified offset
    reactor.core.publisher.Mono<Short>
    getShort(long offset)
    Returns short number at specified offset
    reactor.core.publisher.Mono<Long>
    getSigned(int size, long offset)
    Returns signed number at specified offset and size
    reactor.core.publisher.Mono<Long>
    getUnsigned(int size, long offset)
    Returns unsigned number at specified offset and size
    reactor.core.publisher.Mono<Byte>
    incrementAndGetByte(long offset, byte increment)
    Increments current byte value on defined increment value at specified offset and returns result.
    reactor.core.publisher.Mono<Integer>
    incrementAndGetInteger(long offset, int increment)
    Increments current integer value on defined increment value at specified offset and returns result.
    reactor.core.publisher.Mono<Long>
    incrementAndGetLong(long offset, long increment)
    Increments current long value on defined increment value at specified offset and returns result.
    reactor.core.publisher.Mono<Short>
    incrementAndGetShort(long offset, short increment)
    Increments current short value on defined increment value at specified offset and returns result.
    reactor.core.publisher.Mono<Long>
    incrementAndGetSigned(int size, long offset, long increment)
    Increments current signed value by defined increment value and size at specified offset and returns result.
    reactor.core.publisher.Mono<Long>
    incrementAndGetUnsigned(int size, long offset, long increment)
    Increments current unsigned value by defined increment value and size at specified offset and returns result.
    reactor.core.publisher.Mono<Long>
    Returns "logical size" = index of highest set bit plus one.
    reactor.core.publisher.Mono<Long>
    not()
    Executes NOT operation over all bits
    reactor.core.publisher.Mono<Long>
    or(String... bitSetNames)
    Executes OR operation over this object and specified bitsets.
    reactor.core.publisher.Mono<Boolean>
    set(long bitIndex)
    Set bit to one at specified bitIndex
    reactor.core.publisher.Mono<Boolean>
    set(long bitIndex, boolean value)
    Set bit to value at specified bitIndex
    reactor.core.publisher.Mono<Void>
    set(long fromIndex, long toIndex)
    Set all bits to one from fromIndex (inclusive) to toIndex (exclusive)
    reactor.core.publisher.Mono<Void>
    set(long fromIndex, long toIndex, boolean value)
    Set all bits to value from fromIndex (inclusive) to toIndex (exclusive)
    reactor.core.publisher.Mono<Void>
    set(BitSet bs)
    Copy bits state of source BitSet object to this object
    reactor.core.publisher.Mono<Byte>
    setByte(long offset, byte value)
    Returns previous value of byte number and replaces it with defined value at specified offset
    reactor.core.publisher.Mono<Long>
    setExclusive(String... bitSetNames)
    Executes bitwise ONE operation over this object and specified bitsets.
    reactor.core.publisher.Mono<Integer>
    setInteger(long offset, int value)
    Returns previous value of integer number and replaces it with defined value at specified offset
    reactor.core.publisher.Mono<Long>
    setLong(long offset, long value)
    Returns previous value of long number and replaces it with defined value at specified offset
    reactor.core.publisher.Mono<Short>
    setShort(long offset, short value)
    Returns previous value of short number and replaces it with defined value at specified offset
    reactor.core.publisher.Mono<Long>
    setSigned(int size, long offset, long value)
    Returns previous value of signed number and replaces it with defined value at specified offset
    reactor.core.publisher.Mono<Long>
    setUnsigned(int size, long offset, long value)
    Returns previous value of unsigned number and replaces it with defined value at specified offset
    reactor.core.publisher.Mono<Long>
    Returns number of set bits.
    reactor.core.publisher.Mono<byte[]>
     
    reactor.core.publisher.Mono<Long>
    xor(String... bitSetNames)
    Executes XOR operation over this object and specified bitsets.
  • Method Details

    • getSigned

      reactor.core.publisher.Mono<Long> getSigned(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
    • setSigned

      reactor.core.publisher.Mono<Long> setSigned(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
    • incrementAndGetSigned

      reactor.core.publisher.Mono<Long> incrementAndGetSigned(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
    • getUnsigned

      reactor.core.publisher.Mono<Long> getUnsigned(int size, long offset)
      Returns unsigned number at specified offset and size
      Parameters:
      size - - size of unsigned number up to 64 bits
      offset - - offset of unsigned number
      Returns:
      unsigned number
    • setUnsigned

      reactor.core.publisher.Mono<Long> setUnsigned(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 64 bits
      offset - - offset of unsigned number
      value - - value of unsigned number
      Returns:
      previous value of unsigned number
    • incrementAndGetUnsigned

      reactor.core.publisher.Mono<Long> incrementAndGetUnsigned(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 64 bits
      offset - - offset of unsigned number
      increment - - increment value
      Returns:
      result value
    • getByte

      reactor.core.publisher.Mono<Byte> getByte(long offset)
      Returns byte number at specified offset
      Parameters:
      offset - - offset of number
      Returns:
      number
    • setByte

      reactor.core.publisher.Mono<Byte> setByte(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
    • incrementAndGetByte

      reactor.core.publisher.Mono<Byte> incrementAndGetByte(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
    • getShort

      reactor.core.publisher.Mono<Short> getShort(long offset)
      Returns short number at specified offset
      Parameters:
      offset - - offset of number
      Returns:
      number
    • setShort

      reactor.core.publisher.Mono<Short> setShort(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
    • incrementAndGetShort

      reactor.core.publisher.Mono<Short> incrementAndGetShort(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
    • getInteger

      reactor.core.publisher.Mono<Integer> getInteger(long offset)
      Returns integer number at specified offset
      Parameters:
      offset - - offset of number
      Returns:
      number
    • setInteger

      reactor.core.publisher.Mono<Integer> setInteger(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
    • incrementAndGetInteger

      reactor.core.publisher.Mono<Integer> incrementAndGetInteger(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
    • getLong

      reactor.core.publisher.Mono<Long> getLong(long offset)
      Returns long number at specified offset
      Parameters:
      offset - - offset of number
      Returns:
      number
    • setLong

      reactor.core.publisher.Mono<Long> setLong(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
    • incrementAndGetLong

      reactor.core.publisher.Mono<Long> incrementAndGetLong(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
    • toByteArray

      reactor.core.publisher.Mono<byte[]> toByteArray()
    • length

      reactor.core.publisher.Mono<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

      reactor.core.publisher.Mono<Void> set(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
    • clear

      reactor.core.publisher.Mono<Void> clear(long fromIndex, long toIndex)
      Set all bits to zero from fromIndex (inclusive) to toIndex (exclusive)
      Parameters:
      fromIndex - inclusive
      toIndex - exclusive
      Returns:
      void
    • set

      reactor.core.publisher.Mono<Void> set(BitSet bs)
      Copy bits state of source BitSet object to this object
      Parameters:
      bs - - BitSet source
      Returns:
      void
    • not

      reactor.core.publisher.Mono<Long> not()
      Executes NOT operation over all bits
      Returns:
      length in bytes of the destination key
    • set

      reactor.core.publisher.Mono<Void> set(long fromIndex, long toIndex)
      Set all bits to one from fromIndex (inclusive) to toIndex (exclusive)
      Parameters:
      fromIndex - inclusive
      toIndex - exclusive
      Returns:
      void
    • size

      reactor.core.publisher.Mono<Long> size()
      Returns number of set bits.
      Returns:
      number of set bits.
    • get

      reactor.core.publisher.Mono<Boolean> get(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.
    • get

      reactor.core.publisher.Mono<boolean[]> get(long... bitIndexes)
      Returns a boolean array where each element of the array corresponds to the query result of the input parameters.
      Parameters:
      bitIndexes - indexes of bit
      Returns:
      Returns a boolean array where each element of the array corresponds to the query result of the input parameters.
    • set

      reactor.core.publisher.Mono<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

      reactor.core.publisher.Mono<Boolean> set(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
    • cardinality

      reactor.core.publisher.Mono<Long> cardinality()
      Returns the number of bits set to one.
      Returns:
      number of bits
    • clear

      reactor.core.publisher.Mono<Boolean> clear(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
    • clear

      reactor.core.publisher.Mono<Void> clear()
      Set all bits to zero
      Returns:
      void
    • or

      reactor.core.publisher.Mono<Long> or(String... bitSetNames)
      Executes OR operation over this object and specified bitsets. Stores result into this object.
      Parameters:
      bitSetNames - - name of stored bitsets
      Returns:
      length in bytes of the destination key
    • and

      reactor.core.publisher.Mono<Long> and(String... bitSetNames)
      Executes AND operation over this object and specified bitsets. Stores result into this object.
      Parameters:
      bitSetNames - - name of stored bitsets
      Returns:
      length in bytes of the destination key
    • xor

      reactor.core.publisher.Mono<Long> xor(String... bitSetNames)
      Executes XOR operation over this object and specified bitsets. Stores result into this object.
      Parameters:
      bitSetNames - - name of stored bitsets
      Returns:
      length in bytes of the destination key
    • diff

      reactor.core.publisher.Mono<Long> diff(String... bitSetNames)
      Executes bitwise DIFF operation over this object and specified bitsets. Sets bits that are set in this object but not in any of the other bitsets. Stores result into this object.
      Parameters:
      bitSetNames - name of stored bitsets
      Returns:
      length in bytes of the destination key
    • diffInverse

      reactor.core.publisher.Mono<Long> diffInverse(String... bitSetNames)
      Executes bitwise DIFF1 operation over this object and specified bitsets. Sets bits that are set in one or more of the other bitsets but not in this object. Stores result into this object.
      Parameters:
      bitSetNames - name of stored bitsets
      Returns:
      length in bytes of the destination key
    • andOr

      reactor.core.publisher.Mono<Long> andOr(String... bitSetNames)
      Executes bitwise ANDOR operation over this object and specified bitsets. Sets bits that are set in this object AND also in one or more of the other bitsets. Stores result into this object.
      Parameters:
      bitSetNames - name of stored bitsets
      Returns:
      length in bytes of the destination key
    • setExclusive

      reactor.core.publisher.Mono<Long> setExclusive(String... bitSetNames)
      Executes bitwise ONE operation over this object and specified bitsets. Sets bits that are set in exactly one of the provided bitsets. Stores result into this object.
      Parameters:
      bitSetNames - name of stored bitsets
      Returns:
      length in bytes of the destination key