Package org.voltdb.client
Interface ClientResponse
public interface ClientResponse
Interface implemented by the responses that are generated for procedure invocations
-
Field Summary
Modifier and TypeFieldDescriptionstatic final byte
An attempt to update the configuration failed; no change was made.static final byte
Status code indicating that the transaction failed in the client before it was sent to the VoltDB server.static final byte
Status code indicating that the request was timed out in the client before it could be sent to the VoltDB server.static final byte
Status code indicating that the request was timed out in the client while waiting for a response from the VoltDB server.static final byte
Status code indicating that a compound procedure is taking longer than a sufficiently large timeout.static final byte
Status indicating that a compound procedure was aborted by explicit action of the stored procedure.static final byte
Status code indicating the connection to the database that the invocation was queued at was lost before a response was received.static final byte
Status code indicating that the request didn't receive a response before the per-client timeout.static final byte
Status code indicating that a record in DR binary log could not be applied because a table could not be found for the table hash from the remote cluster.static final byte
An attempt to update the configuration failed for an unexpected reason; the configuration may have been partially updated.static final byte
Status code indicating the stored procedure failed and was rolled back.static final byte
Status code indicating that the transaction completed and did not roll back, but some part of the operation didn't succeed.static final byte
Status code indicating that the response was lost, and the outcome of the invocation is unknown.static final byte
Status code indicating that the server is currently unavailable for stored procedure invocations.static final byte
Status code indicating the store procedure executed successfullystatic final byte
This status is returned when you are running in mixed mode and a new sysproc needs all nodes to have certain specified capability.static final byte
Status code indicating that the transaction was sent to the wrong partition.static final byte
Status code indicating that the transaction is mis-routed.static final byte
Status code indicating that the transaction is being restarted.static final byte
Status code indicating the stored procedure failed (or may never have been successfully invoked) and that there may have been negative side effects on the serverstatic final byte
Default value for the user specified app status code fieldstatic final byte
An attempt was made to update the application catalog online, but the deployment contained changes that are not supported for online change.static final byte
Status code indicating the stored procedure executed successfully and was voluntarily aborted and rolled back by the stored procedure code -
Method Summary
Modifier and TypeMethodDescriptionbyte
Retrieve the status code returned by the stored procedure.Get aString
representation of any additional information the stored procedure may have included in the response.int
Get the amount of time it took to run the transaction through the Client API, database, and back to the callback.long
Get the amount of time it took to run the transaction through the Client API, database, and back to the callback.int
Get an estimate of the amount of time it took for the database to process the transaction from the time it was received at the initiating node to the time the initiating node got the response and queued it for transmission to the client.Get the array ofVoltTable
results returned by the stored procedure.byte
Retrieve the status code returned by the serverGet aString
representation of any additional information the server may have included in the response.
-
Field Details
-
SUCCESS
static final byte SUCCESSStatus code indicating the store procedure executed successfully- See Also:
-
USER_ABORT
static final byte USER_ABORTStatus code indicating the stored procedure executed successfully and was voluntarily aborted and rolled back by the stored procedure code- See Also:
-
GRACEFUL_FAILURE
static final byte GRACEFUL_FAILUREStatus code indicating the stored procedure failed and was rolled back. There are no negative server side side effects.- See Also:
-
UNEXPECTED_FAILURE
static final byte UNEXPECTED_FAILUREStatus code indicating the stored procedure failed (or may never have been successfully invoked) and that there may have been negative side effects on the server- See Also:
-
CONNECTION_LOST
static final byte CONNECTION_LOSTStatus code indicating the connection to the database that the invocation was queued at was lost before a response was received. It is possible that the invocation was sent, executed, and successfully committed before a response could be returned, or the invocation may never have been sent.- See Also:
-
SERVER_UNAVAILABLE
static final byte SERVER_UNAVAILABLEStatus code indicating that the server is currently unavailable for stored procedure invocations. The invocation for which this is a response was never executed.- See Also:
-
CONNECTION_TIMEOUT
static final byte CONNECTION_TIMEOUTStatus code indicating that the request didn't receive a response before the per-client timeout.This code is not used with the
Client2
interface, which uses distinctCLIENT_REQUEST_TIMEOUT
andCLIENT_RESPONSE_TIMEOUT
codes.- See Also:
-
RESPONSE_UNKNOWN
static final byte RESPONSE_UNKNOWNStatus code indicating that the response was lost, and the outcome of the invocation is unknown.- See Also:
-
TXN_RESTART
static final byte TXN_RESTARTStatus code indicating that the transaction is being restarted. These are used internally to Volt and shouldn't leak out to actual clients.- See Also:
-
OPERATIONAL_FAILURE
static final byte OPERATIONAL_FAILUREStatus code indicating that the transaction completed and did not roll back, but some part of the operation didn't succeed. For example, this is returned when a snapshot restore operation fails to restore one table out of many.- See Also:
-
TXN_MISPARTITIONED
static final byte TXN_MISPARTITIONEDStatus code indicating that the transaction was sent to the wrong partition. These are used internally to Volt and shouldn't leak out to actual clients.- See Also:
-
TXN_MISROUTED
static final byte TXN_MISROUTEDStatus code indicating that the transaction is mis-routed. The transaction will be restarted. Used in the SPI leader balance case.- See Also:
-
DR_TABLE_HASH_NOT_FOUND
static final byte DR_TABLE_HASH_NOT_FOUNDStatus code indicating that a record in DR binary log could not be applied because a table could not be found for the table hash from the remote cluster. Used internally only.- See Also:
-
UNSUPPORTED_DYNAMIC_CHANGE
static final byte UNSUPPORTED_DYNAMIC_CHANGEAn attempt was made to update the application catalog online, but the deployment contained changes that are not supported for online change. Reinitialization is required. This is a graceful failure.- See Also:
-
CLIENT_ERROR_TXN_NOT_SENT
static final byte CLIENT_ERROR_TXN_NOT_SENTStatus code indicating that the transaction failed in the client before it was sent to the VoltDB server. This status code is used for client errors other than timeouts.Currently used only with the
Client2
interface.- See Also:
-
CLIENT_REQUEST_TIMEOUT
static final byte CLIENT_REQUEST_TIMEOUTStatus code indicating that the request was timed out in the client before it could be sent to the VoltDB server.Currently used only with the
Client2
interface.- See Also:
-
CLIENT_RESPONSE_TIMEOUT
static final byte CLIENT_RESPONSE_TIMEOUTStatus code indicating that the request was timed out in the client while waiting for a response from the VoltDB server. No conclusion can be drawn about whether the transaction has been executed.Currently used only with the
Client2
interface.- See Also:
-
COMPOUND_PROC_USER_ABORT
static final byte COMPOUND_PROC_USER_ABORTStatus indicating that a compound procedure was aborted by explicit action of the stored procedure. No rollback was performed; transactions submitted by the procedure and successfully completed remain committed.- See Also:
-
COMPOUND_PROC_TIMEOUT
static final byte COMPOUND_PROC_TIMEOUTStatus code indicating that a compound procedure is taking longer than a sufficiently large timeout. The procedure may either be slow, deadlocked, or looping infinitely. The timeout response is sent even if the procedure subsequently completes.- See Also:
-
SYSPROC_UNAVAILABLE_IN_MIXED_MODE
static final byte SYSPROC_UNAVAILABLE_IN_MIXED_MODEThis status is returned when you are running in mixed mode and a new sysproc needs all nodes to have certain specified capability.- See Also:
-
CANNOT_UPDATE_CONFIG
static final byte CANNOT_UPDATE_CONFIGAn attempt to update the configuration failed; no change was made. See alsoUNSUPPORTED_DYNAMIC_CHANGE
.- See Also:
-
FAILED_CONFIG_UPDATE
static final byte FAILED_CONFIG_UPDATEAn attempt to update the configuration failed for an unexpected reason; the configuration may have been partially updated.- See Also:
-
UNINITIALIZED_APP_STATUS_CODE
static final byte UNINITIALIZED_APP_STATUS_CODEDefault value for the user specified app status code field- See Also:
-
-
Method Details
-
getStatus
byte getStatus()Retrieve the status code returned by the server- Returns:
- Status code
-
getAppStatus
byte getAppStatus()Retrieve the status code returned by the stored procedure. This code is generated by the application and not VoltDB. The default value is -128.- Returns:
- Status code
-
getResults
VoltTable[] getResults()Get the array ofVoltTable
results returned by the stored procedure.- Returns:
- An array of results. Will never be
null
, but may be length 0.
-
getStatusString
String getStatusString()Get aString
representation of any additional information the server may have included in the response. This may be an stack trace, error message, etc.- Returns:
- A message or
null
if there is none.
-
getAppStatusString
String getAppStatusString()Get aString
representation of any additional information the stored procedure may have included in the response. This may be an stack trace, error message, etc. This is generated by the application and not VoltDB. The default value is null.- Returns:
- A message or
null
if there is none.
-
getClusterRoundtrip
int getClusterRoundtrip()Get an estimate of the amount of time it took for the database to process the transaction from the time it was received at the initiating node to the time the initiating node got the response and queued it for transmission to the client. This time is an ESTIMATE- Returns:
- Time in milliseconds the procedure spent in the cluster
-
getClientRoundtrip
int getClientRoundtrip()Get the amount of time it took to run the transaction through the Client API, database, and back to the callback.- Returns:
- Time in milliseconds the procedure took to roundtrip from the client to the server
-
getClientRoundtripNanos
long getClientRoundtripNanos()Get the amount of time it took to run the transaction through the Client API, database, and back to the callback.- Returns:
- Time in nanoseconds the procedure took to roundtrip from the client to the server
-