Package com.mckoi.database.jdbc
Class RowCache
- java.lang.Object
-
- com.mckoi.database.jdbc.RowCache
-
final class RowCache extends java.lang.ObjectA Cache that stores rows retrieved from the server in result set's. This provides various mechanisms for determining the best rows to pick out that haven't been cached, etc.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classRowCache.CachedRowA cached row.private static classRowCache.RowRefUsed for the hash key in the cache.
-
Constructor Summary
Constructors Constructor Description RowCache(int cache_size, int max_size)Constructs the cache.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidclear()Flushes the complete contents of the cache.(package private) java.util.VectorgetResultPart(java.util.Vector result_block, MConnection connection, int result_id, int row_index, int row_count, int col_count, int total_row_count)Requests a block of parts.
-
-
-
Field Detail
-
row_cache
private Cache row_cache
The actual cache that stores the rows.
-
-
Method Detail
-
getResultPart
java.util.Vector getResultPart(java.util.Vector result_block, MConnection connection, int result_id, int row_index, int row_count, int col_count, int total_row_count) throws java.io.IOException, java.sql.SQLExceptionRequests a block of parts. If the block can be completely retrieved from the cache then it is done so. Otherwise, it forwards the request for the rows onto the connection object.- Throws:
java.io.IOExceptionjava.sql.SQLException
-
clear
void clear()
Flushes the complete contents of the cache.
-
-