org.objectweb.joram.mom.dest.ClusterQueueImpl Class Reference

Inherits org.objectweb.joram.mom.dest.QueueImpl.

Inheritance diagram for org.objectweb.joram.mom.dest.ClusterQueueImpl:

Inheritance graph
[legend]
Collaboration diagram for org.objectweb.joram.mom.dest.ClusterQueueImpl:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ClusterQueueImpl (AgentId adminId, Properties prop)
void initialize (boolean firstTime)
String toString ()
Object specialAdminProcess (SpecialAdminRequest not) throws RequestException
void removeQueueCluster (String removeQueue)
ClientMessages preProcess (AgentId from, ClientMessages not)
void postProcess (ClientMessages not)
void wakeUpNot (WakeUpNot not)
void lBCycleLife (AgentId from, LBCycleLife not)
void joinQueueCluster (JoinQueueCluster not)
void ackJoinQueueCluster (AckJoinQueueCluster not)
void receiveRequest (AgentId from, ReceiveRequest not) throws AccessException
void lBMessageGive (AgentId from, LBMessageGive not) throws UnknownNotificationException
void lBMessageHope (AgentId from, LBMessageHope not)
long getClusterDeliveryCount ()
void setWaitAfterClusterReq (long waitAfterClusterReq)
void setProducThreshold (int producThreshold)
void setConsumThreshold (int consumThreshold)
void setAutoEvalThreshold (boolean autoEvalThreshold)

Protected Member Functions

Object doList (ListClusterQueue req)
void addQueueCluster (String joiningQueue, float rateOfFlow)
void broadcastLeave (String removeQueue)
ClientMessages getClientMessages (int nb, String selector, boolean remove)
Message getMessage (String msgId, boolean remove)
void sendToCluster (QueueClusterNot not)
void messageDelivered (String msgId)
void monitoringMsgSendToCluster (String msgId)

Protected Attributes

Hashtable clusters
LoadingFactor loadingFactor

Detailed Description

The ClusterQueueImpl class implements the MOM queue behaviour, basically storing messages and delivering them upon clients requests or delivering to an other cluster queue.

Definition at line 61 of file ClusterQueueImpl.java.


Constructor & Destructor Documentation

org.objectweb.joram.mom.dest.ClusterQueueImpl.ClusterQueueImpl ( AgentId  adminId,
Properties  prop 
)

Constructs a ClusterQueueImpl instance.

Parameters:
adminId Identifier of the administrator of the queue.
prop The initial set of properties.

producer threshold

consumer threshold

automatic eval threshold

Definition at line 105 of file ClusterQueueImpl.java.

References org.objectweb.joram.mom.dest.ClusterQueueImpl.loadingFactor, and org.objectweb.joram.mom.dest.QueueImpl.period.


Member Function Documentation

void org.objectweb.joram.mom.dest.ClusterQueueImpl.initialize ( boolean  firstTime  )  [virtual]

Initializes the destination.

Parameters:
firstTime true when first called by the factory

Reimplemented from org.objectweb.joram.mom.dest.QueueImpl.

Definition at line 159 of file ClusterQueueImpl.java.

References org.objectweb.joram.mom.dest.ClusterQueueImpl.clusters, org.objectweb.joram.mom.dest.DestinationImpl.getId(), and org.objectweb.joram.mom.dest.QueueImpl.logger.

Here is the call graph for this function:

String org.objectweb.joram.mom.dest.ClusterQueueImpl.toString (  ) 

Returns a string representation of this destination.

Reimplemented from org.objectweb.joram.mom.dest.QueueImpl.

Definition at line 171 of file ClusterQueueImpl.java.

References org.objectweb.joram.mom.dest.DestinationImpl.getId(), and fr.dyade.aaa.agent.AgentId.toString().

Here is the call graph for this function:

Object org.objectweb.joram.mom.dest.ClusterQueueImpl.specialAdminProcess ( SpecialAdminRequest  not  )  throws RequestException

use to add or remove ClusterQueue to cluster.

Parameters:
not 

Reimplemented from org.objectweb.joram.mom.dest.DestinationImpl.

Definition at line 180 of file ClusterQueueImpl.java.

References org.objectweb.joram.mom.dest.ClusterQueueImpl.addQueueCluster(), org.objectweb.joram.mom.dest.ClusterQueueImpl.broadcastLeave(), org.objectweb.joram.mom.dest.ClusterQueueImpl.doList(), org.objectweb.joram.mom.dest.LoadingFactor.getRateOfFlow(), org.objectweb.joram.mom.dest.ClusterQueueImpl.loadingFactor, org.objectweb.joram.mom.dest.QueueImpl.logger, and org.objectweb.joram.mom.dest.ClusterQueueImpl.removeQueueCluster().

Here is the call graph for this function:

Object org.objectweb.joram.mom.dest.ClusterQueueImpl.doList ( ListClusterQueue  req  )  [protected]

return the cluster list.

Parameters:
req 
Returns:
the cluster list.

Definition at line 219 of file ClusterQueueImpl.java.

References org.objectweb.joram.mom.dest.ClusterQueueImpl.clusters.

Referenced by org.objectweb.joram.mom.dest.ClusterQueueImpl.specialAdminProcess().

void org.objectweb.joram.mom.dest.ClusterQueueImpl.addQueueCluster ( String  joiningQueue,
float  rateOfFlow 
) [protected]

send to joiningQueue a JoinQueueCluster not.

Parameters:
joiningQueue 
rateOfFlow 

Definition at line 232 of file ClusterQueueImpl.java.

References org.objectweb.joram.mom.dest.DestinationImpl.clients, org.objectweb.joram.mom.dest.ClusterQueueImpl.clusters, org.objectweb.joram.mom.dest.DestinationImpl.forward(), org.objectweb.joram.mom.dest.DestinationImpl.freeReading, org.objectweb.joram.mom.dest.DestinationImpl.freeWriting, org.objectweb.joram.mom.dest.DestinationImpl.getId(), org.objectweb.joram.mom.dest.LoadingFactor.getRateOfFlow(), org.objectweb.joram.mom.dest.ClusterQueueImpl.loadingFactor, and org.objectweb.joram.mom.dest.QueueImpl.logger.

Referenced by org.objectweb.joram.mom.dest.ClusterQueueImpl.specialAdminProcess().

Here is the call graph for this function:

void org.objectweb.joram.mom.dest.ClusterQueueImpl.broadcastLeave ( String  removeQueue  )  [protected]

broadcast to cluster the removeQueue.

Parameters:
removeQueue 

Definition at line 258 of file ClusterQueueImpl.java.

References org.objectweb.joram.mom.dest.ClusterQueueImpl.sendToCluster().

Referenced by org.objectweb.joram.mom.dest.ClusterQueueImpl.specialAdminProcess().

Here is the call graph for this function:

void org.objectweb.joram.mom.dest.ClusterQueueImpl.removeQueueCluster ( String  removeQueue  ) 

removeQueue leave the cluster.

Parameters:
removeQueue 

Definition at line 267 of file ClusterQueueImpl.java.

References org.objectweb.joram.mom.dest.ClusterQueueImpl.clusters, org.objectweb.joram.mom.dest.DestinationImpl.getId(), and org.objectweb.joram.mom.dest.QueueImpl.logger.

Referenced by org.objectweb.joram.mom.dest.ClusterQueueImpl.specialAdminProcess().

Here is the call graph for this function:

ClientMessages org.objectweb.joram.mom.dest.ClusterQueueImpl.preProcess ( AgentId  from,
ClientMessages  not 
)

overload preProcess(AgentId, ClientMessages) store all msgId in timeTable and visitTable.

Parameters:
from 
not 

Reimplemented from org.objectweb.joram.mom.dest.DestinationImpl.

Definition at line 295 of file ClusterQueueImpl.java.

References org.objectweb.joram.mom.dest.QueueImpl.arrivalsCounter, org.objectweb.joram.mom.messages.Message.getIdentifier(), org.objectweb.joram.mom.notifications.ClientMessages.getMessages(), org.objectweb.joram.mom.dest.QueueImpl.logger, org.objectweb.joram.mom.messages.Message.order, and org.objectweb.joram.mom.dest.QueueImpl.receiving.

Here is the call graph for this function:

void org.objectweb.joram.mom.dest.ClusterQueueImpl.postProcess ( ClientMessages  not  ) 

call factorCheck to evaluate the loading factor, activity, ... and send message to cluster if need.

Parameters:
not 

Reimplemented from org.objectweb.joram.mom.dest.DestinationImpl.

Definition at line 322 of file ClusterQueueImpl.java.

References org.objectweb.joram.mom.dest.ClusterQueueImpl.clusters, org.objectweb.joram.mom.dest.LoadingFactor.evalRateOfFlow(), org.objectweb.joram.mom.dest.LoadingFactor.factorCheck(), org.objectweb.joram.mom.dest.QueueImpl.getPendingMessageCount(), org.objectweb.joram.mom.dest.QueueImpl.getWaitingRequestCount(), org.objectweb.joram.mom.dest.ClusterQueueImpl.loadingFactor, org.objectweb.joram.mom.dest.LoadingFactor.producThreshold, and org.objectweb.joram.mom.dest.QueueImpl.receiving.

Here is the call graph for this function:

void org.objectweb.joram.mom.dest.ClusterQueueImpl.wakeUpNot ( WakeUpNot  not  ) 

wake up, and call factorCheck to evaluate the loading factor... if a message stays more than a period of time in timeTable, it is sent to an other (not visited) queue in cluster.

Parameters:
not 

Reimplemented from org.objectweb.joram.mom.dest.QueueImpl.

Definition at line 337 of file ClusterQueueImpl.java.

References org.objectweb.joram.mom.notifications.ClientMessages.addMessage(), org.objectweb.joram.mom.dest.ClusterQueueImpl.clusters, org.objectweb.joram.mom.dest.LoadingFactor.factorCheck(), org.objectweb.joram.mom.dest.DestinationImpl.forward(), org.objectweb.joram.mom.notifications.LBCycleLife.getClientMessages(), org.objectweb.joram.mom.dest.DestinationImpl.getId(), org.objectweb.joram.mom.dest.ClusterQueueImpl.getMessage(), org.objectweb.joram.mom.dest.QueueImpl.getPendingMessageCount(), org.objectweb.joram.mom.dest.LoadingFactor.getRateOfFlow(), org.objectweb.joram.mom.dest.QueueImpl.getWaitingRequestCount(), org.objectweb.joram.mom.dest.ClusterQueueImpl.loadingFactor, org.objectweb.joram.mom.dest.QueueImpl.logger, org.objectweb.joram.mom.notifications.LBCycleLife.putInVisitTable(), and org.objectweb.joram.mom.notifications.LBCycleLife.setClientMessages().

Here is the call graph for this function:

void org.objectweb.joram.mom.dest.ClusterQueueImpl.lBCycleLife ( AgentId  from,
LBCycleLife  not 
)

If the messages are not consumed by an other cluster's queue in a period of time, try to consume in this queue. update visitTable, and process clientMessages.

Parameters:
from 
not 

Definition at line 405 of file ClusterQueueImpl.java.

References org.objectweb.joram.mom.dest.ClusterQueueImpl.clusters, org.objectweb.joram.mom.dest.QueueImpl.doClientMessages(), org.objectweb.joram.mom.notifications.LBCycleLife.getClientMessages(), org.objectweb.joram.mom.notifications.QueueClusterNot.getRateOfFlow(), org.objectweb.joram.mom.notifications.LBCycleLife.getVisitTable(), and org.objectweb.joram.mom.dest.QueueImpl.logger.

Here is the call graph for this function:

void org.objectweb.joram.mom.dest.ClusterQueueImpl.joinQueueCluster ( JoinQueueCluster  not  ) 

new queue come in cluster, update clusters. and spread to clusters the AckjoiningQueue.

Parameters:
not JoinQueueCluster

Definition at line 430 of file ClusterQueueImpl.java.

References org.objectweb.joram.mom.dest.DestinationImpl.clients, org.objectweb.joram.mom.notifications.JoinQueueCluster.clients, org.objectweb.joram.mom.dest.ClusterQueueImpl.clusters, org.objectweb.joram.mom.notifications.JoinQueueCluster.clusters, org.objectweb.joram.mom.notifications.JoinQueueCluster.freeReading, org.objectweb.joram.mom.dest.DestinationImpl.freeReading, org.objectweb.joram.mom.notifications.JoinQueueCluster.freeWriting, org.objectweb.joram.mom.dest.DestinationImpl.freeWriting, org.objectweb.joram.mom.dest.LoadingFactor.getRateOfFlow(), org.objectweb.joram.mom.dest.ClusterQueueImpl.loadingFactor, org.objectweb.joram.mom.dest.QueueImpl.logger, and org.objectweb.joram.mom.dest.ClusterQueueImpl.sendToCluster().

Here is the call graph for this function:

void org.objectweb.joram.mom.dest.ClusterQueueImpl.ackJoinQueueCluster ( AckJoinQueueCluster  not  ) 

Parameters:
not AckJoinQueueCluster

Definition at line 468 of file ClusterQueueImpl.java.

References org.objectweb.joram.mom.dest.DestinationImpl.clients, org.objectweb.joram.mom.notifications.JoinQueueCluster.clients, org.objectweb.joram.mom.dest.ClusterQueueImpl.clusters, org.objectweb.joram.mom.notifications.JoinQueueCluster.clusters, org.objectweb.joram.mom.notifications.JoinQueueCluster.freeReading, org.objectweb.joram.mom.dest.DestinationImpl.freeReading, org.objectweb.joram.mom.notifications.JoinQueueCluster.freeWriting, org.objectweb.joram.mom.dest.DestinationImpl.freeWriting, and org.objectweb.joram.mom.dest.QueueImpl.logger.

void org.objectweb.joram.mom.dest.ClusterQueueImpl.receiveRequest ( AgentId  from,
ReceiveRequest  not 
) throws AccessException

Parameters:
not ReceiveRequest

Reimplemented from org.objectweb.joram.mom.dest.QueueImpl.

Definition at line 499 of file ClusterQueueImpl.java.

References org.objectweb.joram.mom.dest.ClusterQueueImpl.clusters, org.objectweb.joram.mom.dest.LoadingFactor.consumThreshold, org.objectweb.joram.mom.dest.LoadingFactor.factorCheck(), org.objectweb.joram.mom.dest.QueueImpl.getPendingMessageCount(), org.objectweb.joram.mom.dest.QueueImpl.getWaitingRequestCount(), org.objectweb.joram.mom.dest.ClusterQueueImpl.loadingFactor, and org.objectweb.joram.mom.dest.QueueImpl.logger.

Here is the call graph for this function:

void org.objectweb.joram.mom.dest.ClusterQueueImpl.lBMessageGive ( AgentId  from,
LBMessageGive  not 
) throws UnknownNotificationException

load balancing message give by an other cluster queue. process ClientMessages, no need to check if sender is writer.

Parameters:
from AgentId
not LBMessageGive
Exceptions:
UnknownNotificationException 

Definition at line 521 of file ClusterQueueImpl.java.

References org.objectweb.joram.mom.dest.ClusterQueueImpl.clusters, org.objectweb.joram.mom.dest.QueueImpl.doClientMessages(), and org.objectweb.joram.mom.dest.QueueImpl.logger.

Here is the call graph for this function:

void org.objectweb.joram.mom.dest.ClusterQueueImpl.lBMessageHope ( AgentId  from,
LBMessageHope  not 
)

load balancing message hope by the "from" queue.

Parameters:
from 
not LBMessageHope

Definition at line 541 of file ClusterQueueImpl.java.

References org.objectweb.joram.mom.dest.QueueImpl.cleanPendingMessage(), org.objectweb.joram.mom.dest.ClusterQueueImpl.clusters, org.objectweb.joram.mom.dest.LoadingFactor.evalRateOfFlow(), org.objectweb.joram.mom.dest.DestinationImpl.forward(), org.objectweb.joram.mom.dest.ClusterQueueImpl.getClientMessages(), org.objectweb.joram.mom.notifications.LBMessageHope.getNbMsg(), org.objectweb.joram.mom.dest.QueueImpl.getPendingMessageCount(), org.objectweb.joram.mom.dest.LoadingFactor.getRateOfFlow(), org.objectweb.joram.mom.notifications.QueueClusterNot.getRateOfFlow(), org.objectweb.joram.mom.dest.QueueImpl.getWaitingRequestCount(), org.objectweb.joram.mom.dest.ClusterQueueImpl.loadingFactor, org.objectweb.joram.mom.dest.QueueImpl.logger, org.objectweb.joram.mom.util.DMQManager.sendToDMQ(), org.objectweb.joram.mom.notifications.LBMessageGive.setClientMessages(), and org.objectweb.joram.mom.notifications.QueueClusterNot.setRateOfFlow().

Here is the call graph for this function:

ClientMessages org.objectweb.joram.mom.dest.ClusterQueueImpl.getClientMessages ( int  nb,
String  selector,
boolean  remove 
) [protected]

get a client message contain nb messages. add cluster monitoring value.

Parameters:
nb number of messages returned in ClientMessage.
selector jms selector
remove delete all messages returned if true
Returns:
ClientMessages (contains nb Messages)

Reimplemented from org.objectweb.joram.mom.dest.QueueImpl.

Definition at line 595 of file ClusterQueueImpl.java.

References org.objectweb.joram.mom.notifications.ClientMessages.getMessages(), org.objectweb.joram.mom.notifications.ClientMessages.messages, and org.objectweb.joram.mom.dest.ClusterQueueImpl.monitoringMsgSendToCluster().

Referenced by org.objectweb.joram.mom.dest.ClusterQueueImpl.lBMessageHope().

Here is the call graph for this function:

Message org.objectweb.joram.mom.dest.ClusterQueueImpl.getMessage ( String  msgId,
boolean  remove 
) [protected]

get mom message, delete if remove = true. add cluster monitoring value.

Parameters:
msgId message identification
remove if true delete message
Returns:
mom message

Reimplemented from org.objectweb.joram.mom.dest.QueueImpl.

Definition at line 617 of file ClusterQueueImpl.java.

References org.objectweb.joram.mom.messages.Message.getIdentifier(), and org.objectweb.joram.mom.dest.ClusterQueueImpl.monitoringMsgSendToCluster().

Referenced by org.objectweb.joram.mom.dest.ClusterQueueImpl.wakeUpNot().

Here is the call graph for this function:

void org.objectweb.joram.mom.dest.ClusterQueueImpl.sendToCluster ( QueueClusterNot  not  )  [protected]

send to all queue in cluster.

Parameters:
not 

Definition at line 630 of file ClusterQueueImpl.java.

References org.objectweb.joram.mom.dest.ClusterQueueImpl.clusters, org.objectweb.joram.mom.dest.DestinationImpl.forward(), org.objectweb.joram.mom.dest.DestinationImpl.getId(), and org.objectweb.joram.mom.dest.QueueImpl.logger.

Referenced by org.objectweb.joram.mom.dest.ClusterQueueImpl.broadcastLeave(), and org.objectweb.joram.mom.dest.ClusterQueueImpl.joinQueueCluster().

Here is the call graph for this function:

long org.objectweb.joram.mom.dest.ClusterQueueImpl.getClusterDeliveryCount (  ) 

return the number of Message send to cluster.

Definition at line 648 of file ClusterQueueImpl.java.

void org.objectweb.joram.mom.dest.ClusterQueueImpl.messageDelivered ( String  msgId  )  [protected]

Parameters:
msgId 

Reimplemented from org.objectweb.joram.mom.dest.QueueImpl.

Definition at line 680 of file ClusterQueueImpl.java.

void org.objectweb.joram.mom.dest.ClusterQueueImpl.monitoringMsgSendToCluster ( String  msgId  )  [protected]

Parameters:
msgId 

Definition at line 689 of file ClusterQueueImpl.java.

Referenced by org.objectweb.joram.mom.dest.ClusterQueueImpl.getClientMessages(), and org.objectweb.joram.mom.dest.ClusterQueueImpl.getMessage().

void org.objectweb.joram.mom.dest.ClusterQueueImpl.setWaitAfterClusterReq ( long  waitAfterClusterReq  ) 

Parameters:
waitAfterClusterReq 

Definition at line 699 of file ClusterQueueImpl.java.

References org.objectweb.joram.mom.dest.ClusterQueueImpl.loadingFactor, and org.objectweb.joram.mom.dest.LoadingFactor.validityPeriod.

void org.objectweb.joram.mom.dest.ClusterQueueImpl.setProducThreshold ( int  producThreshold  ) 

Parameters:
producThreshold 

Definition at line 708 of file ClusterQueueImpl.java.

References org.objectweb.joram.mom.dest.ClusterQueueImpl.loadingFactor, and org.objectweb.joram.mom.dest.LoadingFactor.producThreshold.

void org.objectweb.joram.mom.dest.ClusterQueueImpl.setConsumThreshold ( int  consumThreshold  ) 

Parameters:
consumThreshold 

Definition at line 716 of file ClusterQueueImpl.java.

References org.objectweb.joram.mom.dest.LoadingFactor.consumThreshold, and org.objectweb.joram.mom.dest.ClusterQueueImpl.loadingFactor.

void org.objectweb.joram.mom.dest.ClusterQueueImpl.setAutoEvalThreshold ( boolean  autoEvalThreshold  ) 

Parameters:
autoEvalThreshold 

Definition at line 724 of file ClusterQueueImpl.java.

References org.objectweb.joram.mom.dest.LoadingFactor.autoEvalThreshold, and org.objectweb.joram.mom.dest.ClusterQueueImpl.loadingFactor.


Member Data Documentation

Hashtable org.objectweb.joram.mom.dest.ClusterQueueImpl.clusters [protected]

key = agentId of ClusterQueue value = rateOfFlow (Float)

Definition at line 70 of file ClusterQueueImpl.java.

Referenced by org.objectweb.joram.mom.dest.ClusterQueueImpl.ackJoinQueueCluster(), org.objectweb.joram.mom.dest.ClusterQueueImpl.addQueueCluster(), org.objectweb.joram.mom.dest.ClusterQueueImpl.doList(), org.objectweb.joram.mom.dest.ClusterQueueImpl.initialize(), org.objectweb.joram.mom.dest.ClusterQueueImpl.joinQueueCluster(), org.objectweb.joram.mom.dest.ClusterQueueImpl.lBCycleLife(), org.objectweb.joram.mom.dest.ClusterQueueImpl.lBMessageGive(), org.objectweb.joram.mom.dest.ClusterQueueImpl.lBMessageHope(), org.objectweb.joram.mom.dest.ClusterQueueImpl.postProcess(), org.objectweb.joram.mom.dest.ClusterQueueImpl.receiveRequest(), org.objectweb.joram.mom.dest.ClusterQueueImpl.removeQueueCluster(), org.objectweb.joram.mom.dest.ClusterQueueImpl.sendToCluster(), and org.objectweb.joram.mom.dest.ClusterQueueImpl.wakeUpNot().

LoadingFactor org.objectweb.joram.mom.dest.ClusterQueueImpl.loadingFactor [protected]

to evaluate the loading factor, overloading, ...

Definition at line 73 of file ClusterQueueImpl.java.

Referenced by org.objectweb.joram.mom.dest.ClusterQueueImpl.addQueueCluster(), org.objectweb.joram.mom.dest.ClusterQueueImpl.ClusterQueueImpl(), org.objectweb.joram.mom.dest.ClusterQueueImpl.joinQueueCluster(), org.objectweb.joram.mom.dest.ClusterQueueImpl.lBMessageHope(), org.objectweb.joram.mom.dest.ClusterQueueImpl.postProcess(), org.objectweb.joram.mom.dest.ClusterQueueImpl.receiveRequest(), org.objectweb.joram.mom.dest.ClusterQueueImpl.setAutoEvalThreshold(), org.objectweb.joram.mom.dest.ClusterQueueImpl.setConsumThreshold(), org.objectweb.joram.mom.dest.ClusterQueueImpl.setProducThreshold(), org.objectweb.joram.mom.dest.ClusterQueueImpl.setWaitAfterClusterReq(), org.objectweb.joram.mom.dest.ClusterQueueImpl.specialAdminProcess(), and org.objectweb.joram.mom.dest.ClusterQueueImpl.wakeUpNot().


The documentation for this class was generated from the following file:
Generated on Tue Sep 16 16:19:30 2008 for joram by  doxygen 1.5.0