org.apache.jcs.auxiliary.disk.hsql
Class HSQLCache

java.lang.Object
  extended byorg.apache.jcs.auxiliary.disk.AbstractDiskCache
      extended byorg.apache.jcs.auxiliary.disk.hsql.HSQLCache
All Implemented Interfaces:
AuxiliaryCache, ICache, ICacheType, java.io.Serializable

public class HSQLCache
extends AbstractDiskCache

HSQLDB Based Local Persistence. VERY EXPERIMENTAL, and only partially implemented Requires String keys and does not work with groups.

Version:
1.0
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.jcs.auxiliary.disk.AbstractDiskCache
alive, cacheEventQueue, cacheName, purgatory, purgHits
 
Fields inherited from interface org.apache.jcs.engine.behavior.ICacheType
CACHE_HUB, DISK_CACHE, LATERAL_CACHE, REMOTE_CACHE
 
Constructor Summary
HSQLCache(HSQLCacheAttributes cattr)
          Constructor for the HSQLCache object
 
Method Summary
 void doDispose()
          Description of the Method
 ICacheElement doGet(java.io.Serializable key)
          Get a value from the persistent store.
 boolean doRemove(java.io.Serializable key)
          Returns true if the removal was succesful; or false if there is nothing to remove.
 void doRemoveAll()
          Description of the Method
 void doUpdate(ICacheElement ce)
          Add a cache element to the persistent store.
 java.util.Set getGroupKeys(java.lang.String groupName)
          Gets the set of keys of objects currently in the group
 int getSize()
          Returns the current cache size.
 void reset()
          Description of the Method
 
Methods inherited from class org.apache.jcs.auxiliary.disk.AbstractDiskCache
dispose, get, getCacheName, getCacheType, getStatistics, getStats, getStatus, remove, removeAll, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HSQLCache

public HSQLCache(HSQLCacheAttributes cattr)
Constructor for the HSQLCache object

Parameters:
cattr -
Method Detail

doUpdate

public void doUpdate(ICacheElement ce)
Description copied from class: AbstractDiskCache
Add a cache element to the persistent store.

Specified by:
doUpdate in class AbstractDiskCache
Parameters:
ce -

doGet

public ICacheElement doGet(java.io.Serializable key)
Description copied from class: AbstractDiskCache
Get a value from the persistent store.

Specified by:
doGet in class AbstractDiskCache
Parameters:
key - Key to locate value for.
Returns:
An object matching key, or null.

doRemove

public boolean doRemove(java.io.Serializable key)
Returns true if the removal was succesful; or false if there is nothing to remove. Current implementation always result in a disk orphan.

Specified by:
doRemove in class AbstractDiskCache
Parameters:
key -
Returns:
boolean

doRemoveAll

public void doRemoveAll()
Description of the Method

Specified by:
doRemoveAll in class AbstractDiskCache

reset

public void reset()
Description of the Method


doDispose

public void doDispose()
Description of the Method

Specified by:
doDispose in class AbstractDiskCache

getSize

public int getSize()
Returns the current cache size.

Specified by:
getSize in interface AuxiliaryCache
Specified by:
getSize in class AbstractDiskCache
Returns:
The size value
See Also:
ICache.getSize()

getGroupKeys

public java.util.Set getGroupKeys(java.lang.String groupName)
Description copied from interface: AuxiliaryCache
Gets the set of keys of objects currently in the group

Specified by:
getGroupKeys in interface AuxiliaryCache
Specified by:
getGroupKeys in class AbstractDiskCache
Parameters:
groupName -
Returns:


Copyright © 2002-2007 Apache Software Foundation. All Rights Reserved.