Skip to content

Commit

Permalink
Default read consistency to ATOMIC.
Browse files Browse the repository at this point in the history
  • Loading branch information
kuujo committed Feb 13, 2016
1 parent 06ff761 commit ee55f90
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions core/src/test/java/io/atomix/AtomixClientTest.java
Expand Up @@ -89,8 +89,8 @@ public void testSubmitQueryWithSequentialConsistency() throws Throwable {
/**
* Tests submitting a query.
*/
public void testSubmitQueryWithOptimizedAtomicConsistency() throws Throwable {
testSubmitQuery(ReadConsistency.OPTIMIZED_ATOMIC);
public void testSubmitQueryWithAtomicLeaseConsistency() throws Throwable {
testSubmitQuery(ReadConsistency.ATOMIC_LEASE);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions core/src/test/java/io/atomix/AtomixReplicaTest.java
Expand Up @@ -90,8 +90,8 @@ public void testSubmitQueryWithSequentialConsistency() throws Throwable {
/**
* Tests submitting a query.
*/
public void testSubmitQueryWithOptimizedAtomicConsistency() throws Throwable {
testSubmitQuery(ReadConsistency.OPTIMIZED_ATOMIC);
public void testSubmitQueryWithAtomicLeaseConsistency() throws Throwable {
testSubmitQuery(ReadConsistency.ATOMIC_LEASE);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions resource/src/main/java/io/atomix/resource/Resource.java
Expand Up @@ -156,7 +156,7 @@ public enum State {
private State state;
private final Set<StateChangeListener> changeListeners = new CopyOnWriteArraySet<>();
private WriteConsistency writeConsistency = WriteConsistency.ATOMIC;
private ReadConsistency readConsistency = ReadConsistency.OPTIMIZED_ATOMIC;
private ReadConsistency readConsistency = ReadConsistency.ATOMIC;

protected Resource(CopycatClient client, Options options) {
this.type = new ResourceType(getClass());
Expand Down Expand Up @@ -284,7 +284,7 @@ public T with(WriteConsistency consistency) {
* Returns the configured read consistency level.
* <p>
* Resource consistency levels are configured via the {@link #with(ReadConsistency)} setter. By default,
* all resources submit commands under the {@link ReadConsistency#OPTIMIZED_ATOMIC} consistency level. See the
* all resources submit commands under the {@link ReadConsistency#ATOMIC} consistency level. See the
* {@link ReadConsistency} documentation for information about guarantees provided by specific consistency
* levels.
*
Expand Down

0 comments on commit ee55f90

Please sign in to comment.