Buffered Persistent Data Container Impl
Implementation of BufferedPersistentDataContainer that provides support for buffered operations on a PersistentDataContainer.
This implementation uses a buffer to cache data operations temporarily before interacting with the underlying persistent storage via a delegate PersistentDataContainer. The buffer ensures that changes are stored until explicitly saved or cleared, reducing the need for repeated access to the underlying storage.
The buffer operates on key-value pairs, where the value can consist of primitive or complex data types. The conversion between these types is managed by PersistentDataType.
Author
Fantamomo
Since
1.0-SNAPSHOT
Parameters
The underlying PersistentDataContainer that this implementation delegates operations to when necessary.
The following methods are supported:
Data retrieval and storage using buffered entries with automatic type handling, realized through
get,contains, andgetPrimitive.Management of buffered entries, such as clearing or deleting specific entries, with
clearBufferanddeleteBuffer.Data persistence through the delegate's ability to save to an output stream.
Inheritors
Constructors
Creates a new instance with a specified delegate PersistentDataContainer.
Functions
Creates a bound entry for accessing persistent data within the container.
Creates a DefaultBoundEntry that is bound to the specified PersistentDataContainer. This entry allows the retrieval of a value using the specified key and type, with the capability to provide a default value if the key does not exist in the container.
Clears the buffer.
Checks if the container contains a value associated with the specified PersistentKey.
This methode copies all key-value pairs from the PersistentDataContainer to the receiver.
Deletes the buffer with the given key.
This methode is used to get the direct value of the key.
This method is used to get the value of the specified key from the PersistentDataContainer.
This method is used to get the value of the specified key from the PersistentDataContainer.
This methode is uses to get the element by the key.
Gets the primitive value associated with the specified key.
This method is used to get the value of the specified key from the PersistentDataContainer.
Saves the data in the container to the specified output stream.
Converts the current PersistentDataContainer to a buffered version.
Converts the current PersistentDataContainer instance to an immutable implementation.
Converts this PersistentDataContainer into a MutablePersistentDataContainer.