Package com.atlassian.crowd.dao.cluster
Interface ClusterMessageDao
public interface ClusterMessageDao
Persistent storage of messages passed between cluster nodes. Uses message ID to establish chronology.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddMessage(InternalClusterMessage message) intdeleteClusterMessagesBeforeAndOn(long toTimestamp) Deletes all mesages older than the timestamp.Finds the highest ID currently in database.getMessagesAfter(String excludeNodeId, long fromId) Fetches messages with ID higher than the specified threshold.
-
Method Details
-
addMessage
-
getMessagesAfter
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 nodesfromId- 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
-