Global

Members

ReplicaAckPolicy :Number

A replicated environment makes it possible to increase the application's transaction commit guarantees by committing changes to its replicas on the network. ReplicaAckPolicy defines the policy for how such network commits are handled.
Type:
  • Number
Properties:
Name Type Description
ALL Number All replicas must acknowledge that they have committed the transaction.
NONE Number No transaction commit acknowledgments are required and the master will never wait for replica acknowledgments.
SIMPLE_MAJORITY Number A simple majority of replicas must acknowledge that they have committed the transaction.
ALL Number
NONE Number
SIMPLE_MAJORITY Number
Source:

ReturnChoice :Number

Specifies whether to return the row value, version, both or neither. For best performance, it is important to choose only the properties that are required. The store is optimized to avoid I/O when the requested properties are in cache.
Type:
  • Number
Properties:
Name Type Description
ALL Number Return both the value and the version.
NONE Number Do not return the value or the version.
VALUE Number Return the value only.
VERSION Number Return the version only.
ALL Number
NONE Number
VALUE Number
VERSION Number
Source:

SimpleConsistency :Number

Used to provide consistency guarantees for read operations. In general, read operations may be serviced either at a Master or Replica node. When serviced at the Master node, consistency is always absolute. If absolute consistency is required, ABSOLUTE may be specified to force the operation to be serviced at the Master. For other types of consistency, when the operation is serviced at a Replica node, the transaction will not begin until the consistency policy is satisfied. The Consistency is specified as an argument to all read operations, for example, get.
Type:
  • Number
Properties:
Name Type Description
ABSOLUTE Number A consistency policy that requires that a transaction be serviced on the Master so that consistency is absolute.
NONE_REQUIRED Number A consistency policy that lets a transaction on a replica using this policy proceed regardless of the state of the Replica relative to the Master.
NONE_REQUIRED_NO_MASTER Number A consistency policy that requires that a read operation be serviced on a replica; never the Master.
ABSOLUTE Number
NONE_REQUIRED Number
NONE_REQUIRED_NO_MASTER Number
Source:

SyncPolicy :Number

Defines the synchronization policy to be used when committing a transaction. High levels of synchronization offer a greater guarantee that the transaction is persistent to disk, but the tradeoff is lower performance.
Type:
  • Number
Properties:
Name Type Description
NO_SYNC Number Do not write or synchronously flush the log on transaction commit.
SYNC Number Write and synchronously flush the log on transaction commit.
WRITE_NO_SYNC Number Write but do not synchronously flush the log on transaction commit.
NO_SYNC Number
SYNC Number
WRITE_NO_SYNC Number
Source:

Methods

AuthenticationFailureException()

This exception is thrown if an application passes invalid credentials to an authentication operation.
Source:

AuthenticationRequiredException()

This exception is thrown when a secured operation is attempted and the client is not currently authenticated. It can occur if login credentials were specified, but the login session has expired, requiring that the client reauthenticate itself.
Source:

ConsistencyException()

Returned when a single or multiple-operation transaction fails because the specified Consistency could not be met, within the allowed timeout period. The likelihood of this exception being thrown depends on the specified Consistency and the general health of the KVStore system. The default consistency policy is SimpleConsistency.NONE_REQUIRED. With SimpleConsistency.NONE_REQUIRED (the default), SimpleConsistency.NONE_REQUIRED_NO_MASTER, or SimpleConsistency.ABSOLUTE, this exception will never be thrown. If the client overrides the default and specifies a TimeConsistency or VersionConsistency setting, then this exception will be thrown when the specified consistency requirement cannot be satisfied within the timeout period associated with the consistency setting. If this exception is encountered frequently, it indicates that the consistency policy requirements are too strict and cannot be met routinely given the load being placed on the system and the hardware resources that are available to service the load. Depending on the nature of the application, when this exception is thrown the client may wish to - retry the read operation, - fall back to using a larger timeout or a less restrictive consistency setting (for example, SimpleConsistency.NONE_REQUIRED), and resume using the original consistency setting at a later time, or - give up and report an error at a higher level.
Source:

DurabilityException()

Returned when write operations cannot be initiated because a quorum of Replicas as determined by the Durability.ReplicaAckPolicy was not available. The likelihood of this exception being thrown depends on the number of nodes per replication group, the rate of node failures and how quickly a failed node is restored to operation, and the specified ReplicaAckPolicy. The ReplicaAckPolicy for the default durability policy is Durability.ReplicaAckPolicy.SIMPLE_MAJORITY. With SIMPLE_MAJORITY, this exception is thrown only when the majority of nodes in a replication group are unavailable, and in a well-maintained KVStore system with at least three nodes per replication group this exception should rarely be thrown. If the client overrides the default and specifies Durability.ReplicaAckPolicy.ALL, then this exception will be thrown when any node in a replication group is unavailable; in other words, it is much more likely to be thrown. If the client specifies Durability.ReplicaAckPolicy.NONE, then this exception will never be thrown. When this exception is thrown the KVStore service will perform administrative notifications so that actions can be taken to correct the problem. Depending on the nature of the application, the client may wish to: - retry the write operation immediately, - fall back to a read-only mode and resume write operations at a later time, or - give up and report an error at a higher level.
Source:

FaultException()

Used to indicate an error condition that cannot normally be handled by the caller of the method, except by retrying the operation. When the error occurred remotely and was due to an internally defined server exception. When the error occurred remotely, it will have already been logged and reported on a remote KVStore node and will be available to administrators. However, to correlate client and server errors and to make error information easily accessible on the client, it is good practice to also log the error locally. Errors that originated locally are not automatically logged and available to administrators, and the client application is responsible for reporting them.
Source:

IllegalArgumentException()

Returned when any of the arguments sent to the server is wrong.
Source:

readConfiguration(filename) → {Configuration}

Tries to read a file with a ProxyConfiguration object
Parameters:
Name Type Description
filename string the full path for the file
Source:
Returns:
Type
Configuration

RequestLimitException()

Thrown when a request cannot be processed because it would exceed the maximum number of active requests for a node as configured by -request-limit.
Source:

RequestTimeoutException()

Returned when a request cannot be processed because the configured timeout interval is exceeded. The default timeout interval is five seconds, and this exception should rarely be thrown. Note that the durability of an update operation is uncertain if it results in a RequestTimeoutException being thrown. The changes requested by the update may or may not have been committed to the master or propagated to one or more replicas. Applications may want to retry the update operation if it is idempotent, or perform read operations to determine the outcome of the previous update. Note also that if the consistency specified for a read operation is Consistency.NONE_REQUIRED_NO_MASTER, then this exception will be thrown if the operation is attempted when the only node available is the Master. Depending on the nature of the application, when this exception is thrown the client may wish to: - retry the operation, - fall back to using a larger timeout interval, and resume using the original timeout interval at a later time, or - give up and report an error at a higher level.
Source:

startProxy(configuration, callback)

Starts a proxy with the specified configuration.
Parameters:
Name Type Description
configuration Configuration The configuration object used to start or connect to a proxy.
callback function Function called after the proxy is started.
Source:

stopProxy(proxyConfiguration, callback)

Shutdown the proxy. If a proxy is running, this method will shutdown it.
Parameters:
Name Type Description
proxyConfiguration ProxyConfiguration the configuration used to start the proxy.
callback function Function called after trying to shutdown the proxy.
Source:

TableOpExecutionException()

Used to indicate a failure in executeUpdates.
Source:

UnauthorizedException()

This exception is thrown from methods where an authenticated user is attempting to perform an operation for which they are not authorized. An application that receives this exception typically should not retry the operation.
Source:

UnknownException()

This exception is thrown when a non recognized error is received from the proxy.
Source:

Type Definitions

cancelCallback(error, result)

Parameters:
Name Type Description
error Error The error returned by the operation, if any, null otherwise.
result bool A flag indicating if the process could be canceled.
Source:

closeIteratorCallback(error)

Parameters:
Name Type Description
error Error The error returned by the operation, if any, null otherwise.
Source:

deleteCallback(error, result)

Parameters:
Name Type Description
error Error The error returned by the operation, if any, null otherwise.
result DeleteResult The result associated with this operation.
Source:

executeFutureCallback(error, result)

Parameters:
Name Type Description
error Error The error returned by the operation, if any, null otherwise.
result ExecutionFuture A statementResult object with information about the process.
Source:

executeUpdatesCallback(error, result)

Parameters:
Name Type Description
error Error The error returned by the operation, if any, null otherwise.
result UpdateResult A statementResult object with information about the process.
Source:

getCallback(error, result)

Parameters:
Name Type Description
error Error The error returned by the operation, if any, null otherwise.
result GetResult The result associated with this operation.
Source:

getCallback(error, result)

Parameters:
Name Type Description
error Error The error returned by the operation, if any, null otherwise.
result ExecutionFuture A statementResult object with information about the process.
Source:

iteratorCallback(error, result)

Parameters:
Name Type Description
error Error The error returned by the operation, if any, null otherwise.
result Iterator An Iterator object with the item results for this call.
Source:

multiDeleteCallback(error, result)

Parameters:
Name Type Description
error Error The error returned by the operation, if any, null otherwise.
result Number The number of rows deleted by this operation.
Source:

multiGetCallback(error, result)

Parameters:
Name Type Description
error Error The error returned by the operation, if any, null otherwise.
result MultiGetResult The result associated with this operation.
Source:

multiGetKeysCallback(error, result)

Parameters:
Name Type Description
error Error The error returned by the operation, if any, null otherwise.
result MultiGetKeyResult The result associated with this operation.
Source:

openCallback(error)

Parameters:
Name Type Description
error Error The error returned by the operation, if any, null otherwise.
Source:

putCallback(error, result)

Parameters:
Name Type Description
error Error The error returned by the operation, if any, null otherwise.
result PutResult The result associated with this operation.
Source:

rowCallback(error, result)

Parameters:
Name Type Description
error Error The error returned by the operation, if any, null otherwise.
result ReturnRow A result Object object with the row and metadata as result.
Source:

shutdownProxyCallback(error)

Parameters:
Name Type Description
error Error The error returned by the operation, if any, null otherwise.
Source:

streamCallback(error, result)

Parameters:
Name Type Description
error Error The error returned by the operation, if any, null otherwise.
result Readable A Stream object with the result of this operation.
Source:

updateStatusCallback(error, result)

Parameters:
Name Type Description
error Error The error returned by the operation, if any, null otherwise.
result ExecutionFuture A statementResult object with information about the process.
Source:

versionCallback(error, result)

Parameters:
Name Type Description
error Error The error returned by the operation, if any, null otherwise.
result String A String with the result of this operation.
Source: