Package com.avanza.astrix.gs
Class ClusteredProxyCacheImpl
- java.lang.Object
-
- com.avanza.astrix.gs.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)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classClusteredProxyCacheImpl.GigaSpaceInstance
-
Constructor Summary
Constructors Constructor Description ClusteredProxyCacheImpl()Deprecated.ClusteredProxyCacheImpl(com.avanza.astrix.beans.tracing.AstrixTraceProvider astrixTraceProvider, GsSecurityProvider gsSecurityProvider, GigaspaceMetricsExporter metricsExporter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy()ClusteredProxyCacheImpl.GigaSpaceInstancegetProxy(com.avanza.astrix.beans.service.ServiceProperties serviceProperties)Retrieves a given proxy from the cache and creates the proxy if it does not exits.voidsetConfig(com.avanza.astrix.config.DynamicConfig config)
-
-
-
Constructor Detail
-
ClusteredProxyCacheImpl
@Deprecated public ClusteredProxyCacheImpl()
Deprecated.
-
ClusteredProxyCacheImpl
@AstrixInject public ClusteredProxyCacheImpl(com.avanza.astrix.beans.tracing.AstrixTraceProvider astrixTraceProvider, GsSecurityProvider gsSecurityProvider, GigaspaceMetricsExporter metricsExporter)
-
-
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:
getProxyin interfaceClusteredProxyCache
-
destroy
@PreDestroy public void destroy()
-
setConfig
public void setConfig(com.avanza.astrix.config.DynamicConfig config)
- Specified by:
setConfigin interfacecom.avanza.astrix.beans.core.AstrixConfigAware
-
-