Class GlobalStateConfigurationBuilder
- java.lang.Object
-
- org.infinispan.configuration.global.GlobalStateConfigurationBuilder
-
- All Implemented Interfaces:
Builder<GlobalStateConfiguration>
,GlobalConfigurationChildBuilder
public class GlobalStateConfigurationBuilder extends java.lang.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 ThreadPoolConfigurationBuilder
asyncThreadPool()
Configuration for the asynchronous operations thread poolGlobalConfiguration
build()
Builds aGlobalConfiguration
object using the settings applied to this builderGlobalStateConfigurationBuilder
configurationStorage(ConfigurationStorage storage)
Defines theConfigurationStorage
strategy to use.GlobalStateConfigurationBuilder
configurationStorageSupplier(java.util.function.Supplier<? extends LocalConfigurationStorage> configurationStorageSupplier)
Defines the @LocalConfigurationStorage
.GlobalStateConfiguration
create()
Create the configuration beanGlobalConfigurationBuilder
defaultCacheName(java.lang.String defaultCacheName)
Sets the name of the cache that acts as the default cache and is returned byCacheContainer.getCache()
.GlobalStateConfigurationBuilder
disable()
GlobalStateConfigurationBuilder
enable()
boolean
enabled()
GlobalStateConfigurationBuilder
enabled(boolean enabled)
Enables or disables the storage of global state.ThreadPoolConfigurationBuilder
expirationThreadPool()
Configuration for the expiration thread poolprotected GlobalConfigurationBuilder
getGlobalConfig()
GlobalJmxStatisticsConfigurationBuilder
globalJmxStatistics()
Global JMX configurationGlobalStateConfigurationBuilder
globalState()
Global state configurationThreadPoolConfigurationBuilder
listenerThreadPool()
Configuration for the listener thread pooljava.util.List<Builder<?>>
modules()
Global modules configurationThreadPoolConfigurationBuilder
persistenceThreadPool()
Configuration for the persistence thread poolGlobalStateConfigurationBuilder
persistentLocation(java.lang.String location)
Defines the filesystem path where persistent state data which needs to survive container restarts should be stored.GlobalStateConfigurationBuilder
persistentLocation(java.lang.String path, java.lang.String relativeTo)
Builder<?>
read(GlobalStateConfiguration template)
Reads the configuration from an already created configuration bean into this builder.GlobalSecurityConfigurationBuilder
security()
Security-related configurationSerializationConfigurationBuilder
serialization()
Global serialization (i.e.GlobalStateConfigurationBuilder
sharedPersistentLocation(java.lang.String location)
Defines the filesystem path where shared persistent state data which needs to survive container restarts should be stored.GlobalStateConfigurationBuilder
sharedPersistentLocation(java.lang.String path, java.lang.String relativeTo)
ShutdownConfigurationBuilder
shutdown()
Shutdown configurationSiteConfigurationBuilder
site()
Cross-site replication configurationThreadPoolConfigurationBuilder
stateTransferThreadPool()
Configuration for the state-transfer thread poolGlobalStateConfigurationBuilder
temporaryLocation(java.lang.String location)
Defines the filesystem path where temporary state should be stored.GlobalStateConfigurationBuilder
temporaryLocation(java.lang.String path, java.lang.String relativeTo)
TransportConfigurationBuilder
transport()
Transport-related (i.e.void
validate()
Validate the data in this builder before building the configuration bean
-
-
-
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(java.lang.String location)
Defines the filesystem path where persistent state data which needs to survive container restarts should be stored. The data stored at this location is required for graceful shutdown and restore. 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(java.lang.String path, java.lang.String relativeTo)
-
sharedPersistentLocation
public GlobalStateConfigurationBuilder sharedPersistentLocation(java.lang.String location)
Defines the filesystem path where shared persistent state data which needs to survive container restarts should be stored. This path can be safely 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.
-
sharedPersistentLocation
public GlobalStateConfigurationBuilder sharedPersistentLocation(java.lang.String path, java.lang.String relativeTo)
-
temporaryLocation
public GlobalStateConfigurationBuilder temporaryLocation(java.lang.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(java.lang.String path, java.lang.String relativeTo)
-
configurationStorage
public GlobalStateConfigurationBuilder configurationStorage(ConfigurationStorage storage)
Defines theConfigurationStorage
strategy to use. If usingConfigurationStorage.CUSTOM
, then the actual implementation must be passed by invokingconfigurationStorageSupplier(Supplier)
-
configurationStorageSupplier
public GlobalStateConfigurationBuilder configurationStorageSupplier(java.util.function.Supplier<? extends LocalConfigurationStorage> configurationStorageSupplier)
Defines the @LocalConfigurationStorage
. Defaults to @VolatileLocalConfigurationStorage
-
validate
public void validate()
Description copied from interface:Builder
Validate the data in this builder before building the configuration bean- Specified by:
validate
in interfaceBuilder<GlobalStateConfiguration>
-
create
public GlobalStateConfiguration create()
Description copied from interface:Builder
Create the configuration bean- Specified by:
create
in interfaceBuilder<GlobalStateConfiguration>
- Returns:
-
read
public Builder<?> read(GlobalStateConfiguration template)
Description copied from interface:Builder
Reads the configuration from an already created configuration bean into this builder. Returns an appropriate builder to allow fluent configuration- Specified by:
read
in 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:GlobalConfigurationChildBuilder
Transport-related (i.e. clustering) configuration- Specified by:
transport
in interfaceGlobalConfigurationChildBuilder
-
globalJmxStatistics
public GlobalJmxStatisticsConfigurationBuilder globalJmxStatistics()
Description copied from interface:GlobalConfigurationChildBuilder
Global JMX configuration- Specified by:
globalJmxStatistics
in interfaceGlobalConfigurationChildBuilder
-
globalState
public GlobalStateConfigurationBuilder globalState()
Description copied from interface:GlobalConfigurationChildBuilder
Global state configuration- Specified by:
globalState
in interfaceGlobalConfigurationChildBuilder
-
serialization
public SerializationConfigurationBuilder serialization()
Description copied from interface:GlobalConfigurationChildBuilder
Global serialization (i.e. marshalling) configuration- Specified by:
serialization
in interfaceGlobalConfigurationChildBuilder
-
listenerThreadPool
public ThreadPoolConfigurationBuilder listenerThreadPool()
Description copied from interface:GlobalConfigurationChildBuilder
Configuration for the listener thread pool- Specified by:
listenerThreadPool
in interfaceGlobalConfigurationChildBuilder
-
asyncThreadPool
public ThreadPoolConfigurationBuilder asyncThreadPool()
Description copied from interface:GlobalConfigurationChildBuilder
Configuration for the asynchronous operations thread pool- Specified by:
asyncThreadPool
in interfaceGlobalConfigurationChildBuilder
-
expirationThreadPool
public ThreadPoolConfigurationBuilder expirationThreadPool()
Description copied from interface:GlobalConfigurationChildBuilder
Configuration for the expiration thread pool- Specified by:
expirationThreadPool
in interfaceGlobalConfigurationChildBuilder
-
persistenceThreadPool
public ThreadPoolConfigurationBuilder persistenceThreadPool()
Description copied from interface:GlobalConfigurationChildBuilder
Configuration for the persistence thread pool- Specified by:
persistenceThreadPool
in interfaceGlobalConfigurationChildBuilder
-
stateTransferThreadPool
public ThreadPoolConfigurationBuilder stateTransferThreadPool()
Description copied from interface:GlobalConfigurationChildBuilder
Configuration for the state-transfer thread pool- Specified by:
stateTransferThreadPool
in interfaceGlobalConfigurationChildBuilder
-
security
public GlobalSecurityConfigurationBuilder security()
Description copied from interface:GlobalConfigurationChildBuilder
Security-related configuration- Specified by:
security
in interfaceGlobalConfigurationChildBuilder
-
shutdown
public ShutdownConfigurationBuilder shutdown()
Description copied from interface:GlobalConfigurationChildBuilder
Shutdown configuration- Specified by:
shutdown
in interfaceGlobalConfigurationChildBuilder
-
site
public SiteConfigurationBuilder site()
Description copied from interface:GlobalConfigurationChildBuilder
Cross-site replication configuration- Specified by:
site
in interfaceGlobalConfigurationChildBuilder
-
modules
public java.util.List<Builder<?>> modules()
Description copied from interface:GlobalConfigurationChildBuilder
Global modules configuration- Specified by:
modules
in interfaceGlobalConfigurationChildBuilder
-
defaultCacheName
public GlobalConfigurationBuilder defaultCacheName(java.lang.String defaultCacheName)
Description copied from interface:GlobalConfigurationChildBuilder
Sets the name of the cache that acts as the default cache and is returned byCacheContainer.getCache()
. Not- Specified by:
defaultCacheName
in interfaceGlobalConfigurationChildBuilder
-
build
public GlobalConfiguration build()
Description copied from interface:GlobalConfigurationChildBuilder
Builds aGlobalConfiguration
object using the settings applied to this builder- Specified by:
build
in interfaceGlobalConfigurationChildBuilder
-
-