public abstract class SQLTraceCache extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static Logger |
_logger |
protected ConcurrentSkipListMap<String,SQLTrace> |
cache |
protected static String |
LINE_BREAK |
protected int |
numTopQueriesToReport |
protected String |
poolName |
protected long |
timeToKeepQueries |
| Constructor and Description |
|---|
SQLTraceCache(String poolName,
int maxSize,
long timeToKeepQueries) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancelTimerTask()
Cancel the timer task used to perform a purgeEntries on the cache.
|
abstract void |
checkAndUpdateCache(SQLTrace cacheObj)
Request for adding a sql query in the form of SQLTrace to this cache.
|
String |
getPoolName() |
Collection<String> |
getSqlTraceList() |
void |
purgeEntries()
Entries are removed from the list after sorting
them in the least frequently used order.
|
void |
scheduleTimerTask(Timer timer)
Schedule timer to perform purgeEntries on the cache after the
specified timeToKeepQueries delay and period.
|
protected int numTopQueriesToReport
protected long timeToKeepQueries
protected final String poolName
protected ConcurrentSkipListMap<String,SQLTrace> cache
protected static final Logger _logger
protected static final String LINE_BREAK
public SQLTraceCache(String poolName, int maxSize, long timeToKeepQueries)
public Collection<String> getSqlTraceList()
public String getPoolName()
public void scheduleTimerTask(Timer timer)
timer - public void cancelTimerTask()
public abstract void checkAndUpdateCache(SQLTrace cacheObj)
cacheObj - public void purgeEntries()
Copyright © 2017. All rights reserved.