Package org.infinispan.manager
Class DefaultCacheManager
java.lang.Object
org.infinispan.manager.DefaultCacheManager
- All Implemented Interfaces:
Closeable,AutoCloseable,BasicCacheContainer,Lifecycle,CacheContainer,EmbeddedCacheManager,Listenable
@MBean(objectName="CacheManager",
description="Component that acts as a manager, factory and container for caches in the system.")
public class DefaultCacheManager
extends Object
implements EmbeddedCacheManager
A CacheManager is the primary mechanism for retrieving a
Cache instance, and is often used as a
starting point to using the Cache.
CacheManagers are heavyweight objects, and we foresee no more than one CacheManager being used per
JVM (unless specific configuration requirements require more than one; but either way, this would be a minimal and
finite number of instances).
Constructing a CacheManager is done via one of its constructors, which optionally take in a
Configuration or a path or URL to a configuration XML file.
Lifecycle - CacheManagers have a lifecycle (it implements Lifecycle) and the default constructors
also call start(). Overloaded versions of the constructors are available, that do not start the
CacheManager, although it must be kept in mind that CacheManagers need to be started before they
can be used to create Cache instances.
Once constructed, CacheManagers should be made available to any component that requires a Cache,
via JNDI or via some other mechanism such as an IoC container.
You obtain Cache instances from the CacheManager by using one of the overloaded
getCache(), methods. Note that with getCache(), there is no guarantee that the instance you get is
brand-new and empty, since caches are named and shared. Because of this, the CacheManager also acts as a
repository of Caches, and is an effective mechanism of looking up or creating Caches on demand.
When the system shuts down, it should call stop() on the CacheManager. This will ensure all caches
within its scope are properly stopped as well.
Sample usage:
CacheManager manager = CacheManager.getInstance("my-config-file.xml");
Cache<String, Person> entityCache = manager.getCache("myEntityCache");
entityCache.put("aPerson", new Person());
ConfigurationBuilder confBuilder = new ConfigurationBuilder();
confBuilder.clustering().cacheMode(CacheMode.REPL_SYNC);
manager.createCache("myReplicatedCache", confBuilder.build());
Cache<String, String> replicatedCache = manager.getCache("myReplicatedCache");
- Since:
- 4.0
- Author:
- Manik Surtani, Galder ZamarreƱo
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructs and starts a default instance of the CacheManager, using configuration defaults.DefaultCacheManager(boolean start) Constructs a default instance of the CacheManager, using configuration defaults.DefaultCacheManager(InputStream configurationStream) Constructs and starts a new instance of the CacheManager, using the input stream passed in to read configuration file contents.DefaultCacheManager(InputStream configurationStream, boolean start) Constructs a new instance of the CacheManager, using the input stream passed in to read configuration file contents.DefaultCacheManager(String configurationFile) Constructs and starts a new instance of the CacheManager, using the configuration file name passed in.DefaultCacheManager(String configurationFile, boolean start) Constructs a new instance of the CacheManager, using the configuration file name passed in.DefaultCacheManager(URL configurationURL, boolean start) Constructs a new instance of the CacheManager, using the input stream passed in to read configuration file contents.DefaultCacheManager(Configuration defaultConfiguration) Deprecated, for removal: This API element is subject to removal in a future version.DefaultCacheManager(Configuration defaultConfiguration, boolean start) Deprecated, for removal: This API element is subject to removal in a future version.Since 11.0, please useDefaultCacheManager(ConfigurationBuilderHolder, boolean)instead.DefaultCacheManager(GlobalConfiguration globalConfiguration) Constructs and starts a new instance of the CacheManager, using the global configuration passed in, and system defaults for the default named cache configuration.DefaultCacheManager(GlobalConfiguration globalConfiguration, boolean start) Constructs a new instance of the CacheManager, using the global configuration passed in, and system defaults for the default named cache configuration.DefaultCacheManager(GlobalConfiguration globalConfiguration, Configuration defaultConfiguration) Deprecated, for removal: This API element is subject to removal in a future version.Since 11.0, please useDefaultCacheManager(ConfigurationBuilderHolder, boolean)instead.DefaultCacheManager(GlobalConfiguration globalConfiguration, Configuration defaultConfiguration, boolean start) Deprecated, for removal: This API element is subject to removal in a future version.Since 11.0, please useDefaultCacheManager(ConfigurationBuilderHolder, boolean)instead.DefaultCacheManager(ConfigurationBuilderHolder holder, boolean start) Constructs a new instance of the CacheManager, using the holder passed in to read configuration settings. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCacheDependency(String from, String to) Add a dependency between two caches.addListenerAsync(Object listener) Asynchronous version ofListenable.addListener(Object)Provides anEmbeddedCacheManagerAdminwhose methods affect the entire cluster as opposed to a single node.booleancacheExists(String cacheName) A cache is considered to exist if it has been created and started via one of theEmbeddedCacheManager.getCache()methods and has not yet been removed viaEmbeddedCacheManager.removeCache(String).voidclose()<K,V> Cache<K, V> createCache(String name, Configuration configuration) Creates a cache on the local node using the supplied configuration.defineConfiguration(String name, String template, Configuration configurationOverride) Defines a cache configuration by first reading the template configuration and then applying the override.defineConfiguration(String name, Configuration configuration) Register a cache configuration in the cache manager.executor()Providess the cache manager based executor.Similar toBasicCacheContainer.getCacheNames()but filters out caches that are not accessible by the current userWarning: the address may benullbefore the first clustered cache starts and after all the clustered caches have been stopped.<K,V> Cache<K, V> getCache()Retrieves the default cache associated with this cache manager.<K,V> Cache<K, V> Retrieves a named cache from the system.<K,V> Cache<K, V> Similar toEmbeddedCacheManager.getCache(String), except if has the option to not create the cache if it is not already running.getCacheConfiguration(String name) Returns the configuration for the given cache.This method returns a collection of all cache configuration names.Returns global configuration for this CacheManagerThis method returns a collection of all cache names.intReturns an entry point for a Health Check API.Deprecated, for removal: This API element is subject to removal in a future version.getName()intlonglonggetSite()getStats()Returns statistics for this cache managerbooleanbooleanTests whether the default cache is running.booleanbooleanTests whether a cache is running.voidremoveCache(String cacheName) Removes a cache with the given name from the system.removeListenerAsync(Object listener) Asynchronous version ofListenable.removeListener(Object)voidvoidstart()Invoked on component startvoidvoidstartCache(String cacheName) startCaches(String... cacheNames) Starts a set of caches in parallel.voidstop()Invoked on component stoptoString()voidundefineConfiguration(String configurationName) Removes a configuration from the set of defined configurations.withSubject(Subject subject) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.infinispan.notifications.Listenable
addListener, removeListener
-
Field Details
-
OBJECT_NAME
- See Also:
-
-
Constructor Details
-
DefaultCacheManager
public DefaultCacheManager()Constructs and starts a default instance of the CacheManager, using configuration defaults. SeeConfigurationandGlobalConfigurationfor details of these defaults. -
DefaultCacheManager
public DefaultCacheManager(boolean start) Constructs a default instance of the CacheManager, using configuration defaults. SeeConfigurationandGlobalConfigurationfor details of these defaults.- Parameters:
start- if true, the cache manager is started
-
DefaultCacheManager
Deprecated, for removal: This API element is subject to removal in a future version.Since 11.0, please useDefaultCacheManager(ConfigurationBuilderHolder, boolean)instead.Constructs and starts a new instance of the CacheManager, using the default configuration passed in. SeeConfigurationandGlobalConfigurationfor details of these defaults.- Parameters:
defaultConfiguration- configuration to use as a template for all caches created
-
DefaultCacheManager
@Deprecated(forRemoval=true) public DefaultCacheManager(Configuration defaultConfiguration, boolean start) Deprecated, for removal: This API element is subject to removal in a future version.Since 11.0, please useDefaultCacheManager(ConfigurationBuilderHolder, boolean)instead.Constructs a new instance of the CacheManager, using the default configuration passed in. SeeGlobalConfigurationfor details of these defaults.- Parameters:
defaultConfiguration- configuration file to use as a template for all caches createdstart- if true, the cache manager is started
-
DefaultCacheManager
Constructs and starts a new instance of the CacheManager, using the global configuration passed in, and system defaults for the default named cache configuration. SeeConfigurationfor details of these defaults.- Parameters:
globalConfiguration- GlobalConfiguration to use for all caches created
-
DefaultCacheManager
Constructs a new instance of the CacheManager, using the global configuration passed in, and system defaults for the default named cache configuration. SeeConfigurationfor details of these defaults.- Parameters:
globalConfiguration- GlobalConfiguration to use for all caches createdstart- if true, the cache manager is started.
-
DefaultCacheManager
@Deprecated(forRemoval=true) public DefaultCacheManager(GlobalConfiguration globalConfiguration, Configuration defaultConfiguration) Deprecated, for removal: This API element is subject to removal in a future version.Since 11.0, please useDefaultCacheManager(ConfigurationBuilderHolder, boolean)instead.Constructs and starts a new instance of the CacheManager, using the global and default configurations passed in. If either of these are null, system defaults are used.- Parameters:
globalConfiguration- global configuration to use. If null, a default instance is created.defaultConfiguration- default configuration to use. If null, a default instance is created.
-
DefaultCacheManager
@Deprecated(forRemoval=true) public DefaultCacheManager(GlobalConfiguration globalConfiguration, Configuration defaultConfiguration, boolean start) Deprecated, for removal: This API element is subject to removal in a future version.Since 11.0, please useDefaultCacheManager(ConfigurationBuilderHolder, boolean)instead.Constructs a new instance of the CacheManager, using the global and default configurations passed in. If either of these are null, system defaults are used.- Parameters:
globalConfiguration- global configuration to use. If null, a default instance is created.defaultConfiguration- default configuration to use. If null, a default instance is created.start- if true, the cache manager is started
-
DefaultCacheManager
Constructs and starts a new instance of the CacheManager, using the configuration file name passed in. This constructor first searches for the named file on the classpath, and failing that, treats the file name as an absolute path.- Parameters:
configurationFile- name of configuration file to use as a template for all caches created- Throws:
IOException- if there is a problem with the configuration file.
-
DefaultCacheManager
Constructs a new instance of the CacheManager, using the configuration file name passed in. This constructor first searches for the named file on the classpath, and failing that, treats the file name as an absolute path.- Parameters:
configurationFile- name of configuration file to use as a template for all caches createdstart- if true, the cache manager is started- Throws:
IOException- if there is a problem with the configuration file.
-
DefaultCacheManager
Constructs and starts a new instance of the CacheManager, using the input stream passed in to read configuration file contents.- Parameters:
configurationStream- stream containing configuration file contents, to use as a template for all caches created- Throws:
IOException- if there is a problem with the configuration stream.
-
DefaultCacheManager
Constructs a new instance of the CacheManager, using the input stream passed in to read configuration file contents.- Parameters:
configurationStream- stream containing configuration file contents, to use as a template for all caches createdstart- if true, the cache manager is started- Throws:
IOException- if there is a problem reading the configuration stream
-
DefaultCacheManager
Constructs a new instance of the CacheManager, using the input stream passed in to read configuration file contents.- Parameters:
configurationURL- stream containing configuration file contents, to use as a template for all caches createdstart- if true, the cache manager is started- Throws:
IOException- if there is a problem reading the configuration stream
-
DefaultCacheManager
Constructs a new instance of the CacheManager, using the holder passed in to read configuration settings.- Parameters:
holder- holder containing configuration settings, to use as a template for all caches createdstart- if true, the cache manager is started
-
-
Method Details
-
defineConfiguration
Description copied from interface:EmbeddedCacheManagerRegister a cache configuration in the cache manager. The configuration will be automatically used when creating a cache with the same name, unless it is a template. If it is a template and it contains wildcards (`*` or `?`), it will be automatically used when creating caches that match the template. In order to extend an existing configuration, useConfigurationBuilder.read(org.infinispan.configuration.cache.Configuration). The other way to define a cache configuration is declaratively, in the XML file passed in to the cache manager.- Specified by:
defineConfigurationin interfaceEmbeddedCacheManager- Parameters:
name- name of the cache configurationconfiguration- the cache configuration- Returns:
- the cache configuration
-
defineConfiguration
public Configuration defineConfiguration(String name, String template, Configuration configurationOverride) Description copied from interface:EmbeddedCacheManagerDefines a cache configuration by first reading the template configuration and then applying the override. The configuration will be automatically used when creating a cache with the same name, unless it is a template. If it is a template and it contains wildcards (`*` or `?`), it will be automatically used when creating caches that match the template. The other way to define a cache configuration is declaratively, in the XML file passed in to the cache manager. If templateName is null, this method works exactly likeEmbeddedCacheManager.defineConfiguration(String, Configuration).- Specified by:
defineConfigurationin interfaceEmbeddedCacheManager- Parameters:
name- name of cache whose configuration is being definedtemplate- configuration to use as a templateconfigurationOverride- configuration overrides on top of the template- Returns:
- the configuration
-
undefineConfiguration
Description copied from interface:EmbeddedCacheManagerRemoves a configuration from the set of defined configurations. If the named configuration does not exist, nothing happens.- Specified by:
undefineConfigurationin interfaceEmbeddedCacheManager- Parameters:
configurationName- the named configuration
-
createCache
Description copied from interface:EmbeddedCacheManagerCreates a cache on the local node using the supplied configuration. The cache may be clustered, but this method (or the equivalent combination ofEmbeddedCacheManager.defineConfiguration(String, Configuration)andEmbeddedCacheManager.getCache(String, boolean)) needs to be invoked on all nodes.- Specified by:
createCachein interfaceEmbeddedCacheManager- Type Parameters:
K- the generic type of the keyV- the generic type of the value- Parameters:
name- the name of the cacheconfiguration- the configuration to use.- Returns:
- the cache
-
getCache
Retrieves the default cache associated with this cache manager. Note that the default cache does not need to be explicitly created withcreateCache(String)(String)} since it is automatically created lazily when first used. As such, this method is always guaranteed to return the default cache.- Specified by:
getCachein interfaceBasicCacheContainer- Specified by:
getCachein interfaceCacheContainer- Specified by:
getCachein interfaceEmbeddedCacheManager- Returns:
- the default cache.
-
getCache
Retrieves a named cache from the system. If the cache has been previously created with the same name, the running cache instance is returned. Otherwise, this method attempts to create the cache first. When creating a new cache, this method will use the configuration passed in to the CacheManager on construction, as a template, and then optionally apply any overrides previously defined for the named cache using thedefineConfiguration(String, Configuration)ordefineConfiguration(String, String, Configuration)methods, or declared in the configuration file.- Specified by:
getCachein interfaceBasicCacheContainer- Specified by:
getCachein interfaceCacheContainer- Specified by:
getCachein interfaceEmbeddedCacheManager- Parameters:
cacheName- name of cache to retrieve- Returns:
- a cache instance identified by cacheName
-
cacheExists
Description copied from interface:EmbeddedCacheManagerA cache is considered to exist if it has been created and started via one of theEmbeddedCacheManager.getCache()methods and has not yet been removed viaEmbeddedCacheManager.removeCache(String). In environments when caches are continuously created and removed, this method offers the possibility to find out whether a cache has either, not been started, or if it was started, whether it's been removed already or not.- Specified by:
cacheExistsin interfaceEmbeddedCacheManager- Parameters:
cacheName- cache to check- Returns:
- true if the cache with the given name has not yet been started, or if it was started, whether it's been removed or not.
-
getCache
Description copied from interface:EmbeddedCacheManagerSimilar toEmbeddedCacheManager.getCache(String), except if has the option to not create the cache if it is not already running.- Specified by:
getCachein interfaceEmbeddedCacheManager- Parameters:
cacheName- name of cache to retrievecreateIfAbsent- If true, this methods works just likeEmbeddedCacheManager.getCache(String). If false, return the already running cache or null.- Returns:
- null if the cache does not exist and createIfAbsent == false, otherwise a cache instance identified by cacheName
-
startCaches
Description copied from interface:EmbeddedCacheManagerStarts a set of caches in parallel. Infinispan supports both symmetric and asymmetric clusters; that is, multiple nodes having the same or different sets of caches running, respectively. Calling this method on application/application server startup with all your cache names will ensure that the cluster is symmetric.- Specified by:
startCachesin interfaceEmbeddedCacheManager- Parameters:
cacheNames- the names of the caches to start
-
removeCache
Description copied from interface:EmbeddedCacheManagerRemoves a cache with the given name from the system. This is a cluster wide operation that results not only in stopping the cache with the given name in all nodes in the cluster, but also deletes its contents both in memory and in any backing cache store.- Specified by:
removeCachein interfaceEmbeddedCacheManager- Parameters:
cacheName- name of cache to remove
-
getMembers
- Specified by:
getMembersin interfaceEmbeddedCacheManager- Returns:
- the addresses of all the members in the cluster, or
nullif not connected
-
getAddress
Warning: the address may benullbefore the first clustered cache starts and after all the clustered caches have been stopped.- Specified by:
getAddressin interfaceEmbeddedCacheManager- Returns:
- the address of the local node, or
nullif not connected
-
getCoordinator
- Specified by:
getCoordinatorin interfaceEmbeddedCacheManager- Returns:
- the address of the cluster's coordinator, or
nullif not connected
-
getCoordinatorAddress
@ManagedAttribute(description="The logical address of the cluster\'s coordinator", displayName="Coordinator address") public String getCoordinatorAddress() -
isCoordinator
@ManagedAttribute(description="Indicates whether this node is coordinator", displayName="Is coordinator?") public boolean isCoordinator()- Specified by:
isCoordinatorin interfaceEmbeddedCacheManager- Returns:
- whether the local node is the cluster's coordinator, or
nullif not connected
-
start
public void start()Description copied from interface:LifecycleInvoked on component start -
shutdownAllCaches
public void shutdownAllCaches() -
stop
public void stop()Description copied from interface:LifecycleInvoked on component stop -
addListenerAsync
Description copied from interface:ListenableAsynchronous version ofListenable.addListener(Object)- Specified by:
addListenerAsyncin interfaceListenable- Parameters:
listener- listener to add, must not be null- Returns:
- CompletionStage that when complete the listener is fully installed
-
removeListenerAsync
Description copied from interface:ListenableAsynchronous version ofListenable.removeListener(Object)- Specified by:
removeListenerAsyncin interfaceListenable- Parameters:
listener- listener to remove, must not be null- Returns:
- CompletionStage that when complete the listener is fully removed
-
getListeners
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getListenersin interfaceListenable- Returns:
- a set of all listeners registered on this component.
-
getStatus
- Specified by:
getStatusin interfaceEmbeddedCacheManager- Returns:
- the status of the cache manager
-
getCacheManagerConfiguration
Description copied from interface:EmbeddedCacheManagerReturns global configuration for this CacheManager- Specified by:
getCacheManagerConfigurationin interfaceEmbeddedCacheManager- Returns:
- the global configuration object associated to this CacheManager
-
getDefaultCacheConfiguration
- Specified by:
getDefaultCacheConfigurationin interfaceEmbeddedCacheManager- Returns:
- the default cache's configuration, or
nullif there is no default cache.
-
getCacheConfiguration
Description copied from interface:EmbeddedCacheManagerReturns the configuration for the given cache.- Specified by:
getCacheConfigurationin interfaceEmbeddedCacheManager- Returns:
- the configuration for the given cache or null if no such cache is defined
-
getCacheNames
Description copied from interface:BasicCacheContainerThis method returns a collection of all cache names. The configurations may have been defined via XML, in the programmatic configuration, or at runtime. Internal-only caches are not included.- Specified by:
getCacheNamesin interfaceBasicCacheContainer- Returns:
- an immutable set of cache names registered in this cache manager.
-
getAccessibleCacheNames
Description copied from interface:EmbeddedCacheManagerSimilar toBasicCacheContainer.getCacheNames()but filters out caches that are not accessible by the current user- Specified by:
getAccessibleCacheNamesin interfaceEmbeddedCacheManager
-
getCacheConfigurationNames
Description copied from interface:EmbeddedCacheManagerThis method returns a collection of all cache configuration names. The configurations may have been defined via XML, programmatically viaConfigurationBuilderHolder, or at runtime viaEmbeddedCacheManager.defineConfiguration(String, Configuration). Internal caches defined viaInternalCacheRegistryare not included.- Specified by:
getCacheConfigurationNamesin interfaceEmbeddedCacheManager- Returns:
- an immutable set of configuration names registered in this cache manager.
-
isRunning
Description copied from interface:EmbeddedCacheManagerTests whether a cache is running.- Specified by:
isRunningin interfaceEmbeddedCacheManager- Parameters:
cacheName- name of cache to test.- Returns:
- true if the cache exists and is running; false otherwise.
-
isDefaultRunning
public boolean isDefaultRunning()Description copied from interface:EmbeddedCacheManagerTests whether the default cache is running.- Specified by:
isDefaultRunningin interfaceEmbeddedCacheManager- Returns:
- true if the default cache is running; false otherwise.
-
getCacheManagerStatus
@ManagedAttribute(description="The status of the cache manager instance.", displayName="Cache manager status", dataType=TRAIT) public String getCacheManagerStatus() -
getDefinedCacheNames
@ManagedAttribute(description="The defined cache names and their statuses. The default cache is not included in this representation.", displayName="List of defined caches", dataType=TRAIT) public String getDefinedCacheNames() -
getDefinedCacheConfigurationNames
@ManagedAttribute(description="The defined cache configuration names.", displayName="List of defined cache configurations", dataType=TRAIT) public String getDefinedCacheConfigurationNames() -
getDefinedCacheCount
@ManagedAttribute(description="The total number of defined cache configurations.", displayName="Number of caches defined") public String getDefinedCacheCount() -
getNumberOfCacheConfigurations
@ManagedAttribute(description="The total number of defined cache configurations.", displayName="Number of caches defined") public int getNumberOfCacheConfigurations() -
getCreatedCacheCount
@ManagedAttribute(description="The total number of created caches, including the default cache.", displayName="Number of caches created") public String getCreatedCacheCount() -
getNumberOfCreatedCaches
@ManagedAttribute(description="The total number of created caches, including the default cache.", displayName="Number of caches created") public long getNumberOfCreatedCaches() -
getRunningCacheCount
@ManagedAttribute(description="The total number of running caches, including the default cache.", displayName="Number of running caches") public String getRunningCacheCount() -
getNumberOfRunningCaches
@ManagedAttribute(description="The total number of running caches, including the default cache.", displayName="Number of running caches") public long getNumberOfRunningCaches() -
getVersion
@ManagedAttribute(description="Returns the version of Infinispan", displayName="Infinispan version", dataType=TRAIT) public String getVersion() -
getName
@ManagedAttribute(description="The name of this cache manager", displayName="Cache manager name", dataType=TRAIT) public String getName() -
startCache
@ManagedOperation(description="Starts the default cache associated with this cache manager", displayName="Starts the default cache") public void startCache() -
startCache
@ManagedOperation(description="Starts a named cache from this cache manager", name="startCache", displayName="Starts a cache with the given name") public void startCache(@Parameter(name="cacheName",description="Name of cache to start") String cacheName) -
getNodeAddress
@ManagedAttribute(description="The network address associated with this instance", displayName="Network address", dataType=TRAIT) public String getNodeAddress() -
getPhysicalAddresses
@ManagedAttribute(description="The physical network addresses associated with this instance", displayName="Physical network addresses", dataType=TRAIT) public String getPhysicalAddresses() -
getClusterMembers
@ManagedAttribute(description="List of members in the cluster", displayName="Cluster members", dataType=TRAIT) public String getClusterMembers() -
getClusterMembersPhysicalAddresses
@ManagedAttribute(description="List of members in the cluster", displayName="Cluster members", dataType=TRAIT) public String getClusterMembersPhysicalAddresses() -
getClusterSize
@ManagedAttribute(description="Size of the cluster in number of nodes", displayName="Cluster size") public int getClusterSize() -
getClusterName
@ManagedAttribute(description="Cluster name", displayName="Cluster name", dataType=TRAIT) public String getClusterName()- Specified by:
getClusterNamein interfaceEmbeddedCacheManager- Returns:
- the name of the cluster. Null if running in local mode.
-
getSite
@ManagedAttribute(description="Returns the local site name", displayName="Local site name", dataType=TRAIT) public String getSite() -
getSiteView
@ManagedAttribute(description="Lists all online sites", displayName="Online Sites", dataType=TRAIT) public String getSiteView() -
isRelayNode
@ManagedAttribute(description="Indicates whether this node is a relay node", displayName="Is relay node?", dataType=TRAIT) public boolean isRelayNode() -
getRelayNodesAddress
@ManagedAttribute(description="Lists relay nodes in the local site", displayName="Relay nodes", dataType=TRAIT) public String getRelayNodesAddress() -
getTransport
- Specified by:
getTransportin interfaceEmbeddedCacheManager
-
getGlobalComponentRegistry
- Specified by:
getGlobalComponentRegistryin interfaceEmbeddedCacheManager
-
addCacheDependency
Description copied from interface:EmbeddedCacheManagerAdd a dependency between two caches. The cache manager will make sure that a cache is stopped before any of its dependencies- Specified by:
addCacheDependencyin interfaceEmbeddedCacheManager- Parameters:
from- cache nameto- cache name
-
toString
-
getGlobalConfigurationAsProperties
@ManagedAttribute(description="Global configuration properties", displayName="Global configuration properties", dataType=TRAIT) public Properties getGlobalConfigurationAsProperties() -
getStats
Description copied from interface:EmbeddedCacheManagerReturns statistics for this cache manager- Specified by:
getStatsin interfaceEmbeddedCacheManager- Returns:
- statistics for this cache manager
-
getHealth
Description copied from interface:EmbeddedCacheManagerReturns an entry point for a Health Check API.- Specified by:
getHealthin interfaceEmbeddedCacheManager- Returns:
- Health API for this
EmbeddedCacheManager.
-
getCacheManagerInfo
- Specified by:
getCacheManagerInfoin interfaceEmbeddedCacheManager- Returns:
- an instance of
CacheManagerInfoused to get basic info about the cache manager.
-
executor
Description copied from interface:EmbeddedCacheManagerProvidess the cache manager based executor. This can be used to execute a given operation upon the cluster or a single node if desired. If this manager is not clustered this will execute locally only.Note that not all
EmbeddedCacheManagerimplementations may implement this. Those that don't will throw aUnsupportedOperationExceptionupon invocation.- Specified by:
executorin interfaceEmbeddedCacheManager- Returns:
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
getClassWhiteList
- Specified by:
getClassWhiteListin interfaceEmbeddedCacheManager
-
getClassAllowList
- Specified by:
getClassAllowListin interfaceEmbeddedCacheManager
-
administration
Description copied from interface:EmbeddedCacheManagerProvides anEmbeddedCacheManagerAdminwhose methods affect the entire cluster as opposed to a single node.- Specified by:
administrationin interfaceCacheContainer- Specified by:
administrationin interfaceEmbeddedCacheManager- Returns:
- a cluster-aware
EmbeddedCacheManagerAdmin
-
getSubject
- Specified by:
getSubjectin interfaceEmbeddedCacheManager
-
withSubject
- Specified by:
withSubjectin interfaceEmbeddedCacheManager
-
DefaultCacheManager(ConfigurationBuilderHolder, boolean)instead.