|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.joram.mom.dest.LoadingFactor
public class LoadingFactor
Nested Class Summary | |
---|---|
static class |
LoadingFactor.ConsumerStatus
|
static class |
LoadingFactor.ProducerStatus
|
static class |
LoadingFactor.Status
|
Field Summary | |
---|---|
boolean |
autoEvalThreshold
automatic eval threshold |
ClusterQueueImpl |
clusterQueueImpl
reference to clusterQueueImpl |
private int |
consumerStatus
consumer status |
int |
consumThreshold
consumer threshold |
static org.objectweb.util.monolog.api.Logger |
logger
logger |
private int |
nbOfPendingMessages
|
private int |
nbOfPendingRequests
|
private boolean |
overLoaded
|
private int |
producerStatus
producer status |
int |
producThreshold
producer threshold |
private float |
rateOfFlow
|
private static long |
serialVersionUID
define serialVersionUID for interoperability |
private int |
status
status |
private long |
statusTime
status time |
long |
validityPeriod
validity period |
Constructor Summary | |
---|---|
LoadingFactor(ClusterQueueImpl clusterQueueImpl,
int producThreshold,
int consumThreshold,
boolean autoEvalThreshold,
long validityPeriod)
|
Method Summary | |
---|---|
private void |
dispatchAndSendTo(java.util.Hashtable clusters,
int nbOfPendingMessages,
int nbOfPendingRequests)
use to dispatch request hope or give messages in clusters. |
private void |
evalActivity()
this method eval the activity of consumer and producer. |
float |
evalRateOfFlow(int pendingMessages,
int pendingRequests)
Evaluates the average rate of flow. |
void |
factorCheck(java.util.Hashtable clusters,
int pendingMessages,
int pendingRequests)
This method evaluates the rate of flow and activity. |
float |
getRateOfFlow()
|
boolean |
isOverloaded()
true if cluster queue is overloaded. |
private void |
processGive(int nbMsgGive,
java.util.Hashtable clusters)
send nb messages on clusters. |
private void |
processHope(int nbMsgHope,
java.util.Hashtable clusters)
send a hope request on a cluster queue. |
void |
setRateOfFlow(float rateOfFlow)
|
void |
setWait()
|
java.lang.String |
toString()
|
private void |
updateThreshold()
update the threshold if autoEvalThreshold is true. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
public static org.objectweb.util.monolog.api.Logger logger
private int status
private long statusTime
private int consumerStatus
private int producerStatus
public ClusterQueueImpl clusterQueueImpl
public int producThreshold
public int consumThreshold
public boolean autoEvalThreshold
public long validityPeriod
private float rateOfFlow
private boolean overLoaded
private int nbOfPendingMessages
private int nbOfPendingRequests
Constructor Detail |
---|
public LoadingFactor(ClusterQueueImpl clusterQueueImpl, int producThreshold, int consumThreshold, boolean autoEvalThreshold, long validityPeriod)
Method Detail |
---|
public void setRateOfFlow(float rateOfFlow)
public float getRateOfFlow()
public void setWait()
private void evalActivity()
private void updateThreshold()
public float evalRateOfFlow(int pendingMessages, int pendingRequests)
pendingMessages
- the number of pending messages.pendingRequests
- the number of pending requests.
public void factorCheck(java.util.Hashtable clusters, int pendingMessages, int pendingRequests)
clusters
- pendingMessages
- pendingRequests
- public boolean isOverloaded()
private void dispatchAndSendTo(java.util.Hashtable clusters, int nbOfPendingMessages, int nbOfPendingRequests)
clusters
- nbOfPendingMessages
- nbOfPendingRequests
- private void processGive(int nbMsgGive, java.util.Hashtable clusters)
nbMsgGive
- clusters
- Hashtable of cluster Queueprivate void processHope(int nbMsgHope, java.util.Hashtable clusters)
nbMsgHope
- clusters
- Hashtable of cluster Queuepublic java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |