public final class WritePolicy extends Policy
Modifier and Type | Field and Description |
---|---|
CommitLevel |
commitLevel
Desired consistency guarantee when committing a transaction on the server.
|
boolean |
durableDelete
If the transaction results in a record deletion, leave a tombstone for the record.
|
int |
expiration
Record expiration.
|
int |
generation
Expected generation.
|
GenerationPolicy |
generationPolicy
Qualify how to handle record writes based on record generation.
|
RecordExistsAction |
recordExistsAction
Qualify how to handle writes where the record already exists.
|
boolean |
respondAllOps
For client operate(), return a result for every operation.
|
boolean |
xdr
Operate in XDR mode.
|
compress, failOnFilteredOut, maxRetries, predExp, priority, readModeAP, readModeSC, replica, sendKey, sleepBetweenRetries, socketTimeout, timeoutDelay, totalTimeout
Constructor and Description |
---|
WritePolicy()
Default constructor.
|
WritePolicy(Policy other)
Copy write policy from another policy.
|
WritePolicy(WritePolicy other)
Copy write policy from another write policy.
|
setPredExp, setTimeout, setTimeouts
public RecordExistsAction recordExistsAction
Default: RecordExistsAction.UPDATE
public GenerationPolicy generationPolicy
Default: GenerationPolicy.NONE
public CommitLevel commitLevel
Default: CommitLevel.COMMIT_ALL
public int generation
0
. This field is only relevant when
generationPolicy is not NONE.
Default: 0
public int expiration
Expiration values:
Default: 0
public boolean respondAllOps
Some operations do not return results by default (ListOperation.clear() for example). This can make it difficult to determine the desired result offset in the returned bin's result list.
Setting respondAllOps to true makes it easier to identify the desired result offset (result offset equals bin's operate sequence). If there is a map operation in operate(), respondAllOps will be forced to true for that operate() call.
Default: false
public boolean durableDelete
Default: false (do not tombstone deleted records).
public boolean xdr
Default: false.
public WritePolicy(WritePolicy other)
public WritePolicy(Policy other)
public WritePolicy()
Copyright © 2012–2020 Aerospike, Inc. All rights reserved.