Phants Client for Redis™*
Static Public Member Functions | List of all members
BitfieldSubcommand Class Reference

Static Public Member Functions

static BitfieldSubcommand Get (string type, string offset)
 
static BitfieldSubcommand Set (string type, string offset, int value)
 
static BitfieldSubcommand IncrBy (string type, string offset, int increment)
 
static BitfieldSubcommand Overflow (OverflowType overflowType)
 

Detailed Description

This class takes a factory method approach to generating subcommands that can be used with the BitField() method. Each of the four methods creates a subcommand object that corresponds to those of the Redis BITFIELD command.

Member Function Documentation

static BitfieldSubcommand Get ( string  type,
string  offset 
)
inlinestatic

Returns a GET subcommand object.

The type parameter can optionally be prefixed with an 'i' for signed, or 'u' for unsigned integers (e.g. u8, i16, s64, u63).

Parameters
typeSpecifies the type and number of bits returned from the bitfield.
offsetThe offset (int bits) of the integer to return.
static BitfieldSubcommand IncrBy ( string  type,
string  offset,
int  increment 
)
inlinestatic

Returns an INCRBY subcommand object.

The type parameter can optionally be prefixed with an 'i' for signed, or 'u' for unsigned integers (e.g. u8, i16, s64, u63).

Parameters
typeSpecifies the type and number of bits to increment in the bitfield.
offsetThe offset (int bits) of the integer to increment.
incrementThe value added to the integer at offet.
static BitfieldSubcommand Overflow ( OverflowType  overflowType)
inlinestatic

Returns an OVERFLOW subcommand object.

Parameters
overflowTypeThe overflow behavior to set (e.g. WRAP, SAT, FAIL).
static BitfieldSubcommand Set ( string  type,
string  offset,
int  value 
)
inlinestatic

Returns a SET subcommand object.

The type parameter can optionally be prefixed with an 'i' for signed, or 'u' for unsigned integers (e.g. u8, i16, s64, u63).

Parameters
typeSpecifies the type and number of bits to set in the bitfield.
offsetThe offset (int bits) of the integer to set.
valueThe new value to set at offet.

The documentation for this class was generated from the following file: