Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
10.2. State management
10.2.1. Object States Link kopierenLink in die Zwischenablage kopiert!
Link kopierenLink in die Zwischenablage kopiert!
JBoss Transaction Service remembers the state of an object for the purposes of recovery and persistence. In the case of recovery, the state represents some past state of the object. When persistence is involved, the state represents the final state of an object at application termination. Since recovery and persistence include common functionality, they are both implemented using the
Input/OutputObjectState
and Input/OutputBuffer
classes.
The
InputBuffer
class in Example 10.2, “InputBuffer” and the OutputBuffer
classe in Example 10.1, “OutputBuffer Example” maintain an internal array into which instances of the standard Java types can be contiguously packed (unpacked) using the pack (unpack) operations. This buffer is automatically resized as required. The instances are all stored in the buffer in a standard form called network byte order, making them machine-independent.
Example 10.1. OutputBuffer Example
Example 10.2. InputBuffer
Example 10.3. OutputObjectState
Example 10.4. InputObjectState
The Example 10.4, “InputObjectState” and Example 10.3, “OutputObjectState” classes provides all the functionality of the
InputBuffer
and OutputBuffer
classes, through inheritance. They also add two additional instance variables that signify the Uid and type of the object for which the InputObjectState
or OutputObjectState
instance is a compressed image. These are used when accessing the object store during storage and retrieval of the object state.