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 Details

  • 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 type
      V - cache value type
      Parameters:
      iaca - the cache configuration object
      cacheMgr - the cache manager
      cacheEventLogger - the event logger
      elementSerializer - 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 type
      V - cache value type
      Parameters:
      lca - the cache configuration object
      cacheEventLogger - the event logger
      elementSerializer - the serializer to use when sending or receiving
      Returns:
      a LateralCacheNoWait
    • initialize

      public void initialize()
      Initialize this factory
    • dispose

      public void dispose()
      Dispose of this factory, clean up shared resources
    • getCSNLInstance

      Deprecated.
      Specify serializer
      Returns an instance of the cache service.

      Type Parameters:
      K - cache key type
      V - cache value type
      Parameters:
      lca - configuration for the creation of a new service instance
      Returns:
      ICacheServiceNonLocal<K, V>
    • getCSNLInstance

      Returns an instance of the cache service.

      Type Parameters:
      K - cache key type
      V - cache value type
      Parameters:
      lca - configuration for the creation of a new service instance
      elementSerializer - the serializer to use when sending or receiving
      Returns:
      ICacheServiceNonLocal<K, V>
      Since:
      3.1
    • monitorCache

      public void monitorCache(LateralCacheNoWait<?,?> cache)
      Add cache instance to monitor
      Parameters:
      cache - the cache instance
      Since:
      3.1