Top Description Inners Fields Constructors Methods
net.sf.ehcache.terracotta

pack-priv Class TerracottaClusteredInstanceHelper

extends Object
Class Inheritance
Imports
net.sf.ehcache.CacheException, net.sf.ehcache.config.TerracottaClientConfiguration, net.sf.ehcache.util.ClassLoaderUtil, org.slf4j.Logger, .LoggerFactory

A small helper class that knows how to create terracotta store factories
Authors
teck, Abhishek Sanoujam

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static enum

Field Summary

Modifier and TypeField and Description
private static final String
private static final String
private static TerracottaClusteredInstanceHelper
instance

Singleton instance

private static final Logger
private volatile TerracottaClusteredInstanceHelper.TerracottaRuntimeType

Constructor Summary

AccessConstructor and Description
private
TerracottaClusteredInstanceHelper()

Private constructor

Method Summary

Modifier and TypeMethod and Description
private static void
public static TerracottaClusteredInstanceHelper
getInstance()

Returns the singleton instance

pack-priv TerracottaClusteredInstanceHelper.TerracottaRuntimeType

Returns:

the terracotta runtime type or null if no runtime could be found
getTerracottaRuntimeTypeOrNull
()

Returns the terracotta runtime type or null if no runtime could be found

private TerracottaClusteredInstanceHelper.TerracottaRuntimeType

Returns:

the current terracotta runtime
lookupTerracottaRuntime
()

Lookup the current terracotta runtime

pack-priv ClusteredInstanceFactory

Returns:

the selected terracotta store factory
newClusteredInstanceFactory
(TerracottaClientConfiguration terracottaConfig, ClassLoader loader)

Locate and decide which terracotta ClusteredInstanceFactory should be used.

private static void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ENTERPRISE_EXPRESS_FACTORYback to summary
private static final String ENTERPRISE_EXPRESS_FACTORY
EXPRESS_FACTORYback to summary
private static final String EXPRESS_FACTORY
instanceback to summary
private static TerracottaClusteredInstanceHelper instance

Singleton instance

LOGGERback to summary
private static final Logger LOGGER
terracottaRuntimeTypeback to summary
private volatile TerracottaClusteredInstanceHelper.TerracottaRuntimeType terracottaRuntimeType

Constructor Detail

TerracottaClusteredInstanceHelperback to summary
private TerracottaClusteredInstanceHelper()

Private constructor

Method Detail

assertExpressback to summary
private static void assertExpress(TerracottaClientConfiguration terracottaConfig)
getInstanceback to summary
public static TerracottaClusteredInstanceHelper getInstance()

Returns the singleton instance

getTerracottaRuntimeTypeOrNullback to summary
pack-priv TerracottaClusteredInstanceHelper.TerracottaRuntimeType getTerracottaRuntimeTypeOrNull()

Returns the terracotta runtime type or null if no runtime could be found

Returns:TerracottaClusteredInstanceHelper.TerracottaRuntimeType

the terracotta runtime type or null if no runtime could be found

lookupTerracottaRuntimeback to summary
private TerracottaClusteredInstanceHelper.TerracottaRuntimeType lookupTerracottaRuntime()

Lookup the current terracotta runtime

Returns:TerracottaClusteredInstanceHelper.TerracottaRuntimeType

the current terracotta runtime

newClusteredInstanceFactoryback to summary
pack-priv ClusteredInstanceFactory newClusteredInstanceFactory(TerracottaClientConfiguration terracottaConfig, ClassLoader loader)

Locate and decide which terracotta ClusteredInstanceFactory should be used. If the standalone factory class is available it is preferred

Returns:ClusteredInstanceFactory

the selected terracotta store factory

setTestModeback to summary
private static void setTestMode(TerracottaClusteredInstanceHelper testHelper)
net.sf.ehcache.terracotta back to summary

pack-priv final Enum TerracottaClusteredInstanceHelper.TerracottaRuntimeType

extends Enum<TerracottaClusteredInstanceHelper.TerracottaRuntimeType>
Class Inheritance

Enum for type of Terracotta runtime

Field Summary

Modifier and TypeField and Description
public static final TerracottaClusteredInstanceHelper.TerracottaRuntimeType
EnterpriseExpress

Enum representing Enterprise Express mode

public static final TerracottaClusteredInstanceHelper.TerracottaRuntimeType
Express

Enum representing Express mode

private final String

Constructor Summary

AccessConstructor and Description
private
TerracottaRuntimeType(String factoryClassName)

Private constructor

Method Summary

Modifier and TypeMethod and Description
public Class<T>

Returns:

the factory class for this mode or null if class is not present in classpath
getFactoryClassOrNull
()

Returns the factory class for this mode or null if class is not present in classpath

public static TerracottaClusteredInstanceHelper.TerracottaRuntimeType
public static TerracottaClusteredInstanceHelper.TerracottaRuntimeType[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

EnterpriseExpressback to summary
public static final TerracottaClusteredInstanceHelper.TerracottaRuntimeType EnterpriseExpress

Enum representing Enterprise Express mode

Expressback to summary
public static final TerracottaClusteredInstanceHelper.TerracottaRuntimeType Express

Enum representing Express mode

factoryClassNameback to summary
private final String factoryClassName

Constructor Detail

TerracottaRuntimeTypeback to summary
private TerracottaRuntimeType(String factoryClassName)

Private constructor

Method Detail

getFactoryClassOrNullback to summary
public Class<T> getFactoryClassOrNull()

Returns the factory class for this mode or null if class is not present in classpath

Returns:Class<T>

the factory class for this mode or null if class is not present in classpath

valueOfback to summary
public static TerracottaClusteredInstanceHelper.TerracottaRuntimeType valueOf(String name)
valuesback to summary
public static TerracottaClusteredInstanceHelper.TerracottaRuntimeType[] values()