Skip navigation links
com.tangosol.coherence.config.scheme
Class TransactionalScheme
java.lang.Object
com.tangosol.coherence.config.scheme.AbstractScheme
com.tangosol.coherence.config.scheme.AbstractServiceScheme
com.tangosol.coherence.config.scheme.AbstractCachingScheme
com.tangosol.coherence.config.scheme.TransactionalScheme
- All Implemented Interfaces:
- BackingMapManagerBuilder, MapBuilder, NamedCacheBuilder, ServiceBuilder, CachingScheme, ObservableCachingScheme, Scheme, ServiceScheme
-
public class TransactionalScheme
- extends AbstractCachingScheme
The TransactionalScheme
class builds a transactional cache. The transactional cache is a logical cache backed by a set of distributed caches. A distributed service is used to handle the internal txn caches, since they are all distributed caches. Because the transactional cache is logical, it implements the realizeNamedCache used by ECCF.ensureCache. There is no backing map for transactional caches (because they are logical) so realizeMap is not needed. However, the internal distributed txn caches do have backing maps which are handled by the normal DistributedScheme code.
- Since:
- Coherence 12.1.2
- Author:
- pfm 2011.12.06
Nested Class Summary |
static class |
TransactionalScheme.Manager
The Manager class uses builders to create the required backing maps and provides client access to those maps. |
Methods inherited from class com.tangosol.coherence.config.scheme.AbstractServiceScheme |
getEventInterceptorBuilders, getScopedServiceName, getScopedServiceName, getScopeName, getServiceBuilder, getServiceDependencies, getServiceName, getXml, injectScopeNameIntoService, isAutoStart, setAutoStart, setScopeName, setServiceDependencies, setServiceName, setXml |
TransactionalScheme
public TransactionalScheme()
getServiceType
public java.lang.String getServiceType()
- Return the service type.
-
- Returns:
- the service type
realizeService
public Service realizeService(com.tangosol.config.expression.ParameterResolver resolver,
java.lang.ClassLoader loader,
Cluster cluster)
- Realize (ensure) a Service. The returned Service is fully configured and ready to be used.
-
- Specified by:
realizeService
in interface ServiceBuilder
- Overrides:
realizeService
in class AbstractServiceScheme
-
- Parameters:
resolver
- the ParameterResolver
loader
- the ClassLoader
cluster
- the Cluster which will already be running if necessary
- Returns:
- the Service
isRunningClusterNeeded
public boolean isRunningClusterNeeded()
- Return true if a running cluster is needed before using a service.
-
- Specified by:
isRunningClusterNeeded
in interface ServiceBuilder
- Specified by:
isRunningClusterNeeded
in class AbstractServiceScheme
realizeCache
public NamedCache realizeCache(com.tangosol.config.expression.ParameterResolver resolver,
MapBuilder.Dependencies dependencies)
- Realizes a
NamedCache
(possibly "ensuring it") based on the state of the builder, the provided ParameterResolver
and MapBuilder
dependencies.
The MapBuilder
dependencies are required to satisfy the requirement when realizing a NamedCache
additionally involves realizing one or more internal Map
s.
-
- Specified by:
realizeCache
in interface NamedCacheBuilder
- Overrides:
realizeCache
in class AbstractCachingScheme
-
- Parameters:
resolver
- the ParameterResolver
dependencies
- the MapBuilder
dependencies
- Returns:
- a
NamedCache
realizeBackingMapManager
public BackingMapManager realizeBackingMapManager(ConfigurableCacheFactory ccf)
- Realize a
BackingMapManager
to be scoped by the specified ConfigurableCacheFactory
.
-
- Specified by:
realizeBackingMapManager
in interface BackingMapManagerBuilder
- Overrides:
realizeBackingMapManager
in class AbstractCachingScheme
-
- Parameters:
ccf
- the ConfigurableCacheFactory
- Returns:
- a
BackingMapManager
getHighUnits
public int getHighUnits(com.tangosol.config.expression.ParameterResolver resolver)
- Return the limit of cache size. Contains the maximum number of units that can be placed n the cache before pruning occurs. An entry is the unit of measurement, unless it is overridden by an alternate unit-calculator. When this limit is exceeded, the cache begins the pruning process, evicting entries according to the eviction policy. Legal values are positive integers or zero. Zero implies no limit.
-
- Parameters:
resolver
- the ParameterResolver
- Returns:
- the high units
setHighUnits
@Injectable
public void setHighUnits(com.tangosol.config.expression.Expression expr)
- Set the high units.
-
- Parameters:
expr
- the high units expression
Skip navigation links
Copyright © 2000, 2014, Oracle and/or its affiliates. All rights reserved.