public class OperationResult extends java.lang.Object
An OperationResult does not contain any failure information. Methods that perform unsuccessful reads or writes return null or throw an exception. Null is returned if the operation failed for commonly expected reasons, such as a read that fails because the key does not exist, or an insertion that fails because the key does exist.
Methods that return OperationResult can be compared to methods that return
OperationStatus as follows: If
returned by the latter methods, this is equivalent to returning a non-null
OperationResult by the former methods.
|Modifier and Type||Method and Description|
Returns the expiration time of the record, in milliseconds, or zero if the record has no TTL and does not expire.
Returns whether the operation was an update, for distinguishing inserts and updates performed by a
public boolean isUpdate()
public long getExpirationTime()
For 'get' operations, this is the expiration time of the current record. For 'put operations, this is the expiration time of the newly written record. For 'delete' operation, this is the expiration time of the record that was deleted.
The return value will always be evenly divisible by the number of
milliseconds in one hour. If
TimeUnit.Days was specified
when the record was written, the return value will also be evenly
divisible by the number of milliseconds in one day.
Copyright (c) 2002, 2017 Oracle and/or its affiliates. All rights reserved.