|
Joram ${version} | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.joram.mom.dest.DestinationImpl
org.objectweb.joram.mom.dest.QueueImpl
org.objectweb.joram.mom.dest.ClusterQueueImpl
The ClusterQueueImpl
class implements the MOM queue behaviour,
basically storing messages and delivering them upon clients requests or
delivering to an other cluster queue.
Field Summary | |
protected java.util.Hashtable |
clusters
key = agentId of ClusterQueue value = rateOfFlow (Float) |
protected LoadingFactor |
loadingFactor
to calcul the loading factor, overloaded, ... |
protected long |
period
period to eval the loading factor |
protected long |
waitAfterClusterReq
waiting after a cluster request |
Fields inherited from class org.objectweb.joram.mom.dest.QueueImpl |
arrivalsCounter, consumers, contexts, deliveredMsgs, messages, nbMaxMsg, receiving, requests |
Fields inherited from class org.objectweb.joram.mom.dest.DestinationImpl |
_rights, clients, creationDate, destId, dmqId, freeReading, freeWriting, nbMsgsDeliverSinceCreation, nbMsgsReceiveSinceCreation, nbMsgsSendToDMQSinceCreation, READ, READWRITE, WRITE |
Constructor Summary | |
ClusterQueueImpl(fr.dyade.aaa.agent.AgentId destId,
fr.dyade.aaa.agent.AgentId adminId,
long period,
int producThreshold,
int consumThreshold,
boolean autoEvalThreshold,
long waitAfterClusterReq)
Constructs a ClusterQueueImpl instance. |
Method Summary | |
protected void |
addQueueCluster(java.lang.String joiningQueue,
float rateOfFlow)
send to joiningQueue a JoinQueueCluster not. |
protected void |
broadcastLeave(java.lang.String removeQueue)
broadcast to cluster the removeQueue. |
protected java.lang.Object |
doList(ListClusterQueue req)
return the cluster list (vector). |
protected void |
doProcess(ClientMessages not)
overload doProcess(ClientMessages) store all msgId in timeTable and visitTable, store message and deliver message if consumer wait. |
protected void |
doProcess(SetRightRequest not)
propagate right to all cluster. |
protected void |
doReact(AckJoinQueueCluster not)
|
protected void |
doReact(fr.dyade.aaa.agent.AgentId from,
LBCycleLife not)
The messages are not consumed by an other cluster's queue in a periode time, try to consume in this queue. |
protected void |
doReact(fr.dyade.aaa.agent.AgentId from,
LBMessageGive not)
load balancing message give by an other cluster queue. |
protected void |
doReact(fr.dyade.aaa.agent.AgentId from,
LBMessageHope not)
load balancing message hope by the "from" queue. |
protected void |
doReact(JoinQueueCluster not)
new queue come in cluster, update clusters. |
protected void |
doReact(ReceiveRequest not)
|
protected void |
doReact(SetRightQueueCluster not)
set the same right to all cluster |
protected void |
doReact(WakeUpNot not)
wake up, and call factorCheck to evaluate the loading factor... |
long |
getClusterDeliveryCount()
return the number of Message send to cluster. |
int |
getNumberOfPendingMessages()
|
int |
getNumberOfPendingRequests()
|
protected void |
messageDelivered(java.lang.String msgId)
call in deliverMessages just after channel.sendTo(msg), overload this methode to process a specific treatment. |
protected void |
messageRemoved(java.lang.String msgId)
call in deliverMessages just after a remove message (invalid), overload this methode to process a specific treatment. |
protected void |
messageSendToCluster(java.lang.String msgId)
|
void |
react(fr.dyade.aaa.agent.AgentId from,
fr.dyade.aaa.agent.Notification not)
Distributes the received notifications to the appropriate reactions. |
protected void |
removeQueueCluster(java.lang.String removeQueue)
removeQueue leave the cluster. |
protected void |
sendToCluster(QueueClusterNot not)
send to all queue in cluster. |
protected java.lang.Object |
specialAdminProcess(SpecialAdminRequest not)
use to add or remove ClusterQueue to cluster. |
protected void |
specialProcess(fr.dyade.aaa.agent.Notification not)
implement special process (see QueueImpl). |
java.lang.String |
toString()
Returns a string representation of this destination. |
Methods inherited from class org.objectweb.joram.mom.dest.QueueImpl |
deliverMessages, doProcess, doProcess, doReact, doReact, doReact, doReact, doReact, doReact, doReact, doReact, doReact, doReact, doReact, getDeliveredMessageCount, getMessageCounter, getNbMaxMsg, getPendingMessageCount, getThreshold, getWaitingRequestCount, isUndeliverable, readBag, setNbMaxMsg, setThreshold, storeMessage, writeBag |
Methods inherited from class org.objectweb.joram.mom.dest.DestinationImpl |
canBeDeleted, doReact, doReact, doReact, doReact, doReact, doReact, doReact, doReact, doReact, doReact, getCreationDate, getCreationTimeInMillis, getDestinationId, getDMQId, getNbMsgsDeliverSinceCreation, getNbMsgsReceiveSinceCreation, getNbMsgsSendToDMQSinceCreation, getRight, getRights, isAdministrator, isFreeReading, isFreeWriting, isReader, isWriter, processSetRight, sendToDMQ, setFreeReading, setFreeWriting |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.objectweb.joram.mom.dest.DestinationImplMBean |
getCreationDate, getCreationTimeInMillis, getDestinationId, getDMQId, getNbMsgsDeliverSinceCreation, getNbMsgsReceiveSinceCreation, getNbMsgsSendToDMQSinceCreation, getRight, getRights, isFreeReading, isFreeWriting, setFreeReading, setFreeWriting |
Field Detail |
protected java.util.Hashtable clusters
protected long period
protected long waitAfterClusterReq
protected LoadingFactor loadingFactor
Constructor Detail |
public ClusterQueueImpl(fr.dyade.aaa.agent.AgentId destId, fr.dyade.aaa.agent.AgentId adminId, long period, int producThreshold, int consumThreshold, boolean autoEvalThreshold, long waitAfterClusterReq)
ClusterQueueImpl
instance.
destId
- Identifier of the agent hosting the queue.adminId
- Identifier of the administrator of the queue.Method Detail |
public java.lang.String toString()
QueueImpl
toString
in interface DestinationImplMBean
toString
in class QueueImpl
protected void specialProcess(fr.dyade.aaa.agent.Notification not)
specialProcess
in class QueueImpl
protected void doProcess(SetRightRequest not)
doProcess
in class QueueImpl
protected java.lang.Object specialAdminProcess(SpecialAdminRequest not) throws RequestException
specialAdminProcess
in class DestinationImpl
RequestException
protected java.lang.Object doList(ListClusterQueue req)
protected void addQueueCluster(java.lang.String joiningQueue, float rateOfFlow)
protected void broadcastLeave(java.lang.String removeQueue)
protected void removeQueueCluster(java.lang.String removeQueue)
protected void doProcess(ClientMessages not)
doProcess
in class QueueImpl
public void react(fr.dyade.aaa.agent.AgentId from, fr.dyade.aaa.agent.Notification not) throws fr.dyade.aaa.agent.UnknownNotificationException
react
in class QueueImpl
fr.dyade.aaa.agent.UnknownNotificationException
- When receiving an unexpected
notification.protected void doReact(SetRightQueueCluster not)
protected void doReact(WakeUpNot not)
protected void doReact(fr.dyade.aaa.agent.AgentId from, LBCycleLife not)
protected void doReact(JoinQueueCluster not)
protected void doReact(AckJoinQueueCluster not)
protected void doReact(ReceiveRequest not)
protected void doReact(fr.dyade.aaa.agent.AgentId from, LBMessageGive not) throws fr.dyade.aaa.agent.UnknownNotificationException
fr.dyade.aaa.agent.UnknownNotificationException
protected void doReact(fr.dyade.aaa.agent.AgentId from, LBMessageHope not)
protected void sendToCluster(QueueClusterNot not)
public long getClusterDeliveryCount()
protected void messageDelivered(java.lang.String msgId)
QueueImpl
messageDelivered
in class QueueImpl
protected void messageRemoved(java.lang.String msgId)
QueueImpl
messageRemoved
in class QueueImpl
protected void messageSendToCluster(java.lang.String msgId)
public int getNumberOfPendingMessages()
public int getNumberOfPendingRequests()
|
Joram ${version} | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |