Package org.openjdk.jmc.common
Interface IWritableState
public interface IWritableState
A state container which can be written to. It is an hierarchical structure that can contain named
child states. Actual data values are stored in named attributes for each state node.
This interface is a companion to IState
which handles reading of state information.
IStateful
can be used to mark a class that knows how to store its state in an
IWritableState instance.
-
Method Summary
Modifier and TypeMethodDescriptioncreateChild
(String type) Creates a new child node.void
Stores a named attribute value.
-
Method Details
-
createChild
Creates a new child node. Multiple nodes of the same type are permitted.- Parameters:
type
- node type- Returns:
- a new child node
-
putString
Stores a named attribute value. Multiple values with the same key is not supported. If called multiple times with the same key then only the latest value should be kept.- Parameters:
key
- attribute keyvalue
- attribute value
-