Class GlobalStateConfigurationBuilder
- java.lang.Object
-
- org.infinispan.configuration.global.GlobalStateConfigurationBuilder
-
- All Implemented Interfaces:
Builder<GlobalStateConfiguration>,GlobalConfigurationChildBuilder
public class GlobalStateConfigurationBuilder extends Object implements Builder<GlobalStateConfiguration>
GlobalStateConfigurationBuilder. Configures filesystem paths where global state is stored.- Since:
- 8.1
- Author:
- Tristan Tarrant
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ThreadPoolConfigurationBuilderasyncThreadPool()Configuration for the asynchronous operations thread poolGlobalConfigurationbuild()Builds aGlobalConfigurationobject using the settings applied to this builderGlobalStateConfigurationBuilderconfigurationStorage(ConfigurationStorage storage)Defines theConfigurationStoragestrategy to use.GlobalStateConfigurationBuilderconfigurationStorageSupplier(Supplier<? extends LocalConfigurationStorage> configurationStorageSupplier)Defines the @LocalConfigurationStorage.GlobalStateConfigurationcreate()Create the configuration beanGlobalConfigurationBuilderdefaultCacheName(String defaultCacheName)Sets the name of the cache that acts as the default cache and is returned byEmbeddedCacheManager.getCache().GlobalStateConfigurationBuilderdisable()GlobalStateConfigurationBuilderenable()booleanenabled()GlobalStateConfigurationBuilderenabled(boolean enabled)Enables or disables the storage of global state.ThreadPoolConfigurationBuilderexpirationThreadPool()Configuration for the expiration thread poolprotected GlobalConfigurationBuildergetGlobalConfig()GlobalStateConfigurationBuilderglobalState()Global state configurationGlobalJmxConfigurationBuilderjmx()Global JMX configuration.ThreadPoolConfigurationBuilderlistenerThreadPool()Configuration for the listener thread poolGlobalMetricsConfigurationBuildermetrics()Global microprofile metrics configuration.List<Builder<?>>modules()Global modules configurationThreadPoolConfigurationBuilderpersistenceThreadPool()Configuration for the persistence thread poolGlobalStateConfigurationBuilderpersistentLocation(String location)Defines the filesystem path where node-specific persistent data which needs to survive container restarts should be stored.GlobalStateConfigurationBuilderpersistentLocation(String path, String relativeTo)Builder<?>read(GlobalStateConfiguration template)Reads the configuration from an already created configuration bean into this builder.GlobalSecurityConfigurationBuildersecurity()Security-related configurationSerializationConfigurationBuilderserialization()Global serialization (i.e.GlobalStateConfigurationBuildersharedPersistentLocation(String location)Defines the filesystem path where shared persistent state data which needs to survive container restarts should be stored.GlobalStateConfigurationBuildersharedPersistentLocation(String path, String relativeTo)ShutdownConfigurationBuildershutdown()Shutdown configurationSiteConfigurationBuildersite()Cross-site replication configurationThreadPoolConfigurationBuilderstateTransferThreadPool()Configuration for the state-transfer thread poolGlobalStateConfigurationBuildertemporaryLocation(String location)Defines the filesystem path where temporary state should be stored.GlobalStateConfigurationBuildertemporaryLocation(String path, String relativeTo)TransportConfigurationBuildertransport()Transport-related (i.e.voidvalidate()Validate the data in this builder before building the configuration bean-
Methods inherited from interface org.infinispan.configuration.global.GlobalConfigurationChildBuilder
globalJmxStatistics
-
-
-
-
Method Detail
-
enable
public GlobalStateConfigurationBuilder enable()
-
disable
public GlobalStateConfigurationBuilder disable()
-
enabled
public GlobalStateConfigurationBuilder enabled(boolean enabled)
Enables or disables the storage of global state.
-
enabled
public boolean enabled()
-
persistentLocation
public GlobalStateConfigurationBuilder persistentLocation(String location)
Defines the filesystem path where node-specific persistent data which needs to survive container restarts should be stored. This path will be used as the default storage location for file-based cache stores such as the defaultSingleFileStoreas well as the consistent hash for all caches which enables graceful shutdown and restart. Because the data stored in the persistent location is specific to the node that owns it, this path MUST NOT be shared among multiple instances. Defaults to the user.dir system property which usually is where the application was started. This value should be overridden to a more appropriate location.
-
persistentLocation
public GlobalStateConfigurationBuilder persistentLocation(String path, String relativeTo)
-
sharedPersistentLocation
public GlobalStateConfigurationBuilder sharedPersistentLocation(String location)
Defines the filesystem path where shared persistent state data which needs to survive container restarts should be stored. In particular this path will contain persistent dynamic configuration, as that managed by theOverlayLocalConfigurationStorage. This path MAY be safely shared among multiple instances. If not set, this will use thepersistentLocationvalue. This value should be overridden to a more appropriate location.
-
sharedPersistentLocation
public GlobalStateConfigurationBuilder sharedPersistentLocation(String path, String relativeTo)
-
temporaryLocation
public GlobalStateConfigurationBuilder temporaryLocation(String location)
Defines the filesystem path where temporary state should be stored. Defaults to the value of the java.io.tmpdir system property.
-
temporaryLocation
public GlobalStateConfigurationBuilder temporaryLocation(String path, String relativeTo)
-
configurationStorage
public GlobalStateConfigurationBuilder configurationStorage(ConfigurationStorage storage)
Defines theConfigurationStoragestrategy to use. If usingConfigurationStorage.CUSTOM, then the actual implementation must be passed by invokingconfigurationStorageSupplier(Supplier)
-
configurationStorageSupplier
public GlobalStateConfigurationBuilder configurationStorageSupplier(Supplier<? extends LocalConfigurationStorage> configurationStorageSupplier)
Defines the @LocalConfigurationStorage. Defaults to @VolatileLocalConfigurationStorage
-
validate
public void validate()
Description copied from interface:BuilderValidate the data in this builder before building the configuration bean- Specified by:
validatein interfaceBuilder<GlobalStateConfiguration>
-
create
public GlobalStateConfiguration create()
Description copied from interface:BuilderCreate the configuration bean- Specified by:
createin interfaceBuilder<GlobalStateConfiguration>- Returns:
-
read
public Builder<?> read(GlobalStateConfiguration template)
Description copied from interface:BuilderReads the configuration from an already created configuration bean into this builder. Returns an appropriate builder to allow fluent configuration- Specified by:
readin interfaceBuilder<GlobalStateConfiguration>- Parameters:
template- the configuration from which to "clone" this config if needed.
-
getGlobalConfig
protected GlobalConfigurationBuilder getGlobalConfig()
-
transport
public TransportConfigurationBuilder transport()
Description copied from interface:GlobalConfigurationChildBuilderTransport-related (i.e. clustering) configuration- Specified by:
transportin interfaceGlobalConfigurationChildBuilder
-
metrics
public GlobalMetricsConfigurationBuilder metrics()
Description copied from interface:GlobalConfigurationChildBuilderGlobal microprofile metrics configuration.- Specified by:
metricsin interfaceGlobalConfigurationChildBuilder
-
jmx
public GlobalJmxConfigurationBuilder jmx()
Description copied from interface:GlobalConfigurationChildBuilderGlobal JMX configuration.- Specified by:
jmxin interfaceGlobalConfigurationChildBuilder
-
globalState
public GlobalStateConfigurationBuilder globalState()
Description copied from interface:GlobalConfigurationChildBuilderGlobal state configuration- Specified by:
globalStatein interfaceGlobalConfigurationChildBuilder
-
serialization
public SerializationConfigurationBuilder serialization()
Description copied from interface:GlobalConfigurationChildBuilderGlobal serialization (i.e. marshalling) configuration- Specified by:
serializationin interfaceGlobalConfigurationChildBuilder
-
listenerThreadPool
public ThreadPoolConfigurationBuilder listenerThreadPool()
Description copied from interface:GlobalConfigurationChildBuilderConfiguration for the listener thread pool- Specified by:
listenerThreadPoolin interfaceGlobalConfigurationChildBuilder
-
asyncThreadPool
public ThreadPoolConfigurationBuilder asyncThreadPool()
Description copied from interface:GlobalConfigurationChildBuilderConfiguration for the asynchronous operations thread pool- Specified by:
asyncThreadPoolin interfaceGlobalConfigurationChildBuilder
-
expirationThreadPool
public ThreadPoolConfigurationBuilder expirationThreadPool()
Description copied from interface:GlobalConfigurationChildBuilderConfiguration for the expiration thread pool- Specified by:
expirationThreadPoolin interfaceGlobalConfigurationChildBuilder
-
persistenceThreadPool
public ThreadPoolConfigurationBuilder persistenceThreadPool()
Description copied from interface:GlobalConfigurationChildBuilderConfiguration for the persistence thread pool- Specified by:
persistenceThreadPoolin interfaceGlobalConfigurationChildBuilder
-
stateTransferThreadPool
public ThreadPoolConfigurationBuilder stateTransferThreadPool()
Description copied from interface:GlobalConfigurationChildBuilderConfiguration for the state-transfer thread pool- Specified by:
stateTransferThreadPoolin interfaceGlobalConfigurationChildBuilder
-
security
public GlobalSecurityConfigurationBuilder security()
Description copied from interface:GlobalConfigurationChildBuilderSecurity-related configuration- Specified by:
securityin interfaceGlobalConfigurationChildBuilder
-
shutdown
public ShutdownConfigurationBuilder shutdown()
Description copied from interface:GlobalConfigurationChildBuilderShutdown configuration- Specified by:
shutdownin interfaceGlobalConfigurationChildBuilder
-
site
public SiteConfigurationBuilder site()
Description copied from interface:GlobalConfigurationChildBuilderCross-site replication configuration- Specified by:
sitein interfaceGlobalConfigurationChildBuilder
-
modules
public List<Builder<?>> modules()
Description copied from interface:GlobalConfigurationChildBuilderGlobal modules configuration- Specified by:
modulesin interfaceGlobalConfigurationChildBuilder
-
defaultCacheName
public GlobalConfigurationBuilder defaultCacheName(String defaultCacheName)
Description copied from interface:GlobalConfigurationChildBuilderSets the name of the cache that acts as the default cache and is returned byEmbeddedCacheManager.getCache(). Not- Specified by:
defaultCacheNamein interfaceGlobalConfigurationChildBuilder
-
build
public GlobalConfiguration build()
Description copied from interface:GlobalConfigurationChildBuilderBuilds aGlobalConfigurationobject using the settings applied to this builder- Specified by:
buildin interfaceGlobalConfigurationChildBuilder
-
-