Skip to content

Commit

Permalink
Another rename (copyReset -> copyWithZeroedValue)
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettjonesgoogle committed Mar 21, 2016
1 parent 4a252ad commit fc5b21a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ public interface ExternalThreshold<E> {


/**
* Make a copy of this threshold with the accumulated value reset.
* Make a copy of this threshold but with the accumulated value zeroed.
*
* Any calls into this function from ThresholdBundler will be under a lock.
*/
ExternalThreshold<E> copyReset();
ExternalThreshold<E> copyWithZeroedValue();

}
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ private static <E> ImmutableList<ExternalThreshold<E>> copyResetExternalThreshol
ImmutableList.Builder<ExternalThreshold<E>> resetThresholds =
ImmutableList.<ExternalThreshold<E>>builder();
for (ExternalThreshold<E> threshold : thresholds) {
resetThresholds.add(threshold.copyReset());
resetThresholds.add(threshold.copyWithZeroedValue());
}
return resetThresholds.build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public void handleEvent(ThresholdBundleHandle bundleHandle, Object event) {
}

@Override
public ExternalThreshold<E> copyReset() {
public ExternalThreshold<E> copyWithZeroedValue() {
return new BlockingCallThreshold<E>(threshold);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ public void handleEvent(ThresholdBundleHandle bundleHandle, Object event) {
}

@Override
public ExternalThreshold<Integer> copyReset() {
public ExternalThreshold<Integer> copyWithZeroedValue() {
// No state is kept, so this is safe
return this;
}
Expand Down

0 comments on commit fc5b21a

Please sign in to comment.