Skip to content

Commit

Permalink
Refactor time APIs for new method naming standards.
Browse files Browse the repository at this point in the history
  • Loading branch information
kuujo committed Jun 23, 2017
1 parent 298663c commit 5c746ef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions time/src/main/java/io/atomix/time/VectorClock.java
Expand Up @@ -59,7 +59,7 @@ public VectorTimestamp<T> getTime() {
* *
* @return the logical timestamp for the local identifier * @return the logical timestamp for the local identifier
*/ */
public LogicalTimestamp localTimestamp() { public LogicalTimestamp getLocalTimestamp() {
return getTime(); return getTime();
} }


Expand All @@ -69,7 +69,7 @@ public LogicalTimestamp localTimestamp() {
* @param identifier the identifier for which to return the timestamp * @param identifier the identifier for which to return the timestamp
* @return the logical timestamp for the given identifier * @return the logical timestamp for the given identifier
*/ */
public LogicalTimestamp timestamp(T identifier) { public LogicalTimestamp getTimestamp(T identifier) {
return vector.get(identifier); return vector.get(identifier);
} }


Expand All @@ -78,7 +78,7 @@ public LogicalTimestamp timestamp(T identifier) {
* *
* @return a collection of identifier-timestamp pairs * @return a collection of identifier-timestamp pairs
*/ */
public Collection<VectorTimestamp<T>> vector() { public Collection<VectorTimestamp<T>> getTimestamps() {
return vector.values(); return vector.values();
} }


Expand Down Expand Up @@ -109,7 +109,7 @@ public void update(VectorClock<T> clock) {
public String toString() { public String toString() {
return toStringHelper(this) return toStringHelper(this)
.add("time", getTime()) .add("time", getTime())
.add("vector", vector()) .add("vector", getTimestamps())
.toString(); .toString();
} }
} }
Expand Up @@ -23,7 +23,7 @@
* Retry utilities. * Retry utilities.
*/ */
public final class Retries { public final class Retries {
static final Random random = new Random(); private static final Random random = new Random();


/** /**
* Returns a function that retries execution on failure. * Returns a function that retries execution on failure.
Expand Down

0 comments on commit 5c746ef

Please sign in to comment.