Documentation

WritePolicy
in package

`WritePolicy` encapsulates parameters for all write operations.

Table of Contents

Properties

$commit_level  : mixed
Desired consistency guarantee when committing a transaction on the server. The default (COMMIT_ALL) indicates that the server should wait for master and all replica commits to be successful before returning success to the client.
$durable_delete  : mixed
$exit_fast_on_exhausted_connection_pool  : mixed
$expiration  : mixed
$filter_expression  : mixed
$generation  : mixed
Generation determines expected generation.
$generation_policy  : mixed
GenerationPolicy qualifies how to handle record writes based on record generation. The default (NONE) indicates that the generation is not used to restrict writes.
$max_retries  : mixed
$read_mode_ap  : mixed
$read_mode_sc  : mixed
$record_exists_action  : mixed
RecordExistsAction qualifies how to handle writes where the record already exists.
$respond_per_each_op  : mixed
$send_key  : mixed
$sleep_multiplier  : mixed
$socket_timeout  : mixed
$total_timeout  : mixed
$use_compression  : mixed

Methods

__construct()  : mixed
getCommitLevel()  : CommitLevel
getDurableDelete()  : bool
DurableDelete leaves a tombstone for the record if the transaction results in a record deletion.
getExitFastOnExhaustedConnectionPool()  : bool
getExpiration()  : Expiration
Expiration determines record expiration in seconds. Also known as TTL (Time-To-Live).
getFilterExpression()  : Expression|null
getGeneration()  : int
getGenerationPolicy()  : GenerationPolicy
getMaxRetries()  : int
*************************************************************************** ReadPolicy Attrs ***************************************************************************
getReadModeAp()  : ReadModeAP
getReadModeSc()  : ReadModeSC
getRecordExistsAction()  : RecordExistsAction
getRespondPerEachOp()  : bool
RespondPerEachOp defines for client.Operate() method, return a result for every operation.
getSendKey()  : bool
getSleepMultiplier()  : float
getSocketTimeout()  : int
getTotalTimeout()  : int
getUseCompression()  : bool
setCommitLevel()  : mixed
setDurableDelete()  : mixed
setExitFastOnExhaustedConnectionPool()  : mixed
setExpiration()  : mixed
setFilterExpression()  : mixed
setGeneration()  : mixed
setGenerationPolicy()  : mixed
setMaxRetries()  : mixed
setReadModeAp()  : mixed
setReadModeSc()  : mixed
setRecordExistsAction()  : mixed
setRespondPerEachOp()  : mixed
setSendKey()  : mixed
setSleepMultiplier()  : mixed
setSocketTimeout()  : mixed
setTotalTimeout()  : mixed
setUseCompression()  : mixed

Properties

$commit_level

Desired consistency guarantee when committing a transaction on the server. The default (COMMIT_ALL) indicates that the server should wait for master and all replica commits to be successful before returning success to the client.

public mixed $commit_level

$generation

Generation determines expected generation.

public mixed $generation

Generation is the number of times a record has been modified (including creation) on the server. If a write operation is creating a record, the expected generation would be 0.

$generation_policy

GenerationPolicy qualifies how to handle record writes based on record generation. The default (NONE) indicates that the generation is not used to restrict writes.

public mixed $generation_policy

$record_exists_action

RecordExistsAction qualifies how to handle writes where the record already exists.

public mixed $record_exists_action

Methods

getDurableDelete()

DurableDelete leaves a tombstone for the record if the transaction results in a record deletion.

public getDurableDelete() : bool

This prevents deleted records from reappearing after node failures. Valid for Aerospike Server Enterprise Edition 3.10+ only.

Return values
bool

getExpiration()

Expiration determines record expiration in seconds. Also known as TTL (Time-To-Live).

public getExpiration() : Expiration

Seconds record will live before being removed by the server. Expiration values: TTLServerDefault (0): Default to namespace configuration variable "default-ttl" on the server. TTLDontExpire (MaxUint32): Never expire for Aerospike 2 server versions >= 2.7.2 and Aerospike 3+ server TTLDontUpdate (MaxUint32 - 1): Do not change ttl when record is written. Supported by Aerospike server versions >= 3.10.1

0: Actual expiration in seconds.

Return values
Expiration

getMaxRetries()

*************************************************************************** ReadPolicy Attrs ***************************************************************************

public getMaxRetries() : int
Return values
int

getRespondPerEachOp()

RespondPerEachOp defines for client.Operate() method, return a result for every operation.

public getRespondPerEachOp() : bool

Some list operations do not return results by default (ListClearOp() for example). This can sometimes make it difficult to determine the desired result offset in the returned bin's result list.

Setting RespondPerEachOp to true makes it easier to identify the desired result offset (result offset equals bin's operate sequence). This only makes sense when multiple list operations are used in one operate call and some of those operations do not return results by default.

Return values
bool

setExitFastOnExhaustedConnectionPool()

public setExitFastOnExhaustedConnectionPool(bool $exit_fast_on_exhausted_connection_pool) : mixed
Parameters
$exit_fast_on_exhausted_connection_pool : bool

setFilterExpression()

public setFilterExpression(mixed $filter_expression) : mixed
Parameters
$filter_expression : mixed

setGenerationPolicy()

public setGenerationPolicy(mixed $generation_policy) : mixed
Parameters
$generation_policy : mixed

setRecordExistsAction()

public setRecordExistsAction(mixed $record_exists_action) : mixed
Parameters
$record_exists_action : mixed

setRespondPerEachOp()

public setRespondPerEachOp(bool $respond_per_each_op) : mixed
Parameters
$respond_per_each_op : bool

        
On this page

Search results