public class OfBizClusterMessageStore extends Object
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
OfBizClusterMessageStore(OfBizDelegator ofBizDelegator) |
Modifier and Type | Method and Description |
---|---|
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.
|
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
public OfBizClusterMessageStore(OfBizDelegator ofBizDelegator)
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)
Copyright © 2002-2024 Atlassian. All Rights Reserved.