public interface ComponentCoordinator
| Modifier and Type | Method and Description |
|---|---|
String |
address()
Returns the instance address.
|
ComponentCoordinator |
pause()
Notifies the network that the component is not ready for operation.
|
ComponentCoordinator |
pause(org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
Notifies the network that the component is not ready for operation.
|
ComponentCoordinator |
pauseHandler(org.vertx.java.core.Handler<Void> handler)
Sets a pause handler on the coordinator.
|
ComponentCoordinator |
resume()
Notifies the network that the component is ready to resume.
|
ComponentCoordinator |
resume(org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
Notifies the network that the component is ready to resume.
|
ComponentCoordinator |
resumeHandler(org.vertx.java.core.Handler<Void> handler)
Sets a resume handler on the coordinator.
|
ComponentCoordinator |
start(org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<InstanceContext>> doneHandler)
Starts the coordinator.
|
void |
stop(org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
Stops the coordinator.
|
String address()
ComponentCoordinator start(org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<InstanceContext>> doneHandler)
When the coordinator is started the instance context is retrieved from the fault-tolerant cluster. Prior to setup, the component only knows its own address, thus starting the coordinator is essential to component setup.
doneHandler - An asynchronous handler to be called once complete.
The handler will be called with the current instance context.ComponentCoordinator resume()
ComponentCoordinator resume(org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
doneHandler - An asynchronous handler to be called once the network has been notified.ComponentCoordinator pause()
ComponentCoordinator pause(org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
doneHandler - An asynchronous handler to be called once the network has been notified.ComponentCoordinator resumeHandler(org.vertx.java.core.Handler<Void> handler)
This handler will be called when all components in the network are setup and ready to begin processing messages. The network coordinator will make this determination by evaluating component status keys in the cluster.
handler - A handler to be called when the component should resume operation.ComponentCoordinator pauseHandler(org.vertx.java.core.Handler<Void> handler)
This handler will be called when some component somewhere in the network has been paused. When a component is paused, the network manager will notify all component instances that the network is paused until resume.
handler - A handler to be called when the component should pause operation.void stop(org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
doneHandler - An asynchronous handler to be called once complete.Copyright © 2013-2014. All Rights Reserved.