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 registeredGlobalStateProvider
s- 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.void
registerStateProvider(GlobalStateProvider provider)
Registers a state provider within this state managervoid
start()
void
stop()
void
writeGlobalState()
Persists the global state by contacting all registered scope providersvoid
writeScopedState(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:GlobalStateManager
Persists the global state by contacting all registered scope providers- Specified by:
writeGlobalState
in interfaceGlobalStateManager
-
writeScopedState
public void writeScopedState(ScopedPersistentState state)
Description copied from interface:GlobalStateManager
Persists the specified scoped state- Specified by:
writeScopedState
in interfaceGlobalStateManager
-
readScopedState
public Optional<ScopedPersistentState> readScopedState(String scope)
Description copied from interface:GlobalStateManager
Reads the persistent state for the specified scope.- Specified by:
readScopedState
in interfaceGlobalStateManager
-
registerStateProvider
public void registerStateProvider(GlobalStateProvider provider)
Description copied from interface:GlobalStateManager
Registers a state provider within this state manager- Specified by:
registerStateProvider
in interfaceGlobalStateManager
-
-