Package org.teiid.dqp.internal.process
Class SessionAwareCache<T>
- java.lang.Object
-
- org.teiid.dqp.internal.process.SessionAwareCache<T>
-
public class SessionAwareCache<T> extends Object
This class is used to cache session aware objects
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SessionAwareCache.CacheID
static class
SessionAwareCache.Type
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_MAX_SIZE_TOTAL
static String
REPL
-
Constructor Summary
Constructors Constructor Description SessionAwareCache(String cacheName, CacheFactory cacheFactory, SessionAwareCache.Type type, int maxStaleness)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CacheStatisticsMetadata
buildCacheStats(String name)
void
clearAll()
Clear all the cached plans for all the clientConnsvoid
clearForVDB(String vdbName, String version)
void
clearForVDB(VDBKey vdbKey)
T
get(SessionAwareCache.CacheID id)
int
getCacheHitCount()
double
getCacheHitRatio()
int
getCachePutCount()
static Collection<String>
getCacheTypes()
int
getRequestCount()
int
getTotalCacheEntries()
boolean
isTransactional()
void
put(SessionAwareCache.CacheID id, FunctionMethod.Determinism determinismLevel, T t, Long ttl)
T
remove(SessionAwareCache.CacheID id, FunctionMethod.Determinism determinismLevel)
void
setModTime(long modTime)
void
setTupleBufferCache(TupleBufferCache bufferManager)
-
-
-
Field Detail
-
REPL
public static final String REPL
- See Also:
- Constant Field Values
-
DEFAULT_MAX_SIZE_TOTAL
public static final int DEFAULT_MAX_SIZE_TOTAL
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SessionAwareCache
public SessionAwareCache(String cacheName, CacheFactory cacheFactory, SessionAwareCache.Type type, int maxStaleness)
-
-
Method Detail
-
get
public T get(SessionAwareCache.CacheID id)
-
getCacheHitCount
public int getCacheHitCount()
-
getRequestCount
public int getRequestCount()
-
getCachePutCount
public int getCachePutCount()
-
getTotalCacheEntries
public int getTotalCacheEntries()
-
remove
public T remove(SessionAwareCache.CacheID id, FunctionMethod.Determinism determinismLevel)
-
put
public void put(SessionAwareCache.CacheID id, FunctionMethod.Determinism determinismLevel, T t, Long ttl)
-
clearAll
public void clearAll()
Clear all the cached plans for all the clientConns
-
clearForVDB
public void clearForVDB(VDBKey vdbKey)
-
setTupleBufferCache
public void setTupleBufferCache(TupleBufferCache bufferManager)
-
setModTime
public void setModTime(long modTime)
-
getCacheTypes
public static Collection<String> getCacheTypes()
-
isTransactional
public boolean isTransactional()
-
getCacheHitRatio
public double getCacheHitRatio()
-
buildCacheStats
public CacheStatisticsMetadata buildCacheStats(String name)
-
-