org.simpleframework.xml.core
Annotation Type Complete


@Retention(value=RUNTIME)
public @interface Complete

The Complete annotation is used to mark a method that requires a callback from the persister once the serialization of the object has completed. The complete method is typically used in combination with the persist method, which is the method that is annotated with the Persist annotation.

Typically the complete method will revert any changes made when the persist method was invoked. For example, should the persist method acquire a lock to ensure the object is serialized in a safe state then the commit method can be used to release the lock. The complete method must be a no argument public method or a method that takes a single Map object argument. The complete method is invoked even if deserialization terminates.

Author:
Niall Gallagher
See Also:
Persist