public abstract class BaseLoadBalancing extends jade.core.behaviours.OneShotBehaviour implements BaseLoadBalancingInterface
Modifier and Type | Field and Description |
---|---|
protected java.util.Hashtable<java.lang.String,java.lang.Float> |
currContainerBenchmarkResults
The BenchmarkResults of all involved container.
|
protected java.util.Hashtable<java.lang.String,jade.core.Location> |
currContainerLoactions
The locations in the distributed system.
|
protected DistributionSetup |
currDisSetup
The current distribution setup.
|
protected Project |
currProject
The current project instance.
|
protected SimulationSetup |
currSimSetup
The current simulation setup.
|
protected java.lang.Integer |
currThresholdExceededOverAll
The indicator that says if the thresholds were exceeded over all.
|
protected LoadThresholdLevels |
currThresholdLevels
The current threshold levels.
|
protected LoadServiceHelper |
loadHelper
The load helper for the connection to the LoadService.
|
protected SimulationServiceHelper |
simHelper
The simulation helper for the connection to the SimulationsService.
|
Constructor and Description |
---|
BaseLoadBalancing(jade.core.Agent agent)
Instantiates a new base load balancing.
|
Modifier and Type | Method and Description |
---|---|
void |
action() |
protected java.lang.Object[] |
getStartArguments(AgentClassElement4SimStart ace4SimStart)
This method will return the Object Array for the start argument of an agent.
|
protected void |
openMonitorAgents()
This method will start the Load-Monitor-Agent and Thread-Monitor-Agent.
|
protected void |
setAgentMigration(java.util.Vector<LoadAgentMap.AID_Container> transferAgents)
This Method transfers the new LoadAgentMap-Instance to the SimulationService
and informs the agent about the location they have to migrate.
|
protected boolean |
startAgent(java.lang.String nickName,
java.lang.Class<? extends jade.core.Agent> agentClass,
java.lang.Object[] args)
Method to start a new agent.
|
protected boolean |
startAgent(java.lang.String nickName,
java.lang.Class<? extends jade.core.Agent> agentClass,
java.lang.Object[] args,
jade.core.Location toLocation)
Main-Method to start a new agent.
|
protected boolean |
startAgent(java.lang.String nickName,
java.lang.String agentClassName,
java.lang.Object[] args)
Method to start a new agent.
|
protected boolean |
startAgent(java.lang.String nickName,
java.lang.String agentClassName,
java.lang.Object[] args,
jade.core.Location toLocation)
Method to start a new agent.
|
protected boolean |
startAgentsOnContainers(java.util.Hashtable<jade.core.Location,java.util.ArrayList<AgentClassElement4SimStart>> agentContainerList,
boolean verbose)
start agents on their assigned locations.
|
protected java.util.Hashtable<java.lang.String,jade.core.Location> |
startNumberOfRemoteContainer(int numberOfContainer,
boolean filterMainContainer,
RemoteContainerConfig remoteContainerConfig)
This method will start a number of remote container.
|
protected java.lang.String |
startRemoteContainer()
This Method can be invoked, if a new remote container is required.
|
protected java.lang.String |
startRemoteContainer(RemoteContainerConfig remoteContainerConfig)
This Method can be invoked, if a new remote container is required.
|
actionWrapper, block, block, getAgent, getBehaviourName, getDataStore, getExecutionState, getParent, getRestartCounter, handle, handleBlockEvent, handleRestartEvent, isRunnable, onEnd, onStart, restart, root, setAgent, setBehaviourName, setDataStore, setExecutionState
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
doBalancing
protected SimulationServiceHelper simHelper
protected LoadServiceHelper loadHelper
protected Project currProject
protected SimulationSetup currSimSetup
protected DistributionSetup currDisSetup
protected LoadThresholdLevels currThresholdLevels
protected java.lang.Integer currThresholdExceededOverAll
protected java.util.Hashtable<java.lang.String,java.lang.Float> currContainerBenchmarkResults
protected java.util.Hashtable<java.lang.String,jade.core.Location> currContainerLoactions
public BaseLoadBalancing(jade.core.Agent agent)
public void action()
action
in class jade.core.behaviours.Behaviour
protected java.lang.Object[] getStartArguments(AgentClassElement4SimStart ace4SimStart)
ace4SimStart
- the AgentClassElement4SimStartprotected boolean startAgent(java.lang.String nickName, java.lang.String agentClassName, java.lang.Object[] args)
nickName
- the nick nameagentClassName
- the agent class nameargs
- the start arguments as Object arrayprotected boolean startAgent(java.lang.String nickName, java.lang.Class<? extends jade.core.Agent> agentClass, java.lang.Object[] args)
nickName
- the nick nameagentClass
- the agent classargs
- the start arguments as Object arrayprotected boolean startAgent(java.lang.String nickName, java.lang.String agentClassName, java.lang.Object[] args, jade.core.Location toLocation)
nickName
- the nick nameagentClassName
- the agent class nameargs
- the start arguments as Object arraytoLocation
- the location, where the agent should startprotected boolean startAgent(java.lang.String nickName, java.lang.Class<? extends jade.core.Agent> agentClass, java.lang.Object[] args, jade.core.Location toLocation)
nickName
- the nick nameagentClass
- the agent classargs
- the start arguments as Object arraytoLocation
- the location, where the agent should startprotected boolean startAgentsOnContainers(java.util.Hashtable<jade.core.Location,java.util.ArrayList<AgentClassElement4SimStart>> agentContainerList, boolean verbose)
agentContainerList
- the agent container listverbose
- the verboseprotected void openMonitorAgents()
protected java.lang.String startRemoteContainer()
currContainerLoactions
and
currContainerBenchmarkResults
.currContainerLoactions
,
currContainerBenchmarkResults
protected java.lang.String startRemoteContainer(RemoteContainerConfig remoteContainerConfig)
currContainerLoactions
and
currContainerBenchmarkResults
.remoteContainerConfig
- the remote container configuration out of the ProjectcurrContainerLoactions
,
currContainerBenchmarkResults
protected java.util.Hashtable<java.lang.String,jade.core.Location> startNumberOfRemoteContainer(int numberOfContainer, boolean filterMainContainer, RemoteContainerConfig remoteContainerConfig)
numberOfContainer
- the number of containerremoteContainerConfig
- the remote container configurationfilterMainContainer
- true, if the Main-Container should be filter out of the resultprotected void setAgentMigration(java.util.Vector<LoadAgentMap.AID_Container> transferAgents)
transferAgents
- the new agent migration