Package oracle.nosql.driver.ops
Class GetResult
- java.lang.Object
-
- oracle.nosql.driver.ops.Result
-
- oracle.nosql.driver.ops.GetResult
-
public class GetResult extends Result
Represents the result of aNoSQLHandle.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
Constructors Constructor Description GetResult()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getExpirationTime()
Returns the expiration time of the row.String
getJsonValue()
Returns a JSON string representation of the returned row, or null if the row does not exist.long
getModificationTime()
Returns the modification time of the row.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.MapValue
getValue()
Returns the value of the returned row, or null if the row does not existVersion
getVersion()
Returns theVersion
of the row if the operation was successful, or null if the row does not exist.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.void
setClient(oracle.nosql.driver.http.Client client)
String
toString()
-
Methods inherited from class oracle.nosql.driver.ops.Result
getRateLimitDelayedMs, getRetryStats
-
-
-
-
Method Detail
-
getValue
public MapValue 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
public String 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
public Version 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
-
setClient
public void setClient(oracle.nosql.driver.http.Client client)
-
-