public final class SyncFutureCache extends Object
SyncFutures. This class supports two methods
getIfPresentOrNew() and offer(
org.apache.hadoop.hbase.regionserver.wal.SyncFuture).
Usage pattern:
SyncFuture sf = syncFutureCache.getIfPresentOrNew();
sf.reset(...);
// Use the sync future
finally: syncFutureCache.offer(sf);
Offering the sync future back to the cache makes it eligible for reuse within the same thread
context. Cache keyed by the accessing thread instance and automatically invalidated if it remains
unused for SYNC_FUTURE_INVALIDATION_TIMEOUT_MINS minutes.| Constructor and Description |
|---|
SyncFutureCache(org.apache.hadoop.conf.Configuration conf) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
org.apache.hadoop.hbase.regionserver.wal.SyncFuture |
getIfPresentOrNew() |
void |
offer(org.apache.hadoop.hbase.regionserver.wal.SyncFuture syncFuture)
Offers the sync future back to the cache for reuse.
|
Copyright © 2007–2022 The Apache Software Foundation. All rights reserved.