org.apache.jcs.auxiliary.lateral
Class LateralCache

java.lang.Object
  extended byorg.apache.jcs.auxiliary.lateral.LateralCache
All Implemented Interfaces:
ICache, ICacheType, java.io.Serializable

public class LateralCache
extends java.lang.Object
implements ICache

Lateral distributor. Returns null on get by default. Net search not implemented.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.apache.jcs.engine.behavior.ICacheType
CACHE_HUB, DISK_CACHE, LATERAL_CACHE, REMOTE_CACHE
 
Constructor Summary
protected LateralCache(ILateralCacheAttributes cattr)
          Constructor for the LateralCache object
  LateralCache(ILateralCacheAttributes cattr, ILateralCacheService lateral, LateralCacheMonitor monitor)
          Constructor for the LateralCache object
 
Method Summary
 void dispose()
          Synchronously dispose the cache.
 void fixCache(ILateralCacheService lateral)
          Replaces the current remote cache service handle with the given handle.
 ICacheElement get(java.io.Serializable key)
          The performace costs are too great.
 AuxiliaryCacheAttributes getAuxiliaryCacheAttributes()
           
 java.lang.String getCacheName()
          Gets the cacheName attribute of the LateralCache object
 int getCacheType()
          Gets the cacheType attribute of the LateralCache object
 java.util.Set getGroupKeys(java.lang.String groupName)
           
 int getSize()
          Returns the current cache size.
 java.lang.String getStats()
          getStats
 int getStatus()
          Returns the cache status.
 boolean remove(java.io.Serializable key)
          Synchronously remove from the remote cache; if failed, replace the remote handle with a zombie.
 void removeAll()
          Synchronously removeAll from the remote cache; if failed, replace the remote handle with a zombie.
 java.lang.String toString()
           
 void update(ICacheElement ce)
          Update lateral.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LateralCache

public LateralCache(ILateralCacheAttributes cattr,
                    ILateralCacheService lateral,
                    LateralCacheMonitor monitor)
Constructor for the LateralCache object

Parameters:
cattr -
lateral -
monitor -

LateralCache

protected LateralCache(ILateralCacheAttributes cattr)
Constructor for the LateralCache object

Parameters:
cattr -
Method Detail

update

public void update(ICacheElement ce)
            throws java.io.IOException
Update lateral.

Specified by:
update in interface ICache
Parameters:
ce -
Throws:
java.io.IOException

get

public ICacheElement get(java.io.Serializable key)
                  throws java.io.IOException
The performace costs are too great. It is not recommended that you enable lateral gets.

Specified by:
get in interface ICache
Parameters:
key -
Returns:
Throws:
java.io.IOException

getGroupKeys

public java.util.Set getGroupKeys(java.lang.String groupName)
Parameters:
groupName -
Returns:
A set og group keys.

remove

public boolean remove(java.io.Serializable key)
               throws java.io.IOException
Synchronously remove from the remote cache; if failed, replace the remote handle with a zombie.

Specified by:
remove in interface ICache
Parameters:
key -
Returns:
Throws:
java.io.IOException

removeAll

public void removeAll()
               throws java.io.IOException
Synchronously removeAll from the remote cache; if failed, replace the remote handle with a zombie.

Specified by:
removeAll in interface ICache
Throws:
java.io.IOException

dispose

public void dispose()
             throws java.io.IOException
Synchronously dispose the cache. Not sure we want this.

Specified by:
dispose in interface ICache
Throws:
java.io.IOException

getStatus

public int getStatus()
Returns the cache status.

Specified by:
getStatus in interface ICache
Returns:
The status value

getSize

public int getSize()
Returns the current cache size.

Specified by:
getSize in interface ICache
Returns:
The size value

getCacheType

public int getCacheType()
Gets the cacheType attribute of the LateralCache object

Specified by:
getCacheType in interface ICacheType
Returns:
The cacheType value

getCacheName

public java.lang.String getCacheName()
Gets the cacheName attribute of the LateralCache object

Specified by:
getCacheName in interface ICache
Returns:
The cacheName value

fixCache

public void fixCache(ILateralCacheService lateral)
Replaces the current remote cache service handle with the given handle.

Parameters:
lateral -

getStats

public java.lang.String getStats()
getStats

Specified by:
getStats in interface ICache
Returns:
String

getAuxiliaryCacheAttributes

public AuxiliaryCacheAttributes getAuxiliaryCacheAttributes()
Returns:
Returns the AuxiliaryCacheAttributes.

toString

public java.lang.String toString()


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