public interface ClusterDbPoller
| Modifier and Type | Method and Description |
|---|---|
boolean |
pollServerDb(long timeout,
ClusterInteractionRequest request)
Polls the server of this cluster and sends an alive signal to the cluster DB service.
|
void |
restartInternal()
Signals a restart of this cluster node.
|
boolean pollServerDb(long timeout,
ClusterInteractionRequest request)
throws java.lang.InterruptedException,
java.util.concurrent.TimeoutException,
java.sql.SQLException
If the control of the cluster node cannot be acquired in the designated time, this method will do nothing.
timeout - The time in milliseconds to wait for the cluster control lock.request - Whether to simply poll or to restart the server. A restart request contains the
cluster name, the node name as well as the time since when the server has been
running. If this is null, the current server will just be polled.java.lang.InterruptedException - If the calling thread is interrupted while waiting for the node
control or has been interrupted before, an InterruptedException will be
thrown.java.util.concurrent.TimeoutException - If the table for updating the status cannot be locked in time, a
TimeoutException will be thrown.java.sql.SQLException - If there are problems updating the status in the cluster table, an
SQLException will be thrown.void restartInternal()
pollServerDb(long, ClusterInteractionRequest)) or polling fails too often.