org.objectweb.joram.mom.dest
Class LoadingFactor

java.lang.Object
  extended byorg.objectweb.joram.mom.dest.LoadingFactor
All Implemented Interfaces:
java.io.Serializable

public class LoadingFactor
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

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
 int consumThreshold
          consumer threshold
 int producThreshold
          producer threshold
 long validityPeriod
          validity period
 
Constructor Summary
LoadingFactor(ClusterQueueImpl clusterQueueImpl, int producThreshold, int consumThreshold, boolean autoEvalThreshold, long validityPeriod)
           
 
Method Summary
 float evalRateOfFlow(int pendingMessages, int pendingRequests)
          eval the rate of flow (means).
 void factorCheck(java.util.Hashtable clusters, int pendingMessages, int pendingRequests)
          this method eval the rate of flow and activity.
 float getRateOfFlow()
           
 boolean isOverloaded()
          return true if cluster queue is overloaded.
 void processGive(AgentId to, LBCycleLife cycle)
           
 void setRateOfFlow(float rateOfFlow)
           
 void setWait()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

clusterQueueImpl

public ClusterQueueImpl clusterQueueImpl
reference to clusterQueueImpl


producThreshold

public int producThreshold
producer threshold


consumThreshold

public int consumThreshold
consumer threshold


autoEvalThreshold

public boolean autoEvalThreshold
automatic eval threshold


validityPeriod

public long validityPeriod
validity period

Constructor Detail

LoadingFactor

public LoadingFactor(ClusterQueueImpl clusterQueueImpl,
                     int producThreshold,
                     int consumThreshold,
                     boolean autoEvalThreshold,
                     long validityPeriod)
Method Detail

setRateOfFlow

public void setRateOfFlow(float rateOfFlow)

getRateOfFlow

public float getRateOfFlow()

setWait

public void setWait()

evalRateOfFlow

public float evalRateOfFlow(int pendingMessages,
                            int pendingRequests)
eval the rate of flow (means). if rateOfFlow > 1 the queue are more pending requests than pending messages. else if rateOfFlow < 1 the queue are more pending messages than pending requests. This value is set in all QueueClusterNot notification.


factorCheck

public void factorCheck(java.util.Hashtable clusters,
                        int pendingMessages,
                        int pendingRequests)
this method eval the rate of flow and activity. if necessary send "give or hope" messages, and update threshol.


isOverloaded

public boolean isOverloaded()
return true if cluster queue is overloaded. depends on activity.


processGive

public void processGive(AgentId to,
                        LBCycleLife cycle)

toString

public java.lang.String toString()


Copyright ? 2004 Scalagent - All rights reserved