public class ClockCache extends Cache
LRUCache, but based on the CLOCK algorithm with
better concurrent performance in some casesnativeHandle_owningHandle_| Constructor and Description |
|---|
ClockCache(long capacity)
Create a new cache with a fixed size capacity.
|
ClockCache(long capacity,
int numShardBits)
Create a new cache with a fixed size capacity.
|
ClockCache(long capacity,
int numShardBits,
boolean strictCapacityLimit)
Create a new cache with a fixed size capacity.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
disposeInternal(long handle) |
getPinnedUsage, getUsagedisposeInternal, getNativeHandleclose, disOwnNativeHandle, isOwningHandlepublic ClockCache(long capacity)
capacity - The fixed size capacity of the cachepublic ClockCache(long capacity,
int numShardBits)
capacity - The fixed size capacity of the cachenumShardBits - The cache is sharded to 2^numShardBits shards,
by hash of the keypublic ClockCache(long capacity,
int numShardBits,
boolean strictCapacityLimit)
capacity - The fixed size capacity of the cachenumShardBits - The cache is sharded to 2^numShardBits shards,
by hash of the keystrictCapacityLimit - insert to the cache will fail when cache is fullprotected final void disposeInternal(long handle)
disposeInternal in class RocksObjectCopyright © 2022. All rights reserved.