Interface ClusterService
-
- All Superinterfaces:
ADEPT2Service
- All Known Implementing Classes:
ClusterNode
public interface ClusterService extends ADEPT2Service
This class allows for communication between different nodes of a cluster. The second way to exchange status information helps in case of problems. For instance a doubtful server may signalling that it has terminated and cannot access the database any more.
Note that the cluster service can only be reached remotely in case it is exported by the platform. That means, the platform has to be successfully bootstrapped.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SimpleClusterNodeInformation
doubtfulStatus(SessionToken session, String requestingNode, long lastRequesterUpdate, long lastServerUpdate, long serverRunningSince)
Gets information on the cluster node implementing this cluster service and signals this cluster node, that its status is doubtful.SimpleClusterNodeInformation
getNodeInformation(SessionToken session)
Gets information on the cluster node implementing this cluster service.-
Methods inherited from interface de.aristaflow.adept2.base.service.ADEPT2Service
getLocalUris, getRelease, getRuntimeRequiredServices, getServiceInstanceName, getStartupRequiredServices, getURIs, init, ping, preShutdown, shutdown, start
-
-
-
-
Method Detail
-
getNodeInformation
SimpleClusterNodeInformation getNodeInformation(SessionToken session)
Gets information on the cluster node implementing this cluster service.- Parameters:
session
- The session which is used to check for access rights on this method.- Returns:
- The simple information for this cluster node, that is name, address, status, last update time and running since. Status and last update time may differ from the values in the database, e. g. a node has changed its status but cannot access the database.
-
doubtfulStatus
SimpleClusterNodeInformation doubtfulStatus(SessionToken session, String requestingNode, long lastRequesterUpdate, long lastServerUpdate, long serverRunningSince)
Gets information on the cluster node implementing this cluster service and signals this cluster node, that its status is doubtful. This urges this cluster node to update the database shortly. In case of problems accessing the database, it may even signal its termination.- Parameters:
session
- The session which is used to check for access rights on this method.requestingNode
- The name of the node notifying the doubtful status.lastRequesterUpdate
- The last time the requester has updated its status (which is the same as checking for the server status.lastServerUpdate
- The last time the server has updated its status in the database according to the requester. If this is older than the last update time of the server, the requester has not the latest status, thus the notified doubtful status is not valid (any more).serverRunningSince
- The time the server has switched to running in the database according to the requester. If this is older than the current running since time, the requester has not the latest status, thus the notified doubtful status is not valid (any more).- Returns:
- The simple information for this cluster node, that is name, address, status, last update time and running since. Status and last update time may differ from the values in the database, e. g. a node has changed its status but cannot access the database.
-
-