T- the type of the instances to serialize
public interface StatefulSerializer<T> extends Serializer<T>
StateRepository. The state will be maintained by the authoritative tier of the cache for which this is configured.
Implementations must be thread-safe.
When used within the default serialization provider, there is an additional constructor requirement.
The implementations must define a constructor that takes in a
Post instantiation, the state repository will be injected with the
init method invocation.
This is guaranteed to happen before any serialization/deserialization interaction.
|Modifier and Type||Method and Description|
This method is used to inject a
void init(StateRepository stateRepository)
StateRepositoryto the serializer by the authoritative tier of a cache during the cache initialization. The passed in state repository will have the persistent properties of the injecting tier.
stateRepository- the state repository