|
Joram 5.2.6 | ||||||||
| 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
public class 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 evaluate the loading factor, overloading, ... |
| Fields inherited from class org.objectweb.joram.mom.dest.QueueImpl |
|---|
arrivalsCounter, consumers, contexts, deliveredMsgs, logger, messages, nbMaxMsg, period, receiving, requests |
| Fields inherited from class org.objectweb.joram.mom.dest.DestinationImpl |
|---|
_rights, agent, clients, creationDate, dmqId, freeReading, freeWriting, nbMsgsDeliverSinceCreation, nbMsgsReceiveSinceCreation, nbMsgsSentToDMQSinceCreation, READ, READWRITE, WRITE |
| Constructor Summary | |
|---|---|
ClusterQueueImpl(fr.dyade.aaa.agent.AgentId adminId,
java.util.Properties prop)
Constructs a ClusterQueueImpl instance. |
|
| Method Summary | |
|---|---|
void |
ackJoinQueueCluster(AckJoinQueueCluster not)
|
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. |
protected ClientMessages |
getClientMessages(int nb,
java.lang.String selector,
boolean remove)
get a client message contain nb messages. |
long |
getClusterDeliveryCount()
return the number of Message send to cluster. |
protected Message |
getQueueMessage(java.lang.String msgId,
boolean remove)
get mom message, delete if remove = true. |
void |
initialize(boolean firstTime)
Initializes the destination. |
void |
joinQueueCluster(JoinQueueCluster not)
new queue come in cluster, update clusters. |
void |
lBCycleLife(fr.dyade.aaa.agent.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. |
void |
lBMessageGive(fr.dyade.aaa.agent.AgentId from,
LBMessageGive not)
load balancing message give by an other cluster queue. process ClientMessages, no need to check if sender is writer. |
void |
lBMessageHope(fr.dyade.aaa.agent.AgentId from,
LBMessageHope not)
load balancing message hope by the "from" queue. |
protected void |
messageDelivered(java.lang.String msgId)
call in deliverMessages just after forward(msg), overload this method to process a specific treatment. |
protected void |
monitoringMsgSendToCluster(java.lang.String msgId)
|
void |
postProcess(ClientMessages not)
call factorCheck to evaluate the loading factor, activity, ... and send message to cluster if need. |
ClientMessages |
preProcess(fr.dyade.aaa.agent.AgentId from,
ClientMessages not)
overload preProcess(AgentId, ClientMessages) store all msgId in timeTable and visitTable. |
void |
receiveRequest(fr.dyade.aaa.agent.AgentId from,
ReceiveRequest not)
Method implementing the reaction to a ReceiveRequest
instance, requesting a message. |
void |
removeQueueCluster(java.lang.String removeQueue)
removeQueue leave the cluster. |
protected void |
sendToCluster(QueueClusterNot not)
send to all queue in cluster. |
void |
setAutoEvalThreshold(boolean autoEvalThreshold)
|
void |
setConsumThreshold(int consumThreshold)
|
void |
setProducThreshold(int producThreshold)
|
void |
setWaitAfterClusterReq(long waitAfterClusterReq)
|
java.lang.Object |
specialAdminProcess(SpecialAdminRequest not)
use to add or remove ClusterQueue to cluster. |
java.lang.String |
toString()
Returns a string representation of this destination. |
void |
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. |
| Methods inherited from class org.objectweb.joram.mom.dest.DestinationImpl |
|---|
canBeDeleted, clientMessages, deleteNot, forward, getCreationDate, getCreationTimeInMillis, getDestinationId, getDMQId, getId, getNbMsgsDeliverSinceCreation, getNbMsgsSentToDMQSinceCreation, getRight, getRights, handleDeniedMessage, isAdministrator, isFreeReading, isFreeWriting, isLocal, isReader, isWriter, monitFreeAccess, monitGetReaders, monitGetStat, monitGetWriters, postProcess, preProcess, processSetRight, replyToTopic, requestGroupNot, setAgent, setDMQRequest, setFreeReading, setFreeWriting, setRightRequest, specialAdminRequest, unknownAgent |
| 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, getNbMsgsSentToDMQSinceCreation, getRight, getRights, isFreeReading, isFreeWriting, setFreeReading, setFreeWriting |
| Field Detail |
|---|
protected java.util.Hashtable clusters
protected LoadingFactor loadingFactor
| Constructor Detail |
|---|
public ClusterQueueImpl(fr.dyade.aaa.agent.AgentId adminId,
java.util.Properties prop)
ClusterQueueImpl instance.
adminId - Identifier of the administrator of the queue.prop - The initial set of properties.| Method Detail |
|---|
public void initialize(boolean firstTime)
initialize in class QueueImplfirstTime - true when first called by the factorypublic java.lang.String toString()
QueueImpl
toString in interface DestinationImplMBeantoString in class QueueImpl
public java.lang.Object specialAdminProcess(SpecialAdminRequest not)
throws RequestException
specialAdminProcess in class DestinationImplnot -
RequestExceptionprotected java.lang.Object doList(ListClusterQueue req)
req -
protected void addQueueCluster(java.lang.String joiningQueue,
float rateOfFlow)
joiningQueue - rateOfFlow - protected void broadcastLeave(java.lang.String removeQueue)
removeQueue - public void removeQueueCluster(java.lang.String removeQueue)
removeQueue -
public ClientMessages preProcess(fr.dyade.aaa.agent.AgentId from,
ClientMessages not)
preProcess in class DestinationImplfrom - not - public void postProcess(ClientMessages not)
postProcess in class DestinationImplnot - public void wakeUpNot(WakeUpNot not)
wakeUpNot in class QueueImplnot -
public void lBCycleLife(fr.dyade.aaa.agent.AgentId from,
LBCycleLife not)
from - not - public void joinQueueCluster(JoinQueueCluster not)
not - JoinQueueClusterpublic void ackJoinQueueCluster(AckJoinQueueCluster not)
not - AckJoinQueueCluster
public void receiveRequest(fr.dyade.aaa.agent.AgentId from,
ReceiveRequest not)
throws AccessException
QueueImplReceiveRequest
instance, requesting a message.
This method stores the request and launches a delivery sequence.
receiveRequest in class QueueImplnot - ReceiveRequest
AccessException - If the sender is not a reader.
public void lBMessageGive(fr.dyade.aaa.agent.AgentId from,
LBMessageGive not)
throws fr.dyade.aaa.agent.UnknownNotificationException
from - AgentIdnot - LBMessageGive
fr.dyade.aaa.agent.UnknownNotificationException
public void lBMessageHope(fr.dyade.aaa.agent.AgentId from,
LBMessageHope not)
from - not - LBMessageHope
protected ClientMessages getClientMessages(int nb,
java.lang.String selector,
boolean remove)
getClientMessages in class QueueImplnb - number of messages returned in ClientMessage.selector - jms selectorremove - delete all messages returned if true
protected Message getQueueMessage(java.lang.String msgId,
boolean remove)
getQueueMessage in class QueueImplmsgId - message identificationremove - if true delete message
protected void sendToCluster(QueueClusterNot not)
not - public long getClusterDeliveryCount()
protected void messageDelivered(java.lang.String msgId)
QueueImpl
messageDelivered in class QueueImplmsgId - protected void monitoringMsgSendToCluster(java.lang.String msgId)
msgId - public void setWaitAfterClusterReq(long waitAfterClusterReq)
waitAfterClusterReq - public void setProducThreshold(int producThreshold)
producThreshold - public void setConsumThreshold(int consumThreshold)
consumThreshold - public void setAutoEvalThreshold(boolean autoEvalThreshold)
autoEvalThreshold -
|
Joram 5.2.6 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||