public class BitFieldArgs extends Object
BITFIELD command.| Modifier and Type | Class and Description |
|---|---|
static class |
BitFieldArgs.BitFieldType
Represents a bit field type with details about signed/unsigned and the number of bits.
|
static class |
BitFieldArgs.Builder |
static class |
BitFieldArgs.OverflowType
Represents the overflow types for the
OVERFLOW subcommand argument. |
| Constructor and Description |
|---|
BitFieldArgs()
Creates a new
BitFieldArgs instance. |
| Modifier and Type | Method and Description |
|---|---|
BitFieldArgs |
get()
Adds a new
Get subcommand using offset 0 and the field type of the previous command. |
BitFieldArgs |
get(BitFieldArgs.BitFieldType bitFieldType)
Adds a new
Get subcommand using offset 0. |
BitFieldArgs |
get(BitFieldArgs.BitFieldType bitFieldType,
int offset)
Adds a new
Get subcommand. |
BitFieldArgs |
get(int offset)
Adds a new
Get subcommand using the field type of the previous command. |
BitFieldArgs |
incrBy(BitFieldArgs.BitFieldType bitFieldType,
int offset,
long value)
Adds a new
IncrBy subcommand. |
BitFieldArgs |
incrBy(BitFieldArgs.BitFieldType bitFieldType,
long value)
Adds a new
IncrBy subcommand using offset 0. |
BitFieldArgs |
incrBy(int offset,
long value)
Adds a new
IncrBy subcommand using the field type of the previous command. |
BitFieldArgs |
incrBy(long value)
Adds a new
IncrBy subcommand using offset 0 and the field type of the previous command. |
BitFieldArgs |
overflow(BitFieldArgs.OverflowType overflowType)
Adds a new
Overflow subcommand. |
BitFieldArgs |
set(BitFieldArgs.BitFieldType bitFieldType,
int offset,
long value)
Adds a new
Set subcommand. |
BitFieldArgs |
set(BitFieldArgs.BitFieldType bitFieldType,
long value)
Adds a new
Set subcommand using offset 0. |
BitFieldArgs |
set(int offset,
long value)
Adds a new
Set subcommand using the field type of the previous command. |
BitFieldArgs |
set(long value)
Adds a new
Set subcommand using offset 0 and the field type of the previous command. |
static BitFieldArgs.BitFieldType |
signed(int bits)
Creates a new signed
BitFieldArgs.BitFieldType for the given number of bits. |
static BitFieldArgs.BitFieldType |
unsigned(int bits)
Creates a new unsigned
BitFieldArgs.BitFieldType for the given number of bits. |
public BitFieldArgs()
BitFieldArgs instance.public static BitFieldArgs.BitFieldType signed(int bits)
BitFieldArgs.BitFieldType for the given number of bits.
Redis allows up to 64 bits for unsigned integers.bits - public static BitFieldArgs.BitFieldType unsigned(int bits)
BitFieldArgs.BitFieldType for the given number of bits. Redis allows up to 63 bits for
unsigned integers.bits - public BitFieldArgs get()
Get subcommand using offset 0 and the field type of the previous command.Get subcommand for the given bitFieldType and offset.IllegalStateException - if no previous field type was foundpublic BitFieldArgs get(BitFieldArgs.BitFieldType bitFieldType)
Get subcommand using offset 0.bitFieldType - the bit field type, must not be null.Get subcommand for the given bitFieldType and offset.public BitFieldArgs get(BitFieldArgs.BitFieldType bitFieldType, int offset)
Get subcommand.bitFieldType - the bit field type, must not be null.offset - bitfield offsetGet subcommand for the given bitFieldType and offset.public BitFieldArgs get(int offset)
Get subcommand using the field type of the previous command.offset - bitfield offsetGet subcommand for the given bitFieldType and offset.IllegalStateException - if no previous field type was foundpublic BitFieldArgs set(long value)
Set subcommand using offset 0 and the field type of the previous command.value - the valueSet subcommand for the given bitFieldType, offset and value.IllegalStateException - if no previous field type was foundpublic BitFieldArgs set(BitFieldArgs.BitFieldType bitFieldType, long value)
Set subcommand using offset 0.bitFieldType - the bit field type, must not be null.value - the valueSet subcommand for the given bitFieldType, offset and value.public BitFieldArgs set(int offset, long value)
Set subcommand using the field type of the previous command.offset - bitfield offsetvalue - the valueSet subcommand for the given bitFieldType, offset and value.IllegalStateException - if no previous field type was foundpublic BitFieldArgs set(BitFieldArgs.BitFieldType bitFieldType, int offset, long value)
Set subcommand.bitFieldType - the bit field type, must not be null.offset - bitfield offsetvalue - the valueSet subcommand for the given bitFieldType, offset and value.public BitFieldArgs incrBy(long value)
IncrBy subcommand using offset 0 and the field type of the previous command.value - the valueIncrBy subcommand for the given bitFieldType, offset and value.IllegalStateException - if no previous field type was foundpublic BitFieldArgs incrBy(BitFieldArgs.BitFieldType bitFieldType, long value)
IncrBy subcommand using offset 0.bitFieldType - the bit field type, must not be null.value - the valueIncrBy subcommand for the given bitFieldType, offset and value.public BitFieldArgs incrBy(int offset, long value)
IncrBy subcommand using the field type of the previous command.offset - bitfield offsetvalue - the valueIncrBy subcommand for the given bitFieldType, offset and value.IllegalStateException - if no previous field type was foundpublic BitFieldArgs incrBy(BitFieldArgs.BitFieldType bitFieldType, int offset, long value)
IncrBy subcommand.bitFieldType - the bit field type, must not be null.offset - bitfield offsetvalue - the valueIncrBy subcommand for the given bitFieldType, offset and value.public BitFieldArgs overflow(BitFieldArgs.OverflowType overflowType)
Overflow subcommand.overflowType - type of overflow, must not be null.Overflow subcommand for the given overflowType.Copyright © 2016. All rights reserved.