|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.proactive.core.body.ft.protocols.FTManager
Define all hook methods for the management of fault-tolerance.
Field Summary | |
protected java.lang.String |
additionalCodebase
|
static int |
DEFAULT_TTC_VALUE
This is the default value in ms of the checkpoint interval time |
static java.lang.String |
HALF_BODY_EXCEPTION_MESSAGE
Error message when calling uncallable method on a halfbody |
static int |
IMMEDIATE_SERVICE
Value returned by an object if the recieved message is served as an immediate service (@see xxx) |
protected LocationServer |
location
|
protected static org.apache.log4j.Logger |
logger
|
static int |
NON_FT
This value is sent by an active object that is not fault tolerant |
static int |
ORPHAN_REPLY
Value returned by an object if the received message is orphan |
protected AbstractBody |
owner
|
protected UniqueID |
ownerID
|
protected RecoveryProcess |
recovery
|
protected CheckpointServer |
storage
|
static long |
TIME_TO_RESEND
Time to wait between a send and a resend in ms |
protected int |
ttc
|
Constructor Summary | |
FTManager()
|
Method Summary | |
abstract int |
beforeRestartAfterRecovery(CheckpointInfo ci,
int inc)
This method is called before restarting an object which has been recovered from a checkpoint. |
UniversalBody |
communicationFailed(UniqueID suspect,
UniversalBody suspectLocation,
java.lang.Exception e)
Common behavior when a communication with another active object failed. |
static int |
getProtoSelector(java.lang.String protoName)
Return the selector value for a given protocol. |
abstract java.lang.Object |
handleFTMessage(FTMessage fte)
This method is called when a non fonctionnal fault-tolerance message is received |
java.lang.Object |
handleHBEvent(Heartbeat fte)
Heartbeat message. |
int |
init(AbstractBody owner)
Initialize the FTManager. |
boolean |
isACheckpoint()
Return true if the owner is a checkpoint, i.e. during checkpointing, and on recovery when the owner is deserialized. |
abstract int |
onDeliverReply(Reply reply)
This method is called after the future is updated by the reply. |
abstract int |
onDeliverRequest(Request request)
This method is called when a request is stored in the requestqueue |
abstract int |
onReceiveReply(Reply reply)
This method is called when a reply is received. |
abstract int |
onReceiveRequest(Request request)
This method is called when a request is received. |
abstract int |
onSendReplyAfter(Reply reply,
int rdvValue,
UniversalBody destination)
This method is called after the sending of a reply |
abstract int |
onSendReplyBefore(Reply reply)
This method is called before the sending of a reply |
abstract int |
onSendRequestAfter(Request request,
int rdvValue,
UniversalBody destination)
This method is called after the sending of a request |
abstract int |
onSendRequestBefore(Request request)
This method is called before the sending of a request |
abstract int |
onServeRequestAfter(Request request)
This method is called after the service of a request |
abstract int |
onServeRequestBefore(Request request)
This method is called before the service of a request |
int |
sendReply(Reply r,
UniversalBody destination)
Fault-tolerant sending: this send notices fault tolerance servers if the destination is unreachable and resent the message until destination is reachable. |
int |
sendRequest(Request r,
UniversalBody destination)
Fault-tolerant sending: this send notices fault tolerance servers if the destination is unreachable and resent the message until destination is reachable. |
void |
setCheckpointTag(boolean tag)
Set the current state of the owner as a checkpoint. |
void |
termination()
Unregister this activity from the fault-tolerance mechanism. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static org.apache.log4j.Logger logger
public static final int NON_FT
public static final int DEFAULT_TTC_VALUE
public static final int IMMEDIATE_SERVICE
public static final int ORPHAN_REPLY
public static final long TIME_TO_RESEND
public static final java.lang.String HALF_BODY_EXCEPTION_MESSAGE
protected AbstractBody owner
protected UniqueID ownerID
protected CheckpointServer storage
protected LocationServer location
protected RecoveryProcess recovery
protected java.lang.String additionalCodebase
protected int ttc
Constructor Detail |
public FTManager()
Method Detail |
public static int getProtoSelector(java.lang.String protoName)
protoName
- the name of the protocol (cic or pml).
public int init(AbstractBody owner) throws ProActiveException
owner
- The object linked to this FTManager
ProActiveException
- A problem occurs during the connection with the serverspublic void termination() throws ProActiveException
ProActiveException
public boolean isACheckpoint()
public void setCheckpointTag(boolean tag)
tag
- true during checkpointing, false otherwisepublic UniversalBody communicationFailed(UniqueID suspect, UniversalBody suspectLocation, java.lang.Exception e)
suspect
- the uniqueID of the calleesuspectLocation
- the supposed location of the calleee
- the exception raised during the communication
public int sendReply(Reply r, UniversalBody destination)
r
- the reply to senddestination
- the destination of the reply
public int sendRequest(Request r, UniversalBody destination) throws RenegotiateSessionException
r
- the request to senddestination
- the destination of the request
RenegotiateSessionException
public java.lang.Object handleHBEvent(Heartbeat fte)
fte
- heartbeat message.
public abstract int onReceiveReply(Reply reply)
reply
- the received replypublic abstract int onReceiveRequest(Request request)
request
- the received requestpublic abstract int onDeliverReply(Reply reply)
reply
- the reply that updates a futurepublic abstract int onDeliverRequest(Request request)
request
- the stored requestpublic abstract int onSendReplyBefore(Reply reply)
reply
- the reply that will be sentpublic abstract int onSendReplyAfter(Reply reply, int rdvValue, UniversalBody destination)
reply
- the sent replyrdvValue
- the value returned by the sendingdestination
- the destination body of reply
public abstract int onSendRequestBefore(Request request)
request
- the request that will be sent
public abstract int onSendRequestAfter(Request request, int rdvValue, UniversalBody destination) throws RenegotiateSessionException
request
- the sent requestrdvValue
- the value returned by the sendingdestination
- the destination body of request
RenegotiateSessionException
public abstract int onServeRequestBefore(Request request)
request
- the request that is served
public abstract int onServeRequestAfter(Request request)
request
- the request that has been served
public abstract int beforeRestartAfterRecovery(CheckpointInfo ci, int inc)
ci
- infos of the checkpoint used for recoveryinc
- incarantion number of this recovery
public abstract java.lang.Object handleFTMessage(FTMessage fte)
fte
- the received message
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |