Interface ClusterMessageDao

All Known Implementing Classes:
ClusterMessageDAOHibernate

public interface ClusterMessageDao
Persistent storage of messages passed between cluster nodes. Uses message ID to establish chronology.
  • Method Details

    • addMessage

      void addMessage(InternalClusterMessage message)
    • getMessagesAfter

      List<InternalClusterMessage> getMessagesAfter(String excludeNodeId, long fromId)
      Fetches messages with ID higher than the specified threshold.
      Parameters:
      excludeNodeId - node that should be excluded from search (this will usually be the calling node); null to include all nodes
      fromId - start message ID for the search, non-inclusive
      Returns:
      list of results in ascending ID order
    • deleteClusterMessagesBeforeAndOn

      int deleteClusterMessagesBeforeAndOn(long toTimestamp)
      Deletes all mesages older than the timestamp.
      Parameters:
      toTimestamp -
      Returns:
      number of messages deleted
    • getHighestId

      Long getHighestId()
      Finds the highest ID currently in database.
      Returns:
      highest ID found, or null if there are no rows