
public class OCommandCacheSoftRefs extends Object implements OCommandCache
| Modifier and Type | Class and Description |
|---|---|
static class |
OCommandCacheSoftRefs.OCachedResult |
OCommandCache.STRATEGY| Constructor and Description |
|---|
OCommandCacheSoftRefs(String iDatabaseName) |
| Modifier and Type | Method and Description |
|---|---|
void |
changeConfig(ODocument cfg) |
OCommandCacheSoftRefs |
clear()
Remove all results from the cache.
|
protected void |
configure() |
protected void |
deleteFileIfExists() |
OCommandCacheSoftRefs |
disable()
Disables cache.
|
OCommandCacheSoftRefs |
enable()
Enables cache.
|
Set<Map.Entry<String,OCommandCacheSoftRefs.OCachedResult>> |
entrySet() |
Object |
get(OSecurityUser iUser,
String queryText,
int iLimit)
Looks up for query result in cache.
|
OCommandCache.STRATEGY |
getEvictStrategy() |
protected String |
getKey(OSecurityUser iUser,
String queryText,
int iLimit) |
int |
getMaxResultsetSize() |
int |
getMinExecutionTime() |
void |
invalidateResultsOfCluster(String iCluster)
Invalidates results of given cluster.
|
boolean |
isEnabled()
Tells whether cache is enabled.
|
void |
put(OSecurityUser iUser,
String queryText,
Object iResult,
int iLimit,
Set<String> iInvolvedClusters,
long iExecutionTime)
Pushes record to cache.
|
void |
remove(OSecurityUser iUser,
String queryText,
int iLimit)
Removes result of query.
|
OCommandCacheSoftRefs |
setEvictStrategy(OCommandCache.STRATEGY evictStrategy) |
OCommandCacheSoftRefs |
setMaxResultsetSize(int maxResultsetSize) |
OCommandCacheSoftRefs |
setMinExecutionTime(int minExecutionTime) |
void |
shutdown()
All operations running at cache destruction stage.
|
int |
size()
Total number of stored queries.
|
void |
startup()
All operations running at cache initialization stage.
|
public OCommandCacheSoftRefs(String iDatabaseName)
public void changeConfig(ODocument cfg)
protected void configure()
public void startup()
OCommandCachestartup in interface OCommandCachepublic void shutdown()
OCommandCacheshutdown in interface OCommandCacheprotected void deleteFileIfExists()
public boolean isEnabled()
OCommandCacheisEnabled in interface OCommandCachetrue if cache enabled at call time, otherwise - falsepublic OCommandCacheSoftRefs enable()
OCommandCacheenable in interface OCommandCachepublic OCommandCacheSoftRefs disable()
OCommandCachedisable in interface OCommandCachepublic Object get(OSecurityUser iUser, String queryText, int iLimit)
OCommandCacheget in interface OCommandCachepublic void put(OSecurityUser iUser, String queryText, Object iResult, int iLimit, Set<String> iInvolvedClusters, long iExecutionTime)
OCommandCacheput in interface OCommandCachepublic void remove(OSecurityUser iUser, String queryText, int iLimit)
OCommandCacheremove in interface OCommandCachepublic OCommandCacheSoftRefs clear()
OCommandCacheclear in interface OCommandCachepublic int size()
OCommandCachesize in interface OCommandCachepublic void invalidateResultsOfCluster(String iCluster)
OCommandCacheinvalidateResultsOfCluster in interface OCommandCacheiCluster - Cluster namepublic int getMinExecutionTime()
public OCommandCacheSoftRefs setMinExecutionTime(int minExecutionTime)
public int getMaxResultsetSize()
getMaxResultsetSize in interface OCommandCachepublic OCommandCacheSoftRefs setMaxResultsetSize(int maxResultsetSize)
public OCommandCache.STRATEGY getEvictStrategy()
getEvictStrategy in interface OCommandCachepublic OCommandCacheSoftRefs setEvictStrategy(OCommandCache.STRATEGY evictStrategy)
protected String getKey(OSecurityUser iUser, String queryText, int iLimit)
public Set<Map.Entry<String,OCommandCacheSoftRefs.OCachedResult>> entrySet()
Copyright © 2009–2025 OrientDB. All rights reserved.