AutoCloseable, CachedSupplier.PrefetchStrategypublic 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.
|
closepublic void prefetch(Runnable valueUpdater)
CachedSupplier.PrefetchStrategyprefetch in interface CachedSupplier.PrefetchStrategyCopyright © 2017 Amazon Web Services, Inc. All Rights Reserved.