Class SyncFutureCache
java.lang.Object
org.apache.hadoop.hbase.regionserver.wal.SyncFutureCache
A cache of
SyncFuture
s. This class supports two methods
getIfPresentOrNew()
and offer(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.-
Field Summary
Modifier and TypeFieldDescriptionprivate static final long
private final org.apache.hbase.thirdparty.com.google.common.cache.Cache<Thread,
SyncFuture> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
void
offer
(SyncFuture syncFuture) Offers the sync future back to the cache for reuse.
-
Field Details
-
SYNC_FUTURE_INVALIDATION_TIMEOUT_MINS
- See Also:
-
syncFutureCache
private final org.apache.hbase.thirdparty.com.google.common.cache.Cache<Thread,SyncFuture> syncFutureCache
-
-
Constructor Details
-
SyncFutureCache
-
-
Method Details
-
getIfPresentOrNew
-
offer
Offers the sync future back to the cache for reuse. -
clear
-