Interface MirrorListener
@Nullable
public interface MirrorListener
A listener which is notified when a
Mirror
operation is started, completed or failed.
Implement this interface and register it using ServiceLoader
to override the default behavior:
onStart(MirrorTask)
: Logs an info message for the start of a scheduledMirror
.onComplete(MirrorTask, MirrorResult)
: Does nothing.onError(MirrorTask, Throwable)
: Logs a warning message for the error of a scheduledMirror
.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onComplete
(MirrorTask mirror, MirrorResult result) Invoked when theMirror
operation is completed.void
onError
(MirrorTask mirror, Throwable cause) Invoked when theMirror
operation is failed.void
onStart
(MirrorTask mirror) Invoked when theMirror
operation is started.