org.objectweb.joram.mom.dest

Class LoadingFactor

Implemented Interfaces:
Serializable

public class LoadingFactor
extends java.lang.Object
implements Serializable

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(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()
String
toString()

Field Details

autoEvalThreshold

public boolean autoEvalThreshold
automatic eval threshold


clusterQueueImpl

public ClusterQueueImpl clusterQueueImpl
reference to clusterQueueImpl


consumThreshold

public int consumThreshold
consumer threshold


producThreshold

public int producThreshold
producer threshold


validityPeriod

public long validityPeriod
validity period

Constructor Details

LoadingFactor

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

Method Details

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 <321 the queue are more pending messages than pending requests. This value is set in all QueueClusterNot notification.


factorCheck

public void factorCheck(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.


getRateOfFlow

public float getRateOfFlow()


isOverloaded

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


processGive

public void processGive(AgentId to,
                        LBCycleLife cycle)


setRateOfFlow

public void setRateOfFlow(float rateOfFlow)


setWait

public void setWait()


toString

public String toString()


Copyright B) 2004 Scalagent - All rights reserved