ehcache

net.sf.ehcache.terracotta
Class TerracottaClient

java.lang.Object
  extended by net.sf.ehcache.terracotta.TerracottaClient

public class TerracottaClient
extends Object

Class encapsulating the idea of a Terracotta client. Provides access to the ClusteredInstanceFactory for the cluster

Author:
Abhishek Sanoujam

Field Summary
static String CUSTOM_SECRET_PROVIDER_SYSTEM_PROPERTY
          System property used to specify the secrect provider to use
 
Constructor Summary
TerracottaClient(CacheManager cacheManager, TerracottaClientConfiguration terracottaClientConfiguration)
          Constructor accepting the CacheManager and the TerracottaClientConfiguration
 
Method Summary
 boolean createClusteredInstanceFactory()
          Returns true if the clusteredInstanceFactory was created, otherwise returns false.
 TerracottaCacheCluster getCacheCluster()
          Get the CacheCluster associated with this client
 ClusteredInstanceFactory getClusteredInstanceFactory()
          Returns the ClusteredInstanceFactory associated with this client
 void shutdown()
          Shuts down the client
 void waitForOrchestrator(String cacheManagerName)
          Wait for the Orchestrator for this CacheManager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CUSTOM_SECRET_PROVIDER_SYSTEM_PROPERTY

public static final 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 the CacheManager and the TerracottaClientConfiguration

Parameters:
cacheManager - the cache manager to be clustered
terracottaClientConfiguration - the configuration for the terracotta client
Method Detail

getClusteredInstanceFactory

public ClusteredInstanceFactory getClusteredInstanceFactory()
Returns the ClusteredInstanceFactory associated 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 the CacheCluster associated with this client

Returns:
the CacheCluster associated with this client

shutdown

public void shutdown()
Shuts down the client


waitForOrchestrator

public void waitForOrchestrator(String cacheManagerName)
Wait for the Orchestrator for this CacheManager

Parameters:
cacheManagerName - Name of the cache manager

ehcache

Copyright 2001-2014, Terracotta, Inc.