-
- All Known Implementing Classes:
Config
,Database.Type
,Endpoint.File.Type
,Endpoint.Rest.Type
,Endpoint.Type
,Endpoint.Websocket.Type
,Entity
,Executor
,Filter.Request
,Filter.Response
,Filter.Type
,Flow.Type
,Group.Type
,Lifecycle
,Logger
,Manager.Type
,Monitor
,Network
,Policy.Allow.Type
,Policy.Deny.Type
,Policy.TargetedAllow.Type
,Policy.TargetedDeny.Type
,Policy.TargetedPolicy.Type
,Policy.Type
,Probe.Type
,Provider.Local.Type
,Provider.Remote
,Provider.Type
,Queue.Type
,Role.Type
,Rule.And.Type
,Rule.AskProviders.Type
,Rule.Group.Type
,Rule.MatchAll.Type
,Rule.MatchAttribute.Type
,Rule.MatchContext.Type
,Rule.MatchNone.Type
,Rule.Not.Type
,Rule.Or.Type
,Rule.Role.Type
,Rule.Type
,Rule.Xor.Type
,Scheduled.Type
,Scheduler
,Scheduler.Cron.Type
,Security
,Snapshot
,Step.Action.Type
,Step.Destination.Type
,Step.Origin.Background
,Step.Origin.NetworkClient
,Step.Origin.NetworkServer
,Step.Origin.Type
,Step.Type
,Storage.Database.Type
,Storage.File.Type
,Storage.Memory.Type
,Storage.Type
,Timeout
,Topic.Type
,Translator
,User.Type
,Vault
public interface Snapshotable
Make anEntity
serializable to a JSON-likeData
structure to be used in the snapshot/restore mechanism. This mechanism allows anEntity
to be backed up as a stale data structure and restored at a later time.Although complex objects can technically be included in the snapshot, it is recommended to use simple scalar, list, or map values to maintain portability and ensure compatibility with various snapshot consumers.
The privacy and security of the snapshot data rely on the implementation of the
Snapshot
manager, which controls access to snapshots. Sensitive private data may be included in snapshots, so careful consideration should be given to data encryption or restricted access in sensitive contexts.The snapshot and restore behavior should typically be orchestrated by the
Snapshot
manager using eitherFactory.create(Data)
for full restoration orTemplate.update(Data, Entity)
for incremental updates.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Snapshotable.SnapshotMode
Defines the behavior of entities during snapshot and restore operations.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Data
snapshot()
Serializes this class instance into a simple data structure for use in snapshots.Snapshotable.SnapshotMode
snapshotMode()
Returns the intended snapshot mode suitable for the target entity.
-
-
-
Method Detail
-
snapshot
Data snapshot()
Serializes this class instance into a simple data structure for use in snapshots. If subclassing, ensure that data from the superclass is included in the resultingData
.- Returns:
- a snapshot data representation of this class instance
-
snapshotMode
Snapshotable.SnapshotMode snapshotMode()
Returns the intended snapshot mode suitable for the target entity.- Returns:
- the desired snapshot mode
-
-