public class ClusteredInstanceFactoryWrapper extends java.lang.Object implements ClusteredInstanceFactory
ClusteredInstanceFactory
implementation that delegates all operations to an underlying delegate except for the following
operations:
getTopology()
: Delegates to the TerracottaClient.getCacheCluster()
Modifier and Type | Field and Description |
---|---|
private TerracottaClient |
client |
private ClusteredInstanceFactory |
delegate |
Constructor and Description |
---|
ClusteredInstanceFactoryWrapper(TerracottaClient client,
ClusteredInstanceFactory delegate)
Constructor accepting the TerracottaClient and the actual factory
|
Modifier and Type | Method and Description |
---|---|
CacheEventListener |
createEventReplicator(Ehcache cache)
Create a replicator for the cache events of a given cache
|
Store |
createStore(Ehcache cache)
Create a Store instance for the given cache
|
TransactionIDFactory |
createTransactionIDFactory(java.lang.String uuid,
java.lang.String cacheManagerName)
Create a TransactionIDFactory
|
WriteBehind |
createWriteBehind(Ehcache cache)
Create an WriteBehind instance for the given cache
|
protected ClusteredInstanceFactory |
getActualFactory()
Returns the actual underlying factory
|
SoftLockManager |
getOrCreateSoftLockManager(Ehcache cache)
Create a SoftLockManager for a cache
|
CacheCluster |
getTopology()
Get an api for looking at the clustered node topology.
|
java.lang.String |
getUUID()
Returns a universally unique identifiers for this factory.
|
void |
shutdown()
Cleans up any resources left behind after the shutdown of the associated CacheManager
|
private final TerracottaClient client
private final ClusteredInstanceFactory delegate
public ClusteredInstanceFactoryWrapper(TerracottaClient client, ClusteredInstanceFactory delegate)
client
- delegate
- protected ClusteredInstanceFactory getActualFactory()
public CacheCluster getTopology()
getTopology
in interface ClusteredInstanceFactory
public java.lang.String getUUID()
getUUID
in interface ClusteredInstanceFactory
public CacheEventListener createEventReplicator(Ehcache cache)
createEventReplicator
in interface ClusteredInstanceFactory
cache
- the cache to which the replicator will be boundpublic Store createStore(Ehcache cache)
createStore
in interface ClusteredInstanceFactory
cache
- the cache will backed by the returned storepublic TransactionIDFactory createTransactionIDFactory(java.lang.String uuid, java.lang.String cacheManagerName)
createTransactionIDFactory
in interface ClusteredInstanceFactory
uuid
- a UUID unique to the clustercacheManagerName
- the name of the cache manager creating a TransactionIDFactorypublic WriteBehind createWriteBehind(Ehcache cache)
createWriteBehind
in interface ClusteredInstanceFactory
cache
- the cache to which the write behind will be tiedpublic SoftLockManager getOrCreateSoftLockManager(Ehcache cache)
getOrCreateSoftLockManager
in interface ClusteredInstanceFactory
cache
- the cache for which to create a SoftLockManagerpublic void shutdown()
shutdown
in interface ClusteredInstanceFactory