Class LateralTCPCacheFactory
java.lang.Object
org.apache.commons.jcs3.auxiliary.AbstractAuxiliaryCacheFactory
org.apache.commons.jcs3.auxiliary.lateral.socket.tcp.LateralTCPCacheFactory
- All Implemented Interfaces:
AuxiliaryCacheFactory
Constructs a LateralCacheNoWaitFacade for the given configuration. Each lateral service / local
relationship is managed by one manager. This manager can have multiple caches. The remote
relationships are consolidated and restored via these managers.
The facade provides a front to the composite cache so the implementation is transparent.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<K,V> LateralCacheNoWaitFacade<K, V> createCache(AuxiliaryCacheAttributes iaca, ICompositeCacheManager cacheMgr, ICacheEventLogger cacheEventLogger, IElementSerializer elementSerializer) Creates a TCP lateral.<K,V> LateralCacheNoWait<K, V> createCacheNoWait(ITCPLateralCacheAttributes lca, ICacheEventLogger cacheEventLogger, IElementSerializer elementSerializer) Create a LateralCacheNoWait for the server configured in lcavoiddispose()Dispose of this factory, clean up shared resources<K,V> ICacheServiceNonLocal<K, V> Deprecated.Specify serializer<K,V> ICacheServiceNonLocal<K, V> getCSNLInstance(ITCPLateralCacheAttributes lca, IElementSerializer elementSerializer) Returns an instance of the cache service.voidInitialize this factoryvoidmonitorCache(LateralCacheNoWait<?, ?> cache) Add cache instance to monitorMethods inherited from class org.apache.commons.jcs3.auxiliary.AbstractAuxiliaryCacheFactory
getName, setName
-
Constructor Details
-
LateralTCPCacheFactory
public LateralTCPCacheFactory()
-
-
Method Details
-
createCache
public <K,V> LateralCacheNoWaitFacade<K,V> createCache(AuxiliaryCacheAttributes iaca, ICompositeCacheManager cacheMgr, ICacheEventLogger cacheEventLogger, IElementSerializer elementSerializer) Creates a TCP lateral.- Type Parameters:
K- cache key typeV- cache value type- Parameters:
iaca- the cache configuration objectcacheMgr- the cache managercacheEventLogger- the event loggerelementSerializer- the serializer to use when sending or receiving- Returns:
- a LateralCacheNoWaitFacade
-
createCacheNoWait
public <K,V> LateralCacheNoWait<K,V> createCacheNoWait(ITCPLateralCacheAttributes lca, ICacheEventLogger cacheEventLogger, IElementSerializer elementSerializer) Create a LateralCacheNoWait for the server configured in lca- Type Parameters:
K- cache key typeV- cache value type- Parameters:
lca- the cache configuration objectcacheEventLogger- the event loggerelementSerializer- the serializer to use when sending or receiving- Returns:
- a LateralCacheNoWait
-
initialize
Initialize this factory -
dispose
Dispose of this factory, clean up shared resources -
getCSNLInstance
@Deprecated public <K,V> ICacheServiceNonLocal<K,V> getCSNLInstance(ITCPLateralCacheAttributes lca) Deprecated.Specify serializerReturns an instance of the cache service.- Type Parameters:
K- cache key typeV- cache value type- Parameters:
lca- configuration for the creation of a new service instance- Returns:
- ICacheServiceNonLocal<K, V>
-
getCSNLInstance
public <K,V> ICacheServiceNonLocal<K,V> getCSNLInstance(ITCPLateralCacheAttributes lca, IElementSerializer elementSerializer) Returns an instance of the cache service.- Type Parameters:
K- cache key typeV- cache value type- Parameters:
lca- configuration for the creation of a new service instanceelementSerializer- the serializer to use when sending or receiving- Returns:
- ICacheServiceNonLocal<K, V>
- Since:
- 3.1
-
monitorCache
Add cache instance to monitor- Parameters:
cache- the cache instance- Since:
- 3.1
-