Package oracle.nosql.driver.ops
Class WriteMultipleResult
- java.lang.Object
-
- oracle.nosql.driver.ops.Result
-
- oracle.nosql.driver.ops.WriteMultipleResult
-
public class WriteMultipleResult extends Result
Represents the result of aNoSQLHandle.writeMultiple(oracle.nosql.driver.ops.WriteMultipleRequest)
operation.If the WriteMultiple succeeds, the execution result of each sub operation can be retrieved using
getResults()
.If the WriteMultiple operation is aborted because of the failure of an operation with abortIfUnsuccessful set to true, then the index of failed operation can be accessed using
getFailedOperationIndex()
, and the execution result of failed operation can be accessed usinggetFailedOperationResult()
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
WriteMultipleResult.OperationResult
The Result associated with the execution of an individual operation in the request.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getFailedOperationIndex()
Returns the index of failed operation that results in the entire WriteMultiple operation aborting.WriteMultipleResult.OperationResult
getFailedOperationResult()
Returns the result of the operation that results in the entire WriteMultiple operation aborting.int
getReadKB()
Returns the read throughput consumed by this operation, in KBytes.int
getReadUnits()
Returns the read throughput consumed by this operation, in read units.List<WriteMultipleResult.OperationResult>
getResults()
Returns the list of execution results for the operations.boolean
getSuccess()
Returns true if the WriteMultiple operation succeeded, or false if the operation is aborted due to the failure of a sub operation.int
getWriteKB()
Returns the write throughput consumed by this operation, in KBytes.int
getWriteUnits()
Returns the write throughput consumed by this operation, in write units.int
size()
Returns the number of results.String
toString()
-
Methods inherited from class oracle.nosql.driver.ops.Result
getRateLimitDelayedMs, getRetryStats
-
-
-
-
Method Detail
-
getSuccess
public boolean getSuccess()
Returns true if the WriteMultiple operation succeeded, or false if the operation is aborted due to the failure of a sub operation.The failed operation index can be accessed using
getFailedOperationIndex()
and its result can be accessed usinggetFailedOperationResult()
.- Returns:
- true if the operation succeeded
-
getResults
public List<WriteMultipleResult.OperationResult> getResults()
Returns the list of execution results for the operations.- Returns:
- the list of execution results
-
size
public int size()
Returns the number of results.- Returns:
- the number of results
-
getFailedOperationIndex
public int getFailedOperationIndex()
Returns the index of failed operation that results in the entire WriteMultiple operation aborting.- Returns:
- the index of operation, -1 if not set.
-
getFailedOperationResult
public WriteMultipleResult.OperationResult getFailedOperationResult()
Returns the result of the operation that results in the entire WriteMultiple operation aborting.- Returns:
- the result of the operation, null if not set.
-
getReadKB
public int getReadKB()
Returns the read throughput consumed by this operation, in KBytes. This is the actual amount of data read by the operation. The number of read units consumed is returned bygetReadUnits()
which may be a larger number because this was an update operation.- Returns:
- the read KBytes consumed
-
getWriteKB
public int getWriteKB()
Returns the write throughput consumed by this operation, in KBytes.- Returns:
- the write KBytes consumed
-
getReadUnits
public int getReadUnits()
Returns the read throughput consumed by this operation, in read units. This number may be larger than that returned bygetReadKB()
because it was an update operation.- Returns:
- the read units consumed
-
getWriteUnits
public int getWriteUnits()
Returns the write throughput consumed by this operation, in write units.- Returns:
- the write units consumed
-
-