Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Berkeley DB Java Edition version 4.0.103
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Berkeley DB Java Edition version 4.0.103
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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