Class ClusteredProxyCacheImpl

  • All Implemented Interfaces:
    com.avanza.astrix.beans.core.AstrixConfigAware, ClusteredProxyCache

    public class ClusteredProxyCacheImpl
    extends Object
    implements com.avanza.astrix.beans.core.AstrixConfigAware, ClusteredProxyCache
    Manages lifecycle for each clustered-proxy created by Astrix.
    Author:
    Elias Lindholm (elilin)
    • Method Detail

      • getProxy

        public ClusteredProxyCacheImpl.GigaSpaceInstance getProxy​(com.avanza.astrix.beans.service.ServiceProperties serviceProperties)
        Retrieves a given proxy from the cache and creates the proxy if it does not exits. Every time a proxy is retrieved from the cache the proxyConsumerCount will be incremented. The proxy must be returned to the cache by invoking GigaSpaceInstance.release. When all instance for a proxy against a given space is release, then the proxy will be destroyed and all associated resources are released.
        Specified by:
        getProxy in interface ClusteredProxyCache
      • setConfig

        public void setConfig​(com.avanza.astrix.config.DynamicConfig config)
        Specified by:
        setConfig in interface com.avanza.astrix.beans.core.AstrixConfigAware