org.apache.jcs.auxiliary.lateral
Class LateralCacheNoWait

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

public class LateralCacheNoWait
extends java.lang.Object
implements AuxiliaryCache

Used to queue up update requests to the underlying cache. These requests will be processed in their order of arrival via the cache event queue processor.

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
LateralCacheNoWait(LateralCache cache)
          Constructs with the given lateral cache, and fires up an event queue for aysnchronous processing.
 
Method Summary
 void dispose()
          Adds a dispose request to the lateral cache.
 void fixCache(ILateralCacheService lateral)
          Replaces the lateral cache service handle with the given handle and reset the queue by starting up a new instance.
 ICacheElement get(java.io.Serializable key)
          Synchronously reads from the lateral cache.
 java.lang.String getCacheName()
          Gets the cacheName attribute of the LateralCacheNoWait object
 int getCacheType()
          No lateral invokation.
 java.util.Set getGroupKeys(java.lang.String groupName)
          Gets the set of keys of objects currently in the group
 int getSize()
          No lateral invokation.
 IStats getStatistics()
          Returns the historical and statistical data for a region's auxiliary cache.
 java.lang.String getStats()
          getStats
 int getStatus()
          Returns the asyn cache status.
 boolean remove(java.io.Serializable key)
          Adds a remove request to the lateral cache.
 void removeAll()
          Adds a removeAll request to the lateral cache.
 void resetEventQ()
          Resets the event q by first destroying the existing one and starting up new one.
 java.lang.String toString()
           
 void update(ICacheElement ce)
          Puts an item to the cache.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LateralCacheNoWait

public LateralCacheNoWait(LateralCache cache)
Constructs with the given lateral cache, and fires up an event queue for aysnchronous processing.

Parameters:
cache -
Method Detail

update

public void update(ICacheElement ce)
            throws java.io.IOException
Description copied from interface: AuxiliaryCache
Puts an item to the cache.

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

get

public ICacheElement get(java.io.Serializable key)
Synchronously reads from the lateral cache.

Specified by:
get in interface AuxiliaryCache
Parameters:
key -
Returns:
ICacheElement if found, else 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
Parameters:
groupName -
Returns:
a set of group keys

remove

public boolean remove(java.io.Serializable key)
Adds a remove request to the lateral cache.

Specified by:
remove in interface AuxiliaryCache
Parameters:
key -
Returns:
always false

removeAll

public void removeAll()
Adds a removeAll request to the lateral cache.

Specified by:
removeAll in interface AuxiliaryCache

dispose

public void dispose()
Adds a dispose request to the lateral cache.

Specified by:
dispose in interface AuxiliaryCache

getSize

public int getSize()
No lateral invokation.

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

getCacheType

public int getCacheType()
No lateral invokation.

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

getStatus

public int getStatus()
Returns the asyn cache status. An error status indicates either the lateral connection is not available, or the asyn queue has been unexpectedly destroyed. No lateral invokation.

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

getCacheName

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

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

fixCache

public void fixCache(ILateralCacheService lateral)
Replaces the lateral cache service handle with the given handle and reset the queue by starting up a new instance.

Parameters:
lateral -

resetEventQ

public void resetEventQ()
Resets the event q by first destroying the existing one and starting up new one.


getStats

public java.lang.String getStats()
getStats

Specified by:
getStats in interface ICache
Returns:
String

getStatistics

public IStats getStatistics()
Description copied from interface: AuxiliaryCache
Returns the historical and statistical data for a region's auxiliary cache.

Specified by:
getStatistics in interface AuxiliaryCache
Returns:

toString

public java.lang.String toString()


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