|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.continuent.tungsten.replicator.prefetch.SlowQueryCache
public class SlowQueryCache
Implements a shared cache for slow prefetch queries. The cache supports concurrent access by synchronizing all access. Methods within the cache are relatively fast.
| Constructor Summary | |
|---|---|
SlowQueryCache()
|
|
| Method Summary | |
|---|---|
int |
getSlowQueryCacheDuration()
Returns the slowQueryCacheDuration value. |
int |
getSlowQueryCacheSize()
Returns the slowQueryCacheSize value. |
int |
getSlowQueryRows()
Returns the slowQueryRows value. |
double |
getSlowQuerySelectivity()
Returns the slowQuerySelectivity value. |
void |
init()
Initialize the cache. |
void |
setSlowQueryCacheDuration(int slowQueryCacheDuration)
Sets the slowQueryCacheDuration value. |
void |
setSlowQueryCacheSize(int slowQueryCacheSize)
Sets the slowQueryCacheSize value. |
void |
setSlowQueryRows(int slowQueryRows)
Sets the slowQueryRows value. |
void |
setSlowQuerySelectivity(double slowQuerySelectivity)
Sets the slowQuerySelectivity value. |
boolean |
shouldExecute(KeySelect keySelect)
Returns true if we have not heard of this query *or* if the query has exceeded the slow query limit. |
java.lang.String |
toString()
|
void |
updateCache(KeySelect keySelect,
long rowCount)
Check for a slow query and update cache accordingly. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SlowQueryCache()
| Method Detail |
|---|
public int getSlowQueryCacheSize()
public void setSlowQueryCacheSize(int slowQueryCacheSize)
slowQueryCacheSize - The slowQueryCacheSize to set.public int getSlowQueryRows()
public void setSlowQueryRows(int slowQueryRows)
slowQueryRows - The slowQueryRows to set.public double getSlowQuerySelectivity()
public void setSlowQuerySelectivity(double slowQuerySelectivity)
slowQuerySelectivity - The slowQuerySelectivity to set.public int getSlowQueryCacheDuration()
public void setSlowQueryCacheDuration(int slowQueryCacheDuration)
slowQueryCacheDuration - The slowQueryCacheDuration to set.public void init()
public boolean shouldExecute(KeySelect keySelect)
java.sql.SQLException
public void updateCache(KeySelect keySelect,
long rowCount)
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||