|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.ehcache.store.DiskStore
A disk cache implementation.
Field Summary |
Fields inherited from interface net.sf.ehcache.store.Store |
CACHE_HUB, DISK_CACHE, STATUS_ALIVE, STATUS_DISPOSED, STATUS_ERROR, STATUS_UNINITIALISED |
Constructor Summary | |
DiskStore(Cache cache,
java.lang.String diskPath)
Creates a Disk Store with defaults. |
|
DiskStore(Cache cache,
java.lang.String diskPath,
int expiryThreadInterval)
Creates a cache. |
Method Summary | |
void |
dispose()
Prepares for shutdown. |
Element |
get(java.io.Serializable key)
Gets an Element from the Disk Store. |
static Store |
getCache(java.lang.String name)
Locates a cache, by name. |
int |
getCacheType()
Returns the cache type. |
java.lang.Object[] |
getKeyArray()
Gets an Array of the keys for all elements in the memory cache |
java.lang.String |
getName()
Returns the cache name this disk cache is spooling for |
int |
getSize()
Returns the current store size. |
int |
getStatus()
Returns the cache status. |
boolean |
isSpoolEmpty()
Whether there are any elements waiting to be spooled to disk. |
void |
put(Element entry)
Puts an item to the cache. |
boolean |
remove(java.io.Serializable key)
Removes an item from the cache. |
void |
removeAll()
Removes all cached items from the cache. |
java.lang.String |
toString()
Returns a String representation of the DiskStore |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public DiskStore(Cache cache, java.lang.String diskPath)
public DiskStore(Cache cache, java.lang.String diskPath, int expiryThreadInterval)
Method Detail |
public static Store getCache(java.lang.String name)
public int getCacheType()
getCacheType
in interface Store
public java.lang.String getName()
getName
in interface Store
public int getStatus()
getStatus
in interface Store
public Element get(java.io.Serializable key) throws java.io.IOException
Element
from the Disk Store.
get
in interface Store
java.io.IOException
public java.lang.Object[] getKeyArray()
public int getSize()
getSize
in interface Store
public void put(Element entry) throws java.io.IOException
put
in interface Store
java.io.IOException
public boolean remove(java.io.Serializable key) throws java.io.IOException
remove
in interface Store
java.io.IOException
public void removeAll() throws java.io.IOException
removeAll
in interface Store
java.io.IOException
public void dispose()
dispose
in interface Store
public boolean isSpoolEmpty()
public java.lang.String toString()
String
representation of the DiskStore
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |