Package fr.dyade.aaa.agent
Interface EngineMBean
-
- All Known Implementing Classes:
Engine
public interface EngineMBean
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringdumpAgent(String id)intgetAverageCPU()Returns the average use of CPU by the Engine thread during last minute.floatgetAverageLoad1()Returns the load averages for the last minute.floatgetAverageLoad15()Returns the load averages for the past 15 minutes.floatgetAverageLoad5()Returns the load averages for the past 5 minutes.longgetCommitTime()Returns the total commit time calculated for this engine.StringgetName()Returns thisEngine's name.intgetNbAgents()Returns the number of agents actually loaded in memory.intgetNbFixedAgents()Returns the number of fixed agents.intgetNbMaxAgents()Returns the maximum number of agents loaded in memory.intgetNbMessages()Gets the number of messages posted to this engine since creation.longgetNbReactions()Returns the number of agent's reaction since last boot.intgetNbWaitingMessages()Gets the number of waiting messages in this engine.longgetReactTime()Returns the total reaction time calculated for this engine.StringgetRunningAgent()Returns the unique id. of the running agent if any, null otherwise.longgetWorkInProgress()Returns the tick counter that reflects activity in engine.booleanisAgentProfiling()Returns true if the agent profiling is on.booleanisNoTxIfTransient()Returns the flag to avoid transactions.booleanisRunning()Tests if the engine is alive.Stringreport()Returns a report about the distribution of messages type in queue.voidresetCommitTime()Reset the commit time for this engine.voidresetReactTime()Reset the reaction time for this engine.voidresetTimer()Reset react and commit time for this engine.voidsetAgentProfiling(boolean agentProfiling)Sets the agent profiling.voidsetNbMaxAgents(int NbMaxAgents)Sets the maximum number of agents that can be loaded simultaneously in memory.voidstart()Causes this engine to begin execution.voidstop()Forces the engine to stop executingStringtoString()Returns a string representation of this engine.
-
-
-
Method Detail
-
getName
String getName()
Returns thisEngine's name.- Returns:
- this
Engine's name.
-
getNbMaxAgents
int getNbMaxAgents()
Returns the maximum number of agents loaded in memory.- Returns:
- the maximum number of agents loaded in memory
-
getNbAgents
int getNbAgents()
Returns the number of agents actually loaded in memory.- Returns:
- the maximum number of agents actually loaded in memory
-
isRunning
boolean isRunning()
Tests if the engine is alive.- Returns:
- true if this
MessageConsumeris alive; false otherwise.
-
getNbReactions
long getNbReactions()
Returns the number of agent's reaction since last boot.- Returns:
- the number of agent's reaction since last boot
-
getNbMessages
int getNbMessages()
Gets the number of messages posted to this engine since creation.- Returns:
- the number of messages.
-
getRunningAgent
String getRunningAgent()
Returns the unique id. of the running agent if any, null otherwise.- Returns:
- the unique id. of the running agent if any, null otherwise.
-
getNbWaitingMessages
int getNbWaitingMessages()
Gets the number of waiting messages in this engine.- Returns:
- the number of waiting messages.
-
report
String report()
Returns a report about the distribution of messages type in queue.- Returns:
- a report about the distribution of messages type in queue.
-
getNbFixedAgents
int getNbFixedAgents()
Returns the number of fixed agents.- Returns:
- the number of fixed agents
-
setNbMaxAgents
void setNbMaxAgents(int NbMaxAgents)
Sets the maximum number of agents that can be loaded simultaneously in memory.- Parameters:
NbMaxAgents- the maximum number of agents
-
isAgentProfiling
boolean isAgentProfiling()
Returns true if the agent profiling is on.- Returns:
- true if the agent profiling is on.
- See Also:
isAgentProfiling()
-
setAgentProfiling
void setAgentProfiling(boolean agentProfiling)
Sets the agent profiling. If true, the cumulative time of reaction and commit is kept for each agent. In addition the total reaction and commit time is calculated for this engine.- Parameters:
agentProfiling- if true set the agent profiling.- See Also:
setAgentProfiling(boolean)
-
getReactTime
long getReactTime()
Returns the total reaction time calculated for this engine.- Returns:
- the reactTime
-
resetReactTime
void resetReactTime()
Reset the reaction time for this engine.
-
getCommitTime
long getCommitTime()
Returns the total commit time calculated for this engine.- Returns:
- the commitTime
-
resetCommitTime
void resetCommitTime()
Reset the commit time for this engine.
-
resetTimer
void resetTimer()
Reset react and commit time for this engine.
-
getWorkInProgress
long getWorkInProgress()
Returns the tick counter that reflects activity in engine.- Returns:
- the tick counter that reflects activity in engine.
-
getAverageCPU
int getAverageCPU()
Returns the average use of CPU by the Engine thread during last minute.- Returns:
- the average use of CPU by the Engine thread during last minute.
-
getAverageLoad1
float getAverageLoad1()
Returns the load averages for the last minute.- Returns:
- the load averages for the last minute.
-
getAverageLoad5
float getAverageLoad5()
Returns the load averages for the past 5 minutes.- Returns:
- the load averages for the past 5 minutes.
-
getAverageLoad15
float getAverageLoad15()
Returns the load averages for the past 15 minutes.- Returns:
- the load averages for the past 15 minutes.
-
toString
String toString()
Returns a string representation of this engine.
-
start
void start() throws ExceptionCauses this engine to begin execution.- Throws:
Exception- an error occurs.
-
stop
void stop()
Forces the engine to stop executing
-
isNoTxIfTransient
boolean isNoTxIfTransient()
Returns the flag to avoid transactions.- Returns:
- the flag to avoid transactions
-
-