Interface ClusterDAOService
-
public interface ClusterDAOService
Internal interface of the Cluster DAO.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
eventReceived(ClusterEvent event, String returnValue)
Update event reception for an event.List<ClusterNode>
getClusterNodes(long heartbeatRecievedSince)
Retrieves the clusterNodes that are present at the given heartbeat.List<ClusterEvent>
getEvents(String clusterId, long timeout)
Retrieve all events that have been sent recently and have not yet been received (and handled).Map<String,String>
getReturnValues(String eventId)
Retrieves all return values for an event.void
removeExpiredEvents(long expireDate)
Remove old events.String
sendEvent(String service, String clusterId, String macAddress, boolean readonly, boolean taskmaster, String arguments)
Issue a new cluster-event.void
sendHeartbeat(String clusterId, String macAddress, boolean readonly, boolean taskmaster, boolean isActive)
Updates a cluster-heartbeat.boolean
tablesExist()
Checks if the tables for the clusterevent bundle are available
-
-
-
Method Detail
-
getClusterNodes
List<ClusterNode> getClusterNodes(long heartbeatRecievedSince) throws ClusterServiceException
Retrieves the clusterNodes that are present at the given heartbeat.- Parameters:
heartbeatRecievedSince
- time to use as boundary- Returns:
- the list of clusterNodes
- Throws:
ClusterServiceException
-
sendHeartbeat
void sendHeartbeat(String clusterId, String macAddress, boolean readonly, boolean taskmaster, boolean isActive) throws ClusterServiceException
Updates a cluster-heartbeat.- Parameters:
clusterId
- id of the clustermacAddress
- macAddress of the clusterreadonly
- readonly indicatortaskmaster
- taskmaster indicatorisActive
- active indicator- Throws:
ClusterServiceException
-
sendEvent
String sendEvent(String service, String clusterId, String macAddress, boolean readonly, boolean taskmaster, String arguments) throws ClusterServiceException
Issue a new cluster-event.- Parameters:
service
- to send the event toclusterId
- id of the clustermacAddress
- macAddress of the clusterreadonly
- readonly indicatortaskmaster
- taskmaster indicatorarguments
- specific for this event- Returns:
- Throws:
ClusterServiceException
-
getEvents
List<ClusterEvent> getEvents(String clusterId, long timeout) throws ClusterServiceException
Retrieve all events that have been sent recently and have not yet been received (and handled).- Parameters:
clusterId
- id of the clustertimeout
- maximum amount of time in the past to check- Returns:
- a list of clusterevents
- Throws:
ClusterServiceException
-
eventReceived
void eventReceived(ClusterEvent event, String returnValue) throws ClusterServiceException
Update event reception for an event.- Parameters:
event
- event receivedreturnValue
- to administrate- Throws:
ClusterServiceException
-
removeExpiredEvents
void removeExpiredEvents(long expireDate) throws ClusterServiceException
Remove old events.- Parameters:
expireDate
- boundary time to select which events to remove- Throws:
ClusterServiceException
-
getReturnValues
Map<String,String> getReturnValues(String eventId) throws ClusterServiceException
Retrieves all return values for an event.- Parameters:
eventId
- event to look for- Returns:
- map of returnvalues
- Throws:
ClusterServiceException
-
tablesExist
boolean tablesExist()
Checks if the tables for the clusterevent bundle are available- Returns:
- table exists
-
-