Package org.infinispan.globalstate.impl
Class GlobalStateManagerImpl
- java.lang.Object
-
- org.infinispan.globalstate.impl.GlobalStateManagerImpl
-
- All Implemented Interfaces:
GlobalStateManager
public class GlobalStateManagerImpl extends Object implements GlobalStateManager
GlobalStateManagerImpl. This global component manages persistent state across restarts as well as global configurations. The information is stored in a Properties file. On a graceful shutdown it persists the following information: version = full version (e.g. major.minor.micro.qualifier) timestamp = timestamp using ISO-8601 as well as any additional information contributed by registeredGlobalStateProviders- Since:
- 8.1
- Author:
- Tristan Tarrant
-
-
Constructor Summary
Constructors Constructor Description GlobalStateManagerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<ScopedPersistentState>readScopedState(String scope)Reads the persistent state for the specified scope.voidregisterStateProvider(GlobalStateProvider provider)Registers a state provider within this state managervoidstart()voidstop()voidwriteGlobalState()Persists the global state by contacting all registered scope providersvoidwriteScopedState(ScopedPersistentState state)Persists the specified scoped state
-
-
-
Field Detail
-
VERSION
public static final String VERSION
- See Also:
- Constant Field Values
-
TIMESTAMP
public static final String TIMESTAMP
- See Also:
- Constant Field Values
-
VERSION_MAJOR
public static final String VERSION_MAJOR
- See Also:
- Constant Field Values
-
-
Method Detail
-
start
public void start()
-
stop
public void stop()
-
writeGlobalState
public void writeGlobalState()
Description copied from interface:GlobalStateManagerPersists the global state by contacting all registered scope providers- Specified by:
writeGlobalStatein interfaceGlobalStateManager
-
writeScopedState
public void writeScopedState(ScopedPersistentState state)
Description copied from interface:GlobalStateManagerPersists the specified scoped state- Specified by:
writeScopedStatein interfaceGlobalStateManager
-
readScopedState
public Optional<ScopedPersistentState> readScopedState(String scope)
Description copied from interface:GlobalStateManagerReads the persistent state for the specified scope.- Specified by:
readScopedStatein interfaceGlobalStateManager
-
registerStateProvider
public void registerStateProvider(GlobalStateProvider provider)
Description copied from interface:GlobalStateManagerRegisters a state provider within this state manager- Specified by:
registerStateProviderin interfaceGlobalStateManager
-
-