com.aerospike.client.policy
Class Policy

java.lang.Object
  extended by com.aerospike.client.policy.Policy
Direct Known Subclasses:
QueryPolicy, ScanPolicy, WritePolicy

public class Policy
extends Object

Container object for transaction policy attributes used in all database operation calls.


Field Summary
 int maxRetries
          Maximum number of retries before aborting the current transaction.
 Priority priority
          Priority of request relative to other transactions.
 int sleepBetweenRetries
          Milliseconds to sleep between retries if a transaction fails and the timeout was not exceeded.
 int timeout
          Transaction timeout in milliseconds.
 
Constructor Summary
Policy()
           
 
Method Summary
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

priority

public Priority priority
Priority of request relative to other transactions. Currently, only used for scans.


timeout

public int timeout
Transaction timeout in milliseconds. This timeout is used to set the socket timeout and is also sent to the server along with the transaction in the wire protocol. Default to no timeout (0).


maxRetries

public int maxRetries
Maximum number of retries before aborting the current transaction. A retry is attempted when there is a network error other than timeout. If maxRetries is exceeded, the abort will occur even if the timeout has not yet been exceeded.


sleepBetweenRetries

public int sleepBetweenRetries
Milliseconds to sleep between retries if a transaction fails and the timeout was not exceeded. Enter zero to skip sleep.

Constructor Detail

Policy

public Policy()


Copyright © 2012–2014 Aerospike, Inc. All rights reserved.