Package org.rocksdb
Class ClockCache
- java.lang.Object
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class ClockCache extends Cache
Deprecated.The old Clock Cache implementation had an unresolved bug and has been removed. The new HyperClockCache requires an additional configuration parameter that is not provided by this API. This function simply returns a new LRUCache for functional compatibility.Similar toLRUCache, but based on the CLOCK algorithm with better concurrent performance in some cases
-
-
Field Summary
-
Fields inherited from class org.rocksdb.RocksObject
nativeHandle_
-
Fields inherited from class org.rocksdb.AbstractImmutableNativeReference
owningHandle_
-
-
Constructor Summary
Constructors Constructor Description ClockCache(long capacity)Deprecated.The old Clock Cache implementation had an unresolved bug and has been removed.ClockCache(long capacity, int numShardBits)Deprecated.The old Clock Cache implementation had an unresolved bug and has been removed.ClockCache(long capacity, int numShardBits, boolean strictCapacityLimit)Deprecated.The old Clock Cache implementation had an unresolved bug and has been removed.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voiddisposeInternal(long handle)Deprecated.-
Methods inherited from class org.rocksdb.Cache
getPinnedUsage, getUsage
-
Methods inherited from class org.rocksdb.RocksObject
disposeInternal, getNativeHandle
-
Methods inherited from class org.rocksdb.AbstractImmutableNativeReference
close, disOwnNativeHandle, isOwningHandle
-
-
-
-
Constructor Detail
-
ClockCache
public ClockCache(long capacity)
Deprecated.The old Clock Cache implementation had an unresolved bug and has been removed.Create a new cache with a fixed size capacity.- Parameters:
capacity- The fixed size capacity of the cache
-
ClockCache
public ClockCache(long capacity, int numShardBits)Deprecated.The old Clock Cache implementation had an unresolved bug and has been removed.Create a new cache with a fixed size capacity. The cache is sharded to 2^numShardBits shards, by hash of the key. The total capacity is divided and evenly assigned to each shard. numShardBits = -1 means it is automatically determined: every shard will be at least 512KB and number of shard bits will not exceed 6.- Parameters:
capacity- The fixed size capacity of the cachenumShardBits- The cache is sharded to 2^numShardBits shards, by hash of the key
-
ClockCache
public ClockCache(long capacity, int numShardBits, boolean strictCapacityLimit)Deprecated.The old Clock Cache implementation had an unresolved bug and has been removed.Create a new cache with a fixed size capacity. The cache is sharded to 2^numShardBits shards, by hash of the key. The total capacity is divided and evenly assigned to each shard. If strictCapacityLimit is set, insert to the cache will fail when cache is full. numShardBits = -1 means it is automatically determined: every shard will be at least 512KB and number of shard bits will not exceed 6.- Parameters:
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 full
-
-
Method Detail
-
disposeInternal
protected final void disposeInternal(long handle)
Deprecated.- Specified by:
disposeInternalin classRocksObject
-
-