[−][src]Struct aerospike::WritePolicy
WritePolicy
encapsulates parameters for all write operations.
Fields
base_policy: BasePolicy
Base policy instance
record_exists_action: RecordExistsAction
RecordExistsAction qualifies how to handle writes where the record already exists.
generation_policy: GenerationPolicy
GenerationPolicy qualifies how to handle record writes based on record generation. The default (NONE) indicates that the generation is not used to restrict writes.
commit_level: CommitLevel
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.
generation: u32
Generation determines 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.
expiration: Expiration
Expiration determimes record expiration in seconds. Also known as TTL (Time-To-Live). Seconds record will live before being removed by the server.
send_key: bool
Send user defined key in addition to hash digest on a record put. The default is to not send the user defined key.
respond_per_each_op: bool
For Client::operate() method, return a result for every operation.
Some list operations do not return results by default (operations::list::clear()
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.
durable_delete: bool
If the transaction results in a record deletion, leave a tombstone for the record. This prevents deleted records from reappearing after node failures. Valid for Aerospike Server Enterprise Edition 3.10+ only.
Methods
impl WritePolicy
[src]
pub fn new(gen: u32, exp: Expiration) -> Self
[src]
Create a new write policy instance with the specified generation and expiration parameters.
Trait Implementations
impl Default for WritePolicy
[src]
fn default() -> WritePolicy
[src]
Auto Trait Implementations
impl Send for WritePolicy
impl Sync for WritePolicy
impl Unpin for WritePolicy
impl UnwindSafe for WritePolicy
impl RefUnwindSafe for WritePolicy
Blanket Implementations
impl<T> Policy for T where
T: PolicyLike,
[src]
T: PolicyLike,
fn priority(&Self) -> &Priority
[src]
fn consistency_level(&Self) -> &ConsistencyLevel
[src]
fn deadline(&Self) -> Option<Instant>
[src]
fn timeout(&Self) -> Option<Duration>
[src]
fn max_retries(&Self) -> Option<usize>
[src]
fn sleep_between_retries(&Self) -> Option<Duration>
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,