|
Joram 5.0.8 | ||||||||
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 calcul the loading factor, overloaded, ... |
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, 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,
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 (vector). |
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 |
getMessage(java.lang.String msgId,
boolean remove)
get mom message, delete if remove = true. |
void |
joinQueueCluster(JoinQueueCluster not)
new queue come in cluster, update clusters. |
void |
lBCycleLife(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. |
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 methode 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(ReceiveRequest not)
|
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 msg stay more a periode time in timeTable send to an other (no visited) queue in cluster. |
Methods inherited from class org.objectweb.joram.mom.dest.DestinationImpl |
---|
canBeDeleted, clientMessages, deleteNot, forward, getCreationDate, getCreationTimeInMillis, getDestinationId, getDMQId, getNbMsgsDeliverSinceCreation, getNbMsgsSendToDMQSinceCreation, getRight, getRights, isAdministrator, isFreeReading, isFreeWriting, isLocal, isReader, isWriter, monitFreeAccess, monitGetReaders, monitGetStat, monitGetWriters, postProcess, preProcess, processSetRight, replyToTopic, requestGroupNot, sendToDMQ, 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, getNbMsgsSendToDMQSinceCreation, 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 destId, fr.dyade.aaa.agent.AgentId adminId, java.util.Properties prop)
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
public java.lang.Object specialAdminProcess(SpecialAdminRequest not) throws RequestException
specialAdminProcess
in class DestinationImpl
not
-
RequestException
protected 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 DestinationImpl
from
- not
- public void postProcess(ClientMessages not)
postProcess
in class DestinationImpl
not
- public void wakeUpNot(WakeUpNot not)
wakeUpNot
in class QueueImpl
not
- 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
- AckJoinQueueClusterpublic void receiveRequest(ReceiveRequest not)
not
- ReceiveRequestpublic 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
- LBMessageHopeprotected ClientMessages getClientMessages(int nb, java.lang.String selector, boolean remove)
getClientMessages
in class QueueImpl
nb
- number of messages returned in ClientMessage.selector
- jms selectorremove
- delete all messages returned if true
protected Message getMessage(java.lang.String msgId, boolean remove)
getMessage
in class QueueImpl
msgId
- 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 QueueImpl
msgId
- 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.0.8 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |