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
$durable_delete
public
mixed
$durable_delete
$exit_fast_on_exhausted_connection_pool
public
mixed
$exit_fast_on_exhausted_connection_pool
$expiration
public
mixed
$expiration
$filter_expression
public
mixed
$filter_expression
$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
$max_retries
public
mixed
$max_retries
$read_mode_ap
public
mixed
$read_mode_ap
$read_mode_sc
public
mixed
$read_mode_sc
$record_exists_action
RecordExistsAction qualifies how to handle writes where the record already exists.
public
mixed
$record_exists_action
$respond_per_each_op
public
mixed
$respond_per_each_op
$send_key
public
mixed
$send_key
$sleep_multiplier
public
mixed
$sleep_multiplier
$socket_timeout
public
mixed
$socket_timeout
$total_timeout
public
mixed
$total_timeout
$use_compression
public
mixed
$use_compression
Methods
__construct()
public
__construct() : mixed
getCommitLevel()
public
getCommitLevel() : CommitLevel
Return values
CommitLevelgetDurableDelete()
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
boolgetExitFastOnExhaustedConnectionPool()
public
getExitFastOnExhaustedConnectionPool() : bool
Return values
boolgetExpiration()
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
ExpirationgetFilterExpression()
public
getFilterExpression() : Expression|null
Return values
Expression|nullgetGeneration()
public
getGeneration() : int
Return values
intgetGenerationPolicy()
public
getGenerationPolicy() : GenerationPolicy
Return values
GenerationPolicygetMaxRetries()
*************************************************************************** ReadPolicy Attrs ***************************************************************************
public
getMaxRetries() : int
Return values
intgetReadModeAp()
public
getReadModeAp() : ReadModeAP
Return values
ReadModeAPgetReadModeSc()
public
getReadModeSc() : ReadModeSC
Return values
ReadModeSCgetRecordExistsAction()
public
getRecordExistsAction() : RecordExistsAction
Return values
RecordExistsActiongetRespondPerEachOp()
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
boolgetSendKey()
public
getSendKey() : bool
Return values
boolgetSleepMultiplier()
public
getSleepMultiplier() : float
Return values
floatgetSocketTimeout()
public
getSocketTimeout() : int
Return values
intgetTotalTimeout()
public
getTotalTimeout() : int
Return values
intgetUseCompression()
public
getUseCompression() : bool
Return values
boolsetCommitLevel()
public
setCommitLevel(mixed $commit_level) : mixed
Parameters
- $commit_level : mixed
setDurableDelete()
public
setDurableDelete(bool $durable_delete) : mixed
Parameters
- $durable_delete : bool
setExitFastOnExhaustedConnectionPool()
public
setExitFastOnExhaustedConnectionPool(bool $exit_fast_on_exhausted_connection_pool) : mixed
Parameters
- $exit_fast_on_exhausted_connection_pool : bool
setExpiration()
public
setExpiration(mixed $expiration) : mixed
Parameters
- $expiration : mixed
setFilterExpression()
public
setFilterExpression(mixed $filter_expression) : mixed
Parameters
- $filter_expression : mixed
setGeneration()
public
setGeneration(int $generation) : mixed
Parameters
- $generation : int
setGenerationPolicy()
public
setGenerationPolicy(mixed $generation_policy) : mixed
Parameters
- $generation_policy : mixed
setMaxRetries()
public
setMaxRetries(int $max_retries) : mixed
Parameters
- $max_retries : int
setReadModeAp()
public
setReadModeAp(mixed $read_mode_ap) : mixed
Parameters
- $read_mode_ap : mixed
setReadModeSc()
public
setReadModeSc(mixed $read_mode_sc) : mixed
Parameters
- $read_mode_sc : 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
setSendKey()
public
setSendKey(bool $send_key) : mixed
Parameters
- $send_key : bool
setSleepMultiplier()
public
setSleepMultiplier(float $sleep_multiplier) : mixed
Parameters
- $sleep_multiplier : float
setSocketTimeout()
public
setSocketTimeout(int $timeout_millis) : mixed
Parameters
- $timeout_millis : int
setTotalTimeout()
public
setTotalTimeout(int $timeout_millis) : mixed
Parameters
- $timeout_millis : int
setUseCompression()
public
setUseCompression(bool $use_compression) : mixed
Parameters
- $use_compression : bool