org.apache.jcs.auxiliary.lateral
Class LateralCacheAbstractFactory

java.lang.Object
  extended by org.apache.jcs.auxiliary.lateral.LateralCacheAbstractFactory
All Implemented Interfaces:
AuxiliaryCacheFactory
Direct Known Subclasses:
LateralTCPCacheFactory

public abstract class LateralCacheAbstractFactory
extends java.lang.Object
implements AuxiliaryCacheFactory

Particular lateral caches should define their own factory. It is not necessary to extend this base factory, but it can be useful.

The old factory tried to handle all types of laterals. It was gettting cluttered by ad hoc if statements. Since the javagroups lateral was jdk1.4 dependent it had to be moved. As such, the old factory could no longer import it. This motivated the change.

This abstraction layer should keep things cleaner.

Author:
Aaron Smuts

Constructor Summary
LateralCacheAbstractFactory()
           
 
Method Summary
abstract  AuxiliaryCache createCache(AuxiliaryCacheAttributes attr, ICompositeCacheManager cacheMgr, ICacheEventLogger cacheEventLogger, IElementSerializer elementSerializer)
          Creates a lateral cache.
abstract  void createListener(ILateralCacheAttributes lac, ICompositeCacheManager cacheMgr)
          Makes sure a listener gets created.
 java.lang.String getName()
          Gets the name attribute of the LateralCacheFactory object
 void setName(java.lang.String name)
          Sets the name attribute of the LateralCacheFactory object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LateralCacheAbstractFactory

public LateralCacheAbstractFactory()
Method Detail

createCache

public abstract AuxiliaryCache createCache(AuxiliaryCacheAttributes attr,
                                           ICompositeCacheManager cacheMgr,
                                           ICacheEventLogger cacheEventLogger,
                                           IElementSerializer elementSerializer)
Creates a lateral cache.

Specified by:
createCache in interface AuxiliaryCacheFactory
Parameters:
attr -
cacheMgr -
cacheEventLogger -
elementSerializer -
Returns:
AuxiliaryCache

createListener

public abstract void createListener(ILateralCacheAttributes lac,
                                    ICompositeCacheManager cacheMgr)
Makes sure a listener gets created. It will get monitored as soon as it is used.

This should be called by create cache.

Parameters:
lac - ILateralCacheAttributes
cacheMgr -

getName

public java.lang.String getName()
Gets the name attribute of the LateralCacheFactory object

Specified by:
getName in interface AuxiliaryCacheFactory
Returns:
The name value

setName

public void setName(java.lang.String name)
Sets the name attribute of the LateralCacheFactory object

Specified by:
setName in interface AuxiliaryCacheFactory
Parameters:
name - The new name value


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