BatchWritePolicy
in package
BatchWritePolicy attributes used in batch write commands.
Table of Contents
Properties
- $commit_level : mixed
- $durable_delete : mixed
- $expiration : mixed
- $filter_expression : mixed
- $generation : mixed
- $generation_policy : mixed
- $record_exists_action : mixed
Methods
- __construct() : mixed
- getCommitLevel() : CommitLevel
- GenerationPolicy qualifies how to handle record writes based on record generation. The default (NONE) indicates that the generation is not used to restrict writes.
- getDurableDelete() : bool
- DurableDelete leaves a tombstone for the record if the transaction results in a record deletion.
- getExpiration() : Expiration
- Expiration determines record expiration in seconds. Also known as TTL (Time-To-Live).
- getFilterExpression() : Expression|null
- FilterExpression is optional expression filter. If FilterExpression exists and evaluates to false, the specific batch key request is not performed and BatchRecord#resultCode is set to types.FILTERED_OUT.
- getGeneration() : int
- Expected 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. This field is only relevant when generationPolicy is not NONE.
- getGenerationPolicy() : GenerationPolicy
- 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.
- getRecordExistsAction() : RecordExistsAction
- RecordExistsAction qualifies how to handle writes where the record already exists.
- setCommitLevel() : mixed
- setDurableDelete() : mixed
- setExpiration() : mixed
- setFilterExpression() : mixed
- setGeneration() : mixed
- setGenerationPolicy() : mixed
- setRecordExistsAction() : mixed
Properties
$commit_level
public
mixed
$commit_level
$durable_delete
public
mixed
$durable_delete
$expiration
public
mixed
$expiration
$filter_expression
public
mixed
$filter_expression
$generation
public
mixed
$generation
$generation_policy
public
mixed
$generation_policy
$record_exists_action
public
mixed
$record_exists_action
Methods
__construct()
public
__construct() : mixed
getCommitLevel()
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
getCommitLevel() : CommitLevel
The server does not support this field for UDF execute() calls. The read-modify-write usage model can still be enforced inside the UDF code itself.
Default: GenerationPolicy.NONE indicates that the generation is not used to restrict writes.
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
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()
FilterExpression is optional expression filter. If FilterExpression exists and evaluates to false, the specific batch key request is not performed and BatchRecord#resultCode is set to types.FILTERED_OUT.
public
getFilterExpression() : Expression|null
Default: nil
Return values
Expression|nullgetGeneration()
Expected 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. This field is only relevant when generationPolicy is not NONE.
public
getGeneration() : int
The server does not support this field for UDF execute() calls. The read-modify-write usage model can still be enforced inside the UDF code itself.
Default: 0
Return values
intgetGenerationPolicy()
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
getGenerationPolicy() : GenerationPolicy
Default: CommitLevel.COMMIT_ALL
Return values
GenerationPolicygetRecordExistsAction()
RecordExistsAction qualifies how to handle writes where the record already exists.
public
getRecordExistsAction() : RecordExistsAction
Return values
RecordExistsActionsetCommitLevel()
public
setCommitLevel(mixed $commit_level) : mixed
Parameters
- $commit_level : mixed
setDurableDelete()
public
setDurableDelete(bool $durable_delete) : mixed
Parameters
- $durable_delete : 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
setRecordExistsAction()
public
setRecordExistsAction(mixed $record_exists_action) : mixed
Parameters
- $record_exists_action : mixed