com.atlassian.jira.cluster
Class OfBizClusterMessageStore

java.lang.Object
  extended by com.atlassian.jira.cluster.OfBizClusterMessageStore

public class OfBizClusterMessageStore
extends Object

Responsible for storing and retrieving cluster messages in the underlying database.

Since:
v6.1

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)
           
 List<ClusterMessage> getMessages(Node destinationNode)
          Retrieves the messages destined for the given 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
 

Constructor Detail

OfBizClusterMessageStore

public OfBizClusterMessageStore(OfBizDelegator ofBizDelegator)
Method Detail

storeMessage

public org.ofbiz.core.entity.GenericValue storeMessage(@Nonnull
                                                       ClusterMessage message)
Stores the message in the underlying database.

Parameters:
message - - the message to store in the underlying table

createMessage

public ClusterMessage createMessage(@Nonnull
                                    String sourceNode,
                                    @Nonnull
                                    String destinationNode,
                                    @Nonnull
                                    String message)
Creates a ClusterMessage and stores it in the underlying database

Parameters:
sourceNode - the ID of the source node (required)
destinationNode - the ID of the destination node (required)
message - the message to send (required)

getMessages

public List<ClusterMessage> getMessages(Node destinationNode)
Retrieves the messages destined for the given node. Returns messages with either the specific node id, or destined for all, but they must have been sent from another node - no listening to your own messages.

Returns:
a non-null list

deleteMessage

public int deleteMessage(ClusterMessage clusterMessage)


Copyright © 2002-2014 Atlassian. All Rights Reserved.