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
Modifier and TypeMethodDescriptionvoidNotifies 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 Details
-
onPreviousAttemptWorkersRecovered
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
Notifies that the worker has been terminated.- Parameters:
resourceId- Identifier of the terminated worker.diagnostics- Diagnostic message about the worker termination.
-
onError
Notifies that an error has occurred that the process cannot proceed.- Parameters:
exception- Exception that describes the error.
-