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

io.cloudstate.javasupport.eventsourced.SnapshotHandler 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 handler.
 *
 * 

If, when recovering an entity, that entity has a snapshot, the snapshot will be passed to a * corresponding snapshot handler method whose argument matches its type. The entity must set its * current state to that snapshot. * *

An entity may declare more than one snapshot handler if it wants different handling for * different types. * *

The snapshot handler method may additionally accept a {@link SnapshotContext} parameter, * allowing it to access context for the snapshot, if required. */ @CloudStateAnnotation @Target(ElementType.METHOD) @Retention(RetentionPolicy.RUNTIME) public @interface SnapshotHandler {}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy