@Test public void versionUpdatesForGetAfterRefreshMillis() throws InterruptedException { assertThat(supplier.get()).isEqualTo(VersionedType.of(0L, UNINITIALIZED_VERSION + 1L)); waitForUpdate(); assertThat(supplier.get()).isEqualTo(VersionedType.of(0L, UNINITIALIZED_VERSION + 2L)); waitForUpdate(); assertThat(supplier.get()).isEqualTo(VersionedType.of(0L, UNINITIALIZED_VERSION + 3L)); }
@Override public VersionedType<T> get() { return memoizedValue.get(); }
AggregatingVersionedSupplier implements Supplier<VersionedType<T>> { @Override public VersionedType<T> get() { return memoizedValue.get(); } }
AggregatingVersionedSupplier implements Supplier<VersionedType<T>> { @Override public VersionedType<T> get() { return memoizedValue.get(); } AggregatingVersionedSupplier(Function<Collection<T>, T> aggregator, long expirationMillis); }
AggregatingVersionedSupplier implements Supplier<VersionedType<T>> { @Override public VersionedType<T> get() { return memoizedValue.get(); } AggregatingVersionedSupplier(Function<Collection<T>, T> aggregator, long expirationMillis); static AggregatingVersionedSupplier<C> min(long expirationMillis); void update(Integer key, T value); @Override VersionedType<T> get(); }
AggregatingVersionedSupplier implements Supplier<VersionedType<T>> { @Override public VersionedType<T> get() { return memoizedValue.get(); } AggregatingVersionedSupplier(Function<Collection<T>, T> aggregator, long expirationMillis); static AggregatingVersionedSupplier<C> min(long expirationMillis); void update(Integer key, T value); @Override VersionedType<T> get(); static final long UNINITIALIZED_VERSION; }