PHP Class Aerospike\LDT\LDT

Show file Open project: aerospike/aerospike-client-php Class Usage Examples

Protected Properties

Property Type Description
$bin string The name of the bin within the recod that is an LDT
$client Aerospike The Aerospike client instance
$error string The error message for the last operation
$errorno integer The status code for the last operation
$key string The key for the record containing the LDT
$module string The name of the UDF module providing the functionality that this class wraps around
$type string The type of LDT at the bin

Public Methods

Method Description
config ( array &$config ) : integer Retrieves the LDT configuration data.
destroy ( ) : integer Destroy the LDT at the key and bin the class was initialized to.
error ( ) : string Returns the error message for the previous operation.
errorno ( ) : integer Returns the status code for the previous operation.
isLDT ( ) : boolean Checks whether there actually is an LDT at the key and bin the class was initialized with.
isValid ( ) : boolean Validates whether the LDT at the specified key and bin is in good shape
setPageSize ( integer $size ) : integer Set the page size of the LDT
size ( integer &$num_elements ) : integer Sets $num_elements with the number of elements in the LDT.

Protected Methods

Method Description
__construct ( Aerospike $client, array $key, string $bin, integer $type ) Constructor for the abstract \Aerospike\LDT class. Inherited by LDT types.
processStatusCode ( integer $status ) Process the operation status code into error number and message

Private Methods

Method Description
getModuleName ( ) : string Finds the name of the UDF module providing the functionality needed by the given LDT

Method Details

__construct() protected method

Constructor for the abstract \Aerospike\LDT class. Inherited by LDT types.
See also: errorno()
See also: error()
protected __construct ( Aerospike $client, array $key, string $bin, integer $type )
$client Aerospike
$key array initialized with Aerospike::initKey()
$bin string name
$type integer of the LDT

config() public method

Retrieves the LDT configuration data.
public config ( array &$config ) : integer
$config array will be updated with the configuration data
return integer status code of the operation

destroy() public method

Destroy the LDT at the key and bin the class was initialized to.
public destroy ( ) : integer
return integer status code of the operation

error() public method

Returns the error message for the previous operation.
public error ( ) : string
return string

errorno() public method

Returns the status code for the previous operation.
public errorno ( ) : integer
return integer

isLDT() public method

Checks whether there actually is an LDT at the key and bin the class was initialized with.
public isLDT ( ) : boolean
return boolean

isValid() public method

Validates whether the LDT at the specified key and bin is in good shape
public isValid ( ) : boolean
return boolean

processStatusCode() protected method

Process the operation status code into error number and message
protected processStatusCode ( integer $status )
$status integer code of the operation

setPageSize() public method

Set the page size of the LDT
public setPageSize ( integer $size ) : integer
$size integer
return integer status code of the operation

size() public method

Sets $num_elements with the number of elements in the LDT.
public size ( integer &$num_elements ) : integer
$num_elements integer returned
return integer status code of the operation

Property Details

$bin protected property

The name of the bin within the recod that is an LDT
protected string $bin
return string

$client protected property

The Aerospike client instance
protected Aerospike $client
return Aerospike

$error protected property

The error message for the last operation
See also: LDT::error()
protected string $error
return string

$errorno protected property

The status code for the last operation
See also: LDT::errorno()
protected int $errorno
return integer

$key protected property

The key for the record containing the LDT
protected string $key
return string

$module protected property

The name of the UDF module providing the functionality that this class wraps around
protected string $module
return string

$type protected property

The type of LDT at the bin
protected string $type
return string