Class BitFieldSubCommands.Offset
java.lang.Object
org.springframework.data.redis.connection.BitFieldSubCommands.Offset
- Enclosing class:
BitFieldSubCommands
Offset used inside a
BitFieldSubCommands.BitFieldSubCommand. Can be zero or type based. See
Bits and positional offsets in the
Redis reference.
Redis rejects negative offsets and offsets addressing beyond proto-max-bulk-len (512 MB by default, i.e.
offsets up to 2^32 - 1). Lettuce is int-based and therefore rejects offsets beyond
Integer.MAX_VALUE, while Jedis sends the offset verbatim.
- Since:
- 2.1
- Author:
- Christoph Strobl, Mark Paluch
-
Method Details
-
offset
Creates new zero based offset.
NOTE: change to type based offset by callingmultipliedByTypeLength().- Parameters:
offset- the bit offset. SeeBitFieldSubCommands.Offsetfor the accepted range.- Returns:
-
multipliedByTypeLength
-
isZeroBased
public boolean isZeroBased()- Returns:
- true if offset starts at 0 and is not multiplied by the type length.
-
getValue
public long getValue()- Returns:
- the actual offset value
-
asString
- Returns:
- the Redis Command representation
-
toString
-
equals
-
hashCode
-