Berkeley DB Java Edition
version 5.0.34

com.sleepycat.je.rep
Class NoConsistencyRequiredPolicy

java.lang.Object
  extended by com.sleepycat.je.rep.NoConsistencyRequiredPolicy
All Implemented Interfaces:
ReplicaConsistencyPolicy

public class NoConsistencyRequiredPolicy
extends Object
implements ReplicaConsistencyPolicy

A consistency policy that lets a transaction on a replica using this policy proceed regardless of the state of the Replica relative to the Master. It can also be used to access a database when a replication node is in a DETACHED state.

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

Field Summary
static String NAME
          The name:"NoConsistencyRequiredPolicy" associated with this policy.
static NoConsistencyRequiredPolicy NO_CONSISTENCY
          Convenience instance.
 
Constructor Summary
NoConsistencyRequiredPolicy()
          Create a NoConsistencyRequiredPolicy.
 
Method Summary
 void ensureConsistency(com.sleepycat.je.dbi.EnvironmentImpl repInstance)
           
 boolean equals(Object obj)
           
 String getName()
          Returns the name:"NoConsistencyRequiredPolicy", associated with this policy.
 long getTimeout(TimeUnit unit)
          Always returns 0, no timeout is needed for this policy.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static final String NAME
The name:"NoConsistencyRequiredPolicy" associated with this policy. The name can be used when constructing policy property values for use in je.properties files.

See Also:
Constant Field Values

NO_CONSISTENCY

public static final NoConsistencyRequiredPolicy NO_CONSISTENCY
Convenience instance.

Constructor Detail

NoConsistencyRequiredPolicy

public NoConsistencyRequiredPolicy()
Create a NoConsistencyRequiredPolicy.

Method Detail

getName

public String getName()
Returns the name:"NoConsistencyRequiredPolicy", associated with this policy.

Specified by:
getName in interface ReplicaConsistencyPolicy
See Also:
NAME

ensureConsistency

public void ensureConsistency(com.sleepycat.je.dbi.EnvironmentImpl repInstance)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

getTimeout

public long getTimeout(TimeUnit unit)
Always returns 0, no timeout is needed for this policy.

Specified by:
getTimeout in interface ReplicaConsistencyPolicy
Returns:
the timeout associated with the policy

Berkeley DB Java Edition
version 5.0.34

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