|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.handle.hdllib.JDBCache
public class JDBCache
Class used to cache values in a local database file.
Constructor Summary | |
---|---|
JDBCache(java.io.File cacheDBFile)
|
Method Summary | |
---|---|
void |
clear()
Remove all values from the cache |
void |
close()
|
byte[][] |
getCachedValues(byte[] handle,
byte[][] reqTypes,
int[] reqIndexes)
Returns any non-expired handle values that are in the caches storage. |
boolean |
isCachedNotFound(byte[][] values)
Returns true if this return value of getCachedValues indicates a cached value of HANDLE_NOT_FOUND |
void |
removeHandle(byte[] handle)
Remove one handle from the cache |
void |
setCachedNotFound(byte[] handle,
int ttl)
Returns true if this handle should have a cached HANDLE_NOT_FOUND. |
void |
setCachedValues(byte[] handle,
HandleValue[] newValues,
byte[][] newTypeList,
int[] newIndexList)
Store the given handle values after a query for the handle. |
void |
setMaximumHandles(int maxHandles)
Set the maximum size for the cache by the number of handles. |
void |
setMaximumSize(int maxSize)
Set the maximum size for the cache by the number of bytes used for storage. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JDBCache(java.io.File cacheDBFile) throws java.lang.Exception
java.lang.Exception
Method Detail |
---|
public boolean isCachedNotFound(byte[][] values)
Cache
isCachedNotFound
in interface Cache
public byte[][] getCachedValues(byte[] handle, byte[][] reqTypes, int[] reqIndexes) throws java.lang.Exception
getCachedValues
in interface Cache
java.lang.Exception
public void setCachedNotFound(byte[] handle, int ttl) throws java.lang.Exception
Cache
setCachedNotFound
in interface Cache
java.lang.Exception
public void removeHandle(byte[] handle) throws java.lang.Exception
Cache
removeHandle
in interface Cache
java.lang.Exception
public void setCachedValues(byte[] handle, HandleValue[] newValues, byte[][] newTypeList, int[] newIndexList) throws java.lang.Exception
setCachedValues
in interface Cache
java.lang.Exception
public void setMaximumHandles(int maxHandles)
setMaximumHandles
in interface Cache
public void setMaximumSize(int maxSize)
setMaximumSize
in interface Cache
public void clear() throws java.lang.Exception
clear
in interface Cache
java.lang.Exception
public void close() throws java.lang.Exception
close
in interface Cache
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |