Skip to content

Commit

Permalink
Minor cleanup before release
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-manes committed Apr 3, 2016
1 parent d40f0a1 commit ceea49e
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2852,8 +2852,7 @@ final class BoundedExpireAfterAccess implements Expiration<K, V> {
@Override public void setExpiresAfter(long duration, TimeUnit unit) {
Caffeine.requireArgument(duration >= 0);
cache.setExpiresAfterAccessNanos(unit.toNanos(duration));
cache.drainBuffersTask.reinitialize();
cache.executor().execute(cache.drainBuffersTask);
cache.scheduleAfterWrite();
}
@Override public Map<K, V> oldest(int limit) {
return cache.expireAfterAcessOrder(limit, transformer, true);
Expand Down Expand Up @@ -2881,8 +2880,7 @@ final class BoundedExpireAfterWrite implements Expiration<K, V> {
@Override public void setExpiresAfter(long duration, TimeUnit unit) {
Caffeine.requireArgument(duration >= 0);
cache.setExpiresAfterWriteNanos(unit.toNanos(duration));
cache.drainBuffersTask.reinitialize();
cache.executor().execute(cache.drainBuffersTask);
cache.scheduleAfterWrite();
}
@Override public Map<K, V> oldest(int limit) {
return cache.expireAfterWriteOrder(limit, transformer, true);
Expand Down Expand Up @@ -2910,8 +2908,7 @@ final class BoundedRefreshAfterWrite implements Expiration<K, V> {
@Override public void setExpiresAfter(long duration, TimeUnit unit) {
Caffeine.requireArgument(duration >= 0);
cache.setRefreshAfterWriteNanos(unit.toNanos(duration));
cache.drainBuffersTask.reinitialize();
cache.executor().execute(cache.drainBuffersTask);
cache.scheduleAfterWrite();
}
@SuppressWarnings("PMD.SimplifiedTernary") // false positive (#1424)
@Override public Map<K, V> oldest(int limit) {
Expand Down

0 comments on commit ceea49e

Please sign in to comment.