public class PersistentRedisCache extends AbstractPersistentCache
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_REDIS_CACHE_EXPIRE_SECONDS |
static java.lang.String |
NAME |
cacheSize, executor, nextCache, segmentCacheStats, THREADS, writesPending
Constructor and Description |
---|
PersistentRedisCache(java.lang.String redisHost,
int redisPort,
int redisExpireSeconds,
int redisSocketTimeout,
int redisConnectionTimeout,
int redisMinConnections,
int redisMaxConnections,
int redisMaxTotalConnections,
int redisDBIndex,
IOMonitor redisCacheIOMonitor) |
Modifier and Type | Method and Description |
---|---|
void |
cleanUp()
Purges the cache entries according to the implementation policy (e.g.
|
boolean |
containsSegment(long msb,
long lsb)
Check if the segment exists in the cache.
|
protected Buffer |
readSegmentInternal(long msb,
long lsb)
Reads the segment from the cache.
|
void |
writeSegment(long msb,
long lsb,
Buffer buffer)
Writes the segment to the cache.
|
close, getCacheStats, getWritesPending, linkWith, readSegment, recordCacheLoadTimeInternal
public static final int DEFAULT_REDIS_CACHE_EXPIRE_SECONDS
public static final java.lang.String NAME
public PersistentRedisCache(java.lang.String redisHost, int redisPort, int redisExpireSeconds, int redisSocketTimeout, int redisConnectionTimeout, int redisMinConnections, int redisMaxConnections, int redisMaxTotalConnections, int redisDBIndex, IOMonitor redisCacheIOMonitor)
protected Buffer readSegmentInternal(long msb, long lsb)
AbstractPersistentCache
AbstractPersistentCache.linkWith(AbstractPersistentCache)
readSegmentInternal
in class AbstractPersistentCache
msb
- the most significant bits of the identifier of the segmentlsb
- the least significant bits of the identifier of the segmentpublic boolean containsSegment(long msb, long lsb)
PersistentCache
msb
- the most significant bits of the identifier of the segmentlsb
- the least significant bits of the identifier of the segmenttrue
if the segment existspublic void writeSegment(long msb, long lsb, Buffer buffer)
PersistentCache
msb
- the most significant bits of the identifier of the segmentlsb
- the least significant bits of the identifier of the segmentbuffer
- the byte buffer containing the segment datapublic void cleanUp()
PersistentCache
Copyright © 2012–2022 The Apache Software Foundation. All rights reserved.