AutoCloseable
, CachedSupplier.PrefetchStrategy
public class OneCallerBlocks extends Object implements CachedSupplier.PrefetchStrategy
CachedSupplier.PrefetchStrategy
that will have one caller at a time block to update the value.
Multiple calls to prefetch(Runnable)
will result in only one caller actually performing the update, with the others
immediately returning.Constructor | Description |
---|---|
OneCallerBlocks() |
Modifier and Type | Method | Description |
---|---|---|
void |
prefetch(Runnable valueUpdater) |
Execute the provided value updater to update the cache.
|
close
public void prefetch(Runnable valueUpdater)
CachedSupplier.PrefetchStrategy
prefetch
in interface CachedSupplier.PrefetchStrategy
Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.