public interface BatchResult
extends java.lang.AutoCloseable
The BatchResult object is NOT thread-safe. Do not invoke multiple operations on a single BatchResult using more than one thread. Behavior is not defined if this happens.
To create a BatchResult object, call
Session.getRows
,
Session.putRows
,
Session.deleteRows
, or
Session.updateRows
.
A program that creates a BatchResult must explicitly call
BatchResult.close
to reclaim its resources.
This interface is implemented internally. Applications do not implement this interface.
Modifier and Type | Method and Description |
---|---|
boolean |
allSucceeded()
Find whether or not every operation in the batch succeeded
If the batched operation was a GET, and this function
returned true
BatchResult.getRow()
can be called to retrieve the result row |
void |
close()
Destroy a BatchResult.
|
Row |
getRow(int i)
Get a Row result from a batched GET
|
int |
getRowUpdateCount(int i)
Get the count of rows updated for the supplied index in the BatchResult.
|
int |
getSize()
Get the count of succesful operations
|
boolean allSucceeded() throws DataGridException
BatchResult.getRow()
can be called to retrieve the result rowDataGridException
- in case of failuresRow getRow(int i) throws DataGridException
This function is valid only for GET batches that have the status TIB_OK. The row returned for int i corresponds to the request in the input row array at rows[i]
i
- the index of the row to retrieveRow
DataGridException
- in case of failuresint getSize() throws DataGridException
Note: For fully successful batches, this should be the size of the input row array
DataGridException
- in case of failuresint getRowUpdateCount(int i) throws DataGridException
Note: This is only valid for UPDATE batches. You must call allSucceeded prior to this to ensure the batch succeeded.
i
- the index of the row to checkDataGridException
- in case of failuresvoid close() throws DataGridException
close
in interface java.lang.AutoCloseable
DataGridException
- in case of failures