|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mckoi.database.StatementCache
public final class StatementCache
A cache that maintains a serialized set of StatementTree objects that can be deserialized on demand. The purpose of this cache is to improve the performance of queries that are run repeatedly (for example, multiple INSERT statements).
SYNCHRONIZATION: This object is safe to use over multiple threads.
Constructor Summary | |
---|---|
StatementCache(DatabaseSystem system,
int hash_size,
int max_size,
int clean_percentage)
Constructs the cache. |
Method Summary | |
---|---|
DebugLogger |
Debug()
Returns a DebugLogger object we can use to log debug messages. |
StatementTree |
get(java.lang.String query_string)
Gets a StatementTree for the query string if it is stored in the cache. |
void |
put(java.lang.String query_string,
StatementTree statement_tree)
Puts a new query string/StatementTree into the cache. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StatementCache(DatabaseSystem system, int hash_size, int max_size, int clean_percentage)
Method Detail |
---|
public final DebugLogger Debug()
public void put(java.lang.String query_string, StatementTree statement_tree)
public StatementTree get(java.lang.String query_string)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |