org.apache.jcs.auxiliary.disk.jisp
Class JISPCache

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

public class JISPCache
extends AbstractDiskCache

JISP disk cache implementation. Slow as hell with this type of key. VERY EXPERIMENTAL, and only partially implemented Does not work with groups.

Version:
$Id: ILateralCacheTCPListener.java,v 1.2 2002/01/18 22:08:26
See Also:
Serialized Form

Field Summary
 boolean isAlive
          Description of the Field
 
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
JISPCache(JISPCacheAttributes cattr)
          Constructor for the JISPCache object
 
Method Summary
 void createDB(boolean clear)
          Description of the Method
 void doDispose()
          Description of the Method
protected  ICacheElement doGet(java.io.Serializable key)
          Description of the Method
protected  boolean doRemove(java.io.Serializable key)
          Returns true if the removal was succesful; or false if there is nothing to remove.
protected  void doRemoveAll()
          Description of the Method
protected  void doUpdate(ICacheElement ce)
          Description of the Method
 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.
 
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
 

Field Detail

isAlive

public boolean isAlive
Description of the Field

Constructor Detail

JISPCache

public JISPCache(JISPCacheAttributes cattr)
Constructor for the JISPCache object

Parameters:
cattr -
Method Detail

createDB

public void createDB(boolean clear)
              throws java.lang.Exception
Description of the Method

Throws:
java.lang.Exception

doUpdate

protected void doUpdate(ICacheElement ce)
Description of the Method

Specified by:
doUpdate in class AbstractDiskCache
Parameters:
ce -

doGet

protected ICacheElement doGet(java.io.Serializable key)
Description of the Method

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

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

doRemove

protected 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 - Key of object to remove.
Returns:
whether or no the item was present when removed

doRemoveAll

protected void doRemoveAll()
Description of the Method

Specified by:
doRemoveAll in class AbstractDiskCache

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()


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