Package net.sf.ehcache.terracotta
Class TerracottaClient
- java.lang.Object
-
- net.sf.ehcache.terracotta.TerracottaClient
-
public class TerracottaClient extends java.lang.ObjectClass encapsulating the idea of a Terracotta client. Provides access to theClusteredInstanceFactoryfor the cluster- Author:
- Abhishek Sanoujam
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCUSTOM_SECRET_PROVIDER_SYSTEM_PROPERTYSystem property used to specify the secrect provider to use
-
Constructor Summary
Constructors Constructor Description TerracottaClient(CacheManager cacheManager, TerracottaClientConfiguration terracottaClientConfiguration)Constructor accepting theCacheManagerand theTerracottaClientConfiguration
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancreateClusteredInstanceFactory()Returns true if the clusteredInstanceFactory was created, otherwise returns false.TerracottaCacheClustergetCacheCluster()Get theCacheClusterassociated with this clientClusteredInstanceFactorygetClusteredInstanceFactory()Returns theClusteredInstanceFactoryassociated with this clientvoidshutdown()Shuts down the clientvoidwaitForOrchestrator(java.lang.String cacheManagerName)Wait for the Orchestrator for this CacheManager
-
-
-
Field Detail
-
CUSTOM_SECRET_PROVIDER_SYSTEM_PROPERTY
public static final java.lang.String CUSTOM_SECRET_PROVIDER_SYSTEM_PROPERTY
System property used to specify the secrect provider to use- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TerracottaClient
public TerracottaClient(CacheManager cacheManager, TerracottaClientConfiguration terracottaClientConfiguration)
Constructor accepting theCacheManagerand theTerracottaClientConfiguration- Parameters:
cacheManager- the cache manager to be clusteredterracottaClientConfiguration- the configuration for the terracotta client
-
-
Method Detail
-
getClusteredInstanceFactory
public ClusteredInstanceFactory getClusteredInstanceFactory()
Returns theClusteredInstanceFactoryassociated with this client- Returns:
- The ClusteredInstanceFactory
-
createClusteredInstanceFactory
public boolean createClusteredInstanceFactory()
Returns true if the clusteredInstanceFactory was created, otherwise returns false. Multiple threads calling this method block and only one of them creates the factory.- Returns:
- true if the clusteredInstanceFactory was created, otherwise returns false
-
getCacheCluster
public TerracottaCacheCluster getCacheCluster()
Get theCacheClusterassociated with this client- Returns:
- the
CacheClusterassociated with this client
-
shutdown
public void shutdown()
Shuts down the client
-
waitForOrchestrator
public void waitForOrchestrator(java.lang.String cacheManagerName)
Wait for the Orchestrator for this CacheManager- Parameters:
cacheManagerName- Name of the cache manager
-
-