Package org.infinispan.globalstate
Interface ScopedPersistentState
- All Known Implementing Classes:
ScopedPersistentStateImpl
public interface ScopedPersistentState
ScopedPersistentState represents state which needs to be persisted, scoped by name (e.g. the cache name).
The default implementation of persistent state uses the standard
Properties
format with the
additional rule that order is preserved. In order to verify state consistency (e.g. across a cluster) a checksum
of the state's data can be computed. State properties prefixed with the '@' character will not be included as part
of the checksum computation (e.g. @timestamp)- Since:
- 8.1
- Author:
- Tristan Tarrant
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
containsProperty
(String key) Returns whether the state contains a propertyvoid
forEach
(BiConsumer<String, String> action) Performs the specified action on every entry of the stateint
Returns the checksum of the properties excluding those prefixed with @float
getFloatProperty
(String key) Retrieves a float state propertyint
getIntProperty
(String key) Retrieves an integer state propertygetProperty
(String key) Retrieves a state propertygetScope()
Returns the name of this persistent state's scopevoid
setProperty
(String format, float f) Sets a float state property.void
setProperty
(String key, int value) Sets an integer state property.void
setProperty
(String key, String value) Sets a state property.
-
Field Details
-
GLOBAL_SCOPE
- See Also:
-
-
Method Details
-
getScope
String getScope()Returns the name of this persistent state's scope -
setProperty
Sets a state property. Values will be unicode-escaped when written -
getProperty
Retrieves a state property -
setProperty
Sets an integer state property. -
setProperty
Sets a float state property. -
getIntProperty
Retrieves an integer state property -
getFloatProperty
Retrieves a float state property -
forEach
Performs the specified action on every entry of the state -
getChecksum
int getChecksum()Returns the checksum of the properties excluding those prefixed with @ -
containsProperty
Returns whether the state contains a property
-