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
onCreate
(Mirror mirror, User creator, MirrorAccessController accessController) Invoked when a newMirror
is created.void
onDisallowed
(Mirror mirror) Invoked when theMirror
operation is disallowed.void
onError
(MirrorTask mirror, Throwable cause) Invoked when theMirror
operation is failed.void
onStart
(MirrorTask mirror) Invoked when theMirror
operation is started.void
onUpdate
(Mirror mirror, User updater, MirrorAccessController accessController) Invoked when theMirror
is updated.
-
Method Details
-
onCreate
Invoked when a newMirror
is created. -
onUpdate
Invoked when theMirror
is updated. -
onDisallowed
Invoked when theMirror
operation is disallowed. -
onStart
Invoked when theMirror
operation is started. -
onComplete
Invoked when theMirror
operation is completed. -
onError
Invoked when theMirror
operation is failed.
-