All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.cloudstate.javasupport.eventsourced.Snapshot Maven / Gradle / Ivy

There is a newer version: 0.6.0
Show newest version
package io.cloudstate.javasupport.eventsourced;

import io.cloudstate.javasupport.impl.CloudStateAnnotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Marks a method as a snapshot method.
 *
 * 

An event sourced behavior may have at most one of these. When provided, it will be * periodically (every n events emitted) be invoked to retrieve a snapshot of the current * state, to be persisted, so that the event log can be loaded without replaying the entire history. * *

The method must return the current state of the entity. * *

The method may accept a {@link SnapshotContext} parameter. */ @CloudStateAnnotation @Target(ElementType.METHOD) @Retention(RetentionPolicy.RUNTIME) public @interface Snapshot {}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy