Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  * See the file LICENSE for redistribution information.
  * Copyright (c) 2002, 2013 Oracle and/or its affiliates.  All rights reserved.
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(, method until the consistency policy is satisfied. Consistency policies are specified at either a per-transaction level through TransactionConfig.setConsistencyPolicy( or as an replication node wide default through

See also:
Managing Consistency
public interface ReplicaConsistencyPolicy {


repInstance identifies the replicated environment that must meet this consistency requirement.
For internal use only. Ensures that the replica is within the constraints specified by this policy. If it isn't the method waits until the constraint is satisfied by the replica.
    public void ensureConsistency(EnvironmentImpl repInstance)
        throws InterruptedException;

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

The timeout associated with the consistency policy. If consistency cannot be established by the Replica within the timeout period, a is thrown by Environment.beginTransaction(,

the timeout associated with the policy
    public long getTimeout(TimeUnit unit);
New to GrepCode? Check out our FAQ X