Interface ResourceEventHandler<WorkerType extends ResourceIDRetrievable>
-
- All Known Implementing Classes:
ActiveResourceManager
public interface ResourceEventHandler<WorkerType extends ResourceIDRetrievable>Callback interfaces for handling resource events from external resource managers.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidonError(Throwable exception)Notifies that an error has occurred that the process cannot proceed.voidonPreviousAttemptWorkersRecovered(Collection<WorkerType> recoveredWorkers)Notifies that workers of previous attempt have been recovered from the external resource manager.voidonWorkerTerminated(ResourceID resourceId, String diagnostics)Notifies that the worker has been terminated.
-
-
-
Method Detail
-
onPreviousAttemptWorkersRecovered
void onPreviousAttemptWorkersRecovered(Collection<WorkerType> recoveredWorkers)
Notifies that workers of previous attempt have been recovered from the external resource manager.- Parameters:
recoveredWorkers- Collection of worker nodes, in the deployment specific type.
-
onWorkerTerminated
void onWorkerTerminated(ResourceID resourceId, String diagnostics)
Notifies that the worker has been terminated.- Parameters:
resourceId- Identifier of the terminated worker.diagnostics- Diagnostic message about the worker termination.
-
onError
void onError(Throwable exception)
Notifies that an error has occurred that the process cannot proceed.- Parameters:
exception- Exception that describes the error.
-
-