public interface ReplicaConsistencyPolicy
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)
Modifier and Type | Method and Description |
---|---|
void |
ensureConsistency(com.sleepycat.je.dbi.EnvironmentImpl repInstance) |
String |
getName()
Returns the name used to identify the policy.
|
long |
getTimeout(TimeUnit unit)
The timeout associated with the consistency policy.
|
void ensureConsistency(com.sleepycat.je.dbi.EnvironmentImpl repInstance) throws InterruptedException
repInstance
- identifies the replicated environment that must meet
this consistency requirement.InterruptedException
String getName()
long getTimeout(TimeUnit unit)
ReplicaConsistencyException
is thrown by Environment.beginTransaction(com.sleepycat.je.Transaction, com.sleepycat.je.TransactionConfig)
.Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.