|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.dyade.aaa.agent.Engine
fr.dyade.aaa.agent.HAEngine
final class HAEngine
Implementation of Engine that used JGroups in order to improve reliability.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class fr.dyade.aaa.agent.Engine |
---|
Engine.EngineAverageLoadTask |
Field Summary | |
---|---|
private static long |
DEFAULT_HA_TIMEOUT
|
private static java.lang.String |
HA_TIMEOUT_PROPERTY
|
private JGroups |
jgroups
JGroups component |
(package private) boolean |
needToSync
|
private java.util.Vector |
qinFromExt
Queue of messages provide from external agent. |
(package private) java.util.Vector |
requestor
|
Fields inherited from class fr.dyade.aaa.agent.Engine |
---|
agent, agentProfiling, agents, averageLoadTask, canStop, fixedAgentIdList, isRunning, logmon, mq, msg, NbMaxAgents, needToBeCommited, now, qin, recoveryPolicy, RP_EXC_NOT, RP_EXIT, rpStrings, thread, timeout |
Constructor Summary | |
---|---|
HAEngine()
|
Method Summary | |
---|---|
(package private) void |
abort(java.lang.Exception exc)
Abort the agent reaction in case of error during execution. |
(package private) void |
commit()
Commit the agent reaction in case of rigth termination: suppress the processed notification from message queue, then deletes it ; push all new notifications in qin and qout, and saves them ; saves the agent state ; then commit the transaction to validate all changes. |
(package private) void |
getState()
Get the current state of Engine: agents, messages, etc. |
(package private) java.lang.Object |
load(byte[] buf)
|
protected void |
onTimeOut()
|
void |
post(Message msg)
Adds a message in "ready to deliver" list. |
private void |
postFromExt()
If the internal queue is empty, moves the first message from external queue. |
(package private) void |
receiveFromJGroups(Message msg)
|
void |
restore()
Restores logical clock information from persistent storage. |
void |
save()
Saves logical clock information to persistent storage. |
void |
setJGroups(JGroups jgroups)
|
(package private) void |
setState(HAStateReply reply)
|
void |
validate()
Validates all messages pushed in queue during transaction session. |
Methods inherited from class fr.dyade.aaa.agent.Engine |
---|
addFixedAgentId, clean, createAgent, createAgent, delete, deleteAgent, dispatch, dumpAgent, dumpAgent, garbage, getAverageLoad1, getAverageLoad15, getAverageLoad5, getCommitTime, getDomainName, getLoadedAgentIdlist, getName, getNbAgents, getNbFixedAgents, getNbMaxAgents, getNbMessages, getNbReactions, getNbWaitingMessages, getQueue, getReactTime, getStamp, init, insert, isAgentProfiling, isRunning, load, newInstance, push, reload, removeFixedAgentId, run, setAgentProfiling, setNbMaxAgents, setStamp, stamp, start, stop, terminate, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private java.util.Vector qinFromExt
private JGroups jgroups
private static long DEFAULT_HA_TIMEOUT
private static java.lang.String HA_TIMEOUT_PROPERTY
volatile boolean needToSync
volatile java.util.Vector requestor
Constructor Detail |
---|
HAEngine() throws java.lang.Exception
java.lang.Exception
Method Detail |
---|
public void setJGroups(JGroups jgroups)
public void save() throws java.io.IOException
save
in interface MessageConsumer
save
in class Engine
java.io.IOException
public void restore() throws java.lang.Exception
restore
in interface MessageConsumer
restore
in class Engine
java.lang.Exception
public void post(Message msg) throws java.lang.Exception
post
in interface MessageConsumer
post
in class Engine
java.lang.Exception
private void postFromExt()
public void validate()
validate
in interface MessageConsumer
validate
in class Engine
void commit() throws java.lang.Exception
commit
in class Engine
java.lang.Exception
void abort(java.lang.Exception exc) throws java.lang.Exception
abort
in class Engine
java.lang.Exception
void receiveFromJGroups(Message msg) throws java.lang.Exception
java.lang.Exception
void getState() throws java.lang.Exception
java.lang.Exception
void setState(HAStateReply reply) throws java.lang.Exception
java.lang.Exception
java.lang.Object load(byte[] buf) throws java.lang.Exception
java.lang.Exception
protected void onTimeOut() throws java.lang.Exception
onTimeOut
in class Engine
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |