org.apache.jcs.auxiliary.lateral
Class LateralCacheAbstractFactory

java.lang.Object
  extended byorg.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)
           
abstract  void createListener(LateralCacheAttributes 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)
Specified by:
createCache in interface AuxiliaryCacheFactory
Parameters:
attr -
cacheMgr - This allows auxiliaries to reference the manager without assuming that it is a singleton. This will allow JCS to be a nonsingleton. Also, it makes it easier to test.
Returns:
AuxiliaryCache

createListener

public abstract void createListener(LateralCacheAttributes 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 - LateralCacheAttributes
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-2007 Apache Software Foundation. All Rights Reserved.