Interface ClusterDAOService


  • public interface ClusterDAOService
    Internal interface of the Cluster DAO.
    • 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 cluster
        macAddress - macAddress of the cluster
        readonly - readonly indicator
        taskmaster - taskmaster indicator
        isActive - 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 to
        clusterId - id of the cluster
        macAddress - macAddress of the cluster
        readonly - readonly indicator
        taskmaster - taskmaster indicator
        arguments - 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 cluster
        timeout - maximum amount of time in the past to check
        Returns:
        a list of clusterevents
        Throws:
        ClusterServiceException
      • tablesExist

        boolean tablesExist()
        Checks if the tables for the clusterevent bundle are available
        Returns:
        table exists