Package oracle.nosql.driver.ops
Class GetResult
java.lang.Object
oracle.nosql.driver.ops.Result
oracle.nosql.driver.ops.GetResult
Represents the result of a
NoSQLHandle.get(oracle.nosql.driver.ops.GetRequest)
operation.
On a successful operation the value of the row is available using
getValue()
and the other state available in this class is valid.
On failure that value is null and other state, other than consumed
capacity, is undefined.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
Returns the expiration time of the row.Returns a JSON string representation of the returned row, or null if the row does not exist.long
Returns the modification time of the row.int
Returns the read throughput consumed by this operation, in KBytes.int
Returns the read throughput consumed by this operation, in read units.getValue()
Returns the value of the returned row, or null if the row does not existReturns theVersion
of the row if the operation was successful, or null if the row does not exist.int
Returns the write throughput consumed by this operation, in KBytes.int
Returns the write throughput consumed by this operation, in write units.toString()
Methods inherited from class oracle.nosql.driver.ops.Result
getRateLimitDelayedMs, getRetryStats
-
Constructor Details
-
GetResult
public GetResult()
-
-
Method Details
-
getValue
Returns the value of the returned row, or null if the row does not exist- Returns:
- the value of the row, or null if it does not exist
-
getJsonValue
Returns a JSON string representation of the returned row, or null if the row does not exist.- Returns:
- the JSON string value of the row, or null if it does not exist
-
getVersion
Returns theVersion
of the row if the operation was successful, or null if the row does not exist.- Returns:
- the version of the row, or null if the row does not exist
-
getExpirationTime
public long getExpirationTime()Returns the expiration time of the row. A zero value indicates that the row does not expire. This value is valid only if the operation successfully returned a row (getValue()
returns non-null).- Returns:
- the expiration time in milliseconds since January 1, 1970, or zero if the row never expires or the row does not exist
-
getModificationTime
public long getModificationTime()Returns the modification time of the row. This value is valid only if the operation successfully returned a row (getValue()
returns non-null).- Returns:
- the modification time in milliseconds since January 1, 1970, or zero if the row does not exist
- Since:
- 5.3.0
-
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 if the operation usedConsistency.ABSOLUTE
- 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()
if the operation usedConsistency.ABSOLUTE
- 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
-
toString
-