public class LRUCache extends Cache
nativeHandle_owningHandle_| Constructor and Description |
|---|
LRUCache(long capacity)
Create a new cache with a fixed size capacity
|
LRUCache(long capacity,
int numShardBits)
Create a new cache with a fixed size capacity.
|
LRUCache(long capacity,
int numShardBits,
boolean strictCapacityLimit)
Create a new cache with a fixed size capacity.
|
LRUCache(long capacity,
int numShardBits,
boolean strictCapacityLimit,
double highPriPoolRatio)
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 LRUCache(long capacity)
capacity - The fixed size capacity of the cachepublic LRUCache(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 LRUCache(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 fullpublic LRUCache(long capacity,
int numShardBits,
boolean strictCapacityLimit,
double highPriPoolRatio)
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 fullhighPriPoolRatio - percentage of the cache reserves for high priority
entriesprotected final void disposeInternal(long handle)
disposeInternal in class RocksObjectCopyright © 2022. All rights reserved.