Berkeley DB Java Edition
version 5.0.34

com.sleepycat.je
Interface ReplicaConsistencyPolicy

All Known Implementing Classes:
CommitPointConsistencyPolicy, NoConsistencyRequiredPolicy, TimeConsistencyPolicy

public interface ReplicaConsistencyPolicy

The interface for Consistency policies used to provide consistency guarantees at a Replica. ReplicaConsistencyPolicies are only used by Berkeley DB JE High Availability.

A transaction initiated at a Replica will wait in the Environment.beginTransaction(com.sleepycat.je.Transaction, com.sleepycat.je.TransactionConfig) method until the consistency policy is satisfied. Consistency policies are specified at either a per-transaction level through TransactionConfig.setConsistencyPolicy(com.sleepycat.je.ReplicaConsistencyPolicy) or as an replication node wide default through ReplicationConfig.setConsistencyPolicy(com.sleepycat.je.ReplicaConsistencyPolicy)

See Also:
Managing Consistency

Method Summary
 String getName()
          Returns the name used to identify the policy.
 long getTimeout(TimeUnit unit)
          The timeout associated with the consistency policy.
 

Method Detail

getName

String getName()
Returns the name used to identify the policy. The name is used when constructing policy property values for use in je.properties files.


getTimeout

long getTimeout(TimeUnit unit)
The timeout associated with the consistency policy. If consistency cannot be established by the Replica within the timeout period, a ReplicaConsistencyException is thrown by Environment.beginTransaction(com.sleepycat.je.Transaction, com.sleepycat.je.TransactionConfig).

Returns:
the timeout associated with the policy

Berkeley DB Java Edition
version 5.0.34

Copyright (c) 2004-2011 Oracle. All rights reserved.