Enum Class NoOpSnapshotStore
java.lang.Object
java.lang.Enum<NoOpSnapshotStore>
io.fluxcapacitor.javaclient.persisting.eventsourcing.NoOpSnapshotStore
- All Implemented Interfaces:
SnapshotStore
,Serializable
,Comparable<NoOpSnapshotStore>
,Constable
A
SnapshotStore
implementation that is used when snapshotting is explicitly disabled, such as when
snapshotPeriod <= 0
is configured on an aggregate via Aggregate
.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptiondeleteSnapshot
(Object aggregateId) Deletes the snapshot for the specified aggregate ID.getSnapshot
(Object aggregateId) Retrieves the most recent snapshot for a given aggregate ID, if available.<T> CompletableFuture
<Void> storeSnapshot
(Entity<T> snapshot) Stores a new snapshot for the given aggregate entity.static NoOpSnapshotStore
Returns the enum constant of this class with the specified name.static NoOpSnapshotStore[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
storeSnapshot
Description copied from interface:SnapshotStore
Stores a new snapshot for the given aggregate entity.The snapshot typically contains the latest known state and metadata such as the aggregate ID and sequence number. Storing a snapshot will overwrite any existing snapshot for the same aggregate ID.
- Specified by:
storeSnapshot
in interfaceSnapshotStore
- Type Parameters:
T
- The aggregate root type.- Parameters:
snapshot
- The aggregate entity to be stored as a snapshot.- Returns:
- A
CompletableFuture
indicating whether the operation completed successfully.
-
getSnapshot
Description copied from interface:SnapshotStore
Retrieves the most recent snapshot for a given aggregate ID, if available.- Specified by:
getSnapshot
in interfaceSnapshotStore
- Type Parameters:
T
- The expected type of the aggregate.- Parameters:
aggregateId
- The ID of the aggregate for which to retrieve a snapshot.- Returns:
- An
Optional
containing the aggregate snapshot if present, otherwise empty.
-
deleteSnapshot
Description copied from interface:SnapshotStore
Deletes the snapshot for the specified aggregate ID.- Specified by:
deleteSnapshot
in interfaceSnapshotStore
- Parameters:
aggregateId
- The ID of the aggregate whose snapshot should be deleted.- Returns:
- A
CompletableFuture
indicating completion of the deletion operation.
-