|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.cluster.OfBizClusterMessageStore
public class OfBizClusterMessageStore
Responsible for storing and retrieving cluster messages in the underlying database.
Field Summary | |
---|---|
protected static String |
CLAIMED_BY_NODE
|
protected static String |
DESTINATION_NODE
|
protected static String |
ENTITY
|
protected static String |
ID
|
protected static String |
MESSAGE
|
protected static String |
MESSAGE_TIME
|
protected static String |
SOURCE_NODE
|
Constructor Summary | |
---|---|
OfBizClusterMessageStore(OfBizDelegator ofBizDelegator)
|
Method Summary | |
---|---|
ClusterMessage |
createMessage(String sourceNode,
String destinationNode,
String message)
Creates a ClusterMessage and stores it in the underlying database |
int |
deleteMessage(ClusterMessage clusterMessage)
|
int |
deleteMessagesBefore(Date before)
|
Long |
getLatestMessageByNodeId(String nodeId)
Get the id of the latest message in the store for a node.. |
List<ClusterMessage> |
getMessages(Node sourceNode,
Node destinationNode,
Long afterMessageId)
Retrieves the messages destined for the given node, from a source node. |
org.ofbiz.core.entity.GenericValue |
storeMessage(ClusterMessage message)
Stores the message in the underlying database. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final String DESTINATION_NODE
protected static final String ENTITY
protected static final String ID
protected static final String MESSAGE
protected static final String SOURCE_NODE
protected static final String CLAIMED_BY_NODE
protected static final String MESSAGE_TIME
Constructor Detail |
---|
public OfBizClusterMessageStore(OfBizDelegator ofBizDelegator)
Method Detail |
---|
public org.ofbiz.core.entity.GenericValue storeMessage(@Nonnull ClusterMessage message)
message
- - the message to store in the underlying tablepublic ClusterMessage createMessage(@Nonnull String sourceNode, @Nonnull String destinationNode, @Nonnull String message)
sourceNode
- the ID of the source node (required)destinationNode
- the ID of the destination node (required)message
- the message to send (required)public List<ClusterMessage> getMessages(Node sourceNode, Node destinationNode, Long afterMessageId)
sourceNode
- The sending nodedestinationNode
- The listening nodeafterMessageId
- Only messages with a higher Message Id than this id will be returned.
If starting beyond is null will return all messages for the source destinationNode pair.
public int deleteMessage(ClusterMessage clusterMessage)
public Long getLatestMessageByNodeId(String nodeId)
nodeId
- the id of the node.
public int deleteMessagesBefore(Date before)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |