Class CacheStoreScheme
- java.lang.Object
-
- com.tangosol.coherence.config.scheme.AbstractScheme
-
- com.tangosol.coherence.config.scheme.CacheStoreScheme
-
- All Implemented Interfaces:
BuilderCustomization<Object>
,BundlingScheme
,Scheme
public class CacheStoreScheme extends AbstractScheme implements BuilderCustomization<Object>, BundlingScheme
TheCacheStoreScheme
class is responsible for building a fully configured instance of a CacheStore, CacheLoader or remote NamedCache. The remote cache is only used within a ReadWriteBackingMap scheme. Also, even though bundling is specified in the CacheStore scheme, it is not used here. Rather, it is used byReadWriteBackingMapScheme
, which contains aCacheStoreScheme
.- Since:
- Coherence 12.1.2
- Author:
- pfm 2011.11.30
-
-
Constructor Summary
Constructors Constructor Description CacheStoreScheme()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BundleManager
getBundleManager()
Obtains theBundleManager
.ParameterizedBuilder<Object>
getCustomBuilder()
Obtains the customParameterizedBuilder
.RemoteCacheScheme
getRemoteCacheScheme()
Return theRemoteCacheScheme
.protected boolean
isSerializerCompatible(Service serviceThis, Service serviceThat)
Determines whether or not the serializers for the specified services are compatible.Object
realize(ParameterResolver resolver, MapBuilder.Dependencies dependencies)
Realize (ensure) a remote NamedCache, CacheStore, CacheLoader, or BinaryEntryStore as specified by the builder.Object
realizeLocal(ParameterResolver resolver, MapBuilder.Dependencies dependencies)
Return an instance of a CacheStore, CacheLoader or a BinaryEntryStore.void
setBundleManager(BundleManager mgrBundle)
Set theBundleManager
.void
setCustomBuilder(ParameterizedBuilder<Object> bldr)
Sets theParameterizedBuilder
to be used as the alternate builder.void
setRemoteCacheScheme(RemoteCacheScheme bldr)
Set theRemoteCacheScheme
.-
Methods inherited from class com.tangosol.coherence.config.scheme.AbstractScheme
getSchemeName, isAnonymous, setSchemeName, validate
-
-
-
-
Method Detail
-
realizeLocal
public Object realizeLocal(ParameterResolver resolver, MapBuilder.Dependencies dependencies)
Return an instance of a CacheStore, CacheLoader or a BinaryEntryStore.- Parameters:
resolver
- theParameterResolver
dependencies
- theMapBuilder.Dependencies
- Returns:
- an instance of CacheStore, CacheLoader or BinaryEntryStore
-
realize
public Object realize(ParameterResolver resolver, MapBuilder.Dependencies dependencies)
Realize (ensure) a remote NamedCache, CacheStore, CacheLoader, or BinaryEntryStore as specified by the builder. The returned cache is fully configured and ready to be used.- Parameters:
resolver
- the ParameterResolverdependencies
- the Dependencies- Returns:
- the NamedCache, CacheStore, CacheLoader, or BinaryEntryStore
-
setBundleManager
@Injectable("operation-bundling") public void setBundleManager(BundleManager mgrBundle)
Set theBundleManager
.- Parameters:
mgrBundle
- the BundleManager
-
getRemoteCacheScheme
public RemoteCacheScheme getRemoteCacheScheme()
Return theRemoteCacheScheme
.- Returns:
- the
RemoteCacheScheme
-
setRemoteCacheScheme
@Injectable("remote-cache-scheme") public void setRemoteCacheScheme(RemoteCacheScheme bldr)
Set theRemoteCacheScheme
.- Parameters:
bldr
- theRemoteCacheScheme
-
getBundleManager
public BundleManager getBundleManager()
Obtains theBundleManager
.- Specified by:
getBundleManager
in interfaceBundlingScheme
- Returns:
- the BundleManager
-
getCustomBuilder
public ParameterizedBuilder<Object> getCustomBuilder()
Obtains the customParameterizedBuilder
.- Specified by:
getCustomBuilder
in interfaceBuilderCustomization<Object>
- Returns:
- the
ParameterizedBuilder
-
setCustomBuilder
public void setCustomBuilder(ParameterizedBuilder<Object> bldr)
Sets theParameterizedBuilder
to be used as the alternate builder.- Specified by:
setCustomBuilder
in interfaceBuilderCustomization<Object>
- Parameters:
bldr
- the ParameterizedBuilder
-
isSerializerCompatible
protected boolean isSerializerCompatible(Service serviceThis, Service serviceThat)
Determines whether or not the serializers for the specified services are compatible. In other words, this method returns true if object serialized with the first Serializer can be deserialized by the second and visa versa.- Parameters:
serviceThis
- the first ServiceserviceThat
- the second Service- Returns:
- true if the two Serializers are stream compatible
-
-