org.objectweb.proactive.core.body.ft.protocols
Class FTManager

java.lang.Object
  extended byorg.objectweb.proactive.core.body.ft.protocols.FTManager
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
FTManagerCIC, HalfFTManagerCIC

public abstract class FTManager
extends java.lang.Object
implements java.io.Serializable

Define all hook methods for the management of fault-tolerance.

Since:
ProActive 2.2
Author:
cdelbe
See Also:
Serialized Form

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 int IMMEDIATE_SERVICE
          Value returned by an object if the recieved message is served as an immediate service (@see xxx)
protected  LocationServer location
           
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
 AbstractBody owner
           
protected  RecoveryProcess recovery
           
protected  CheckpointServer storage
           
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.
abstract  int handleFTMessage(FTMessage fte)
          This method is called when a non fonctionnal fault-tolerance message is received
 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
abstract  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.
abstract  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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NON_FT

public static final int NON_FT
This value is sent by an active object that is not fault tolerant

See Also:
Constant Field Values

DEFAULT_TTC_VALUE

public static final int DEFAULT_TTC_VALUE
This is the default value in ms of the checkpoint interval time

See Also:
Constant Field Values

IMMEDIATE_SERVICE

public static final int IMMEDIATE_SERVICE
Value returned by an object if the recieved message is served as an immediate service (@see xxx)

See Also:
Constant Field Values

ORPHAN_REPLY

public static final int ORPHAN_REPLY
Value returned by an object if the received message is orphan

See Also:
Constant Field Values

owner

public AbstractBody owner

storage

protected CheckpointServer storage

location

protected LocationServer location

recovery

protected RecoveryProcess recovery

additionalCodebase

protected java.lang.String additionalCodebase

ttc

protected int ttc
Constructor Detail

FTManager

public FTManager()
Method Detail

init

public int init(AbstractBody owner)
         throws ProActiveException
Initialize the FTManager. This method establihes all needed connections with the servers. The owner object is registred in the location server (@see xxx).

Parameters:
owner - The object linked to this FTManager
Returns:
still not used
Throws:
ProActiveException - A problem occurs during the connection with the servers

isACheckpoint

public boolean isACheckpoint()
Return true if the owner is a checkpoint, i.e. during checkpointing, and on recovery when the owner is deserialized.

Returns:
true if the owner is a checkpoint, i.e. during checkpointing, and on recovery when the owner is deserialized, false ohterwise

setCheckpointTag

public void setCheckpointTag(boolean tag)
Set the current state of the owner as a checkpoint. Called during checkpoiting.

Parameters:
tag - true during checkpointing, false otherwise

onReceiveReply

public abstract int onReceiveReply(Reply reply)
This method is called when a reply is received.

Parameters:
reply - the received reply

onReceiveRequest

public abstract int onReceiveRequest(Request request)
This method is called when a request is received.

Parameters:
request - the received request

onDeliverReply

public abstract int onDeliverReply(Reply reply)
This method is called after the future is updated by the reply.

Parameters:
reply - the reply that updates a future

onDeliverRequest

public abstract int onDeliverRequest(Request request)
This method is called when a request is stored in the requestqueue

Parameters:
request - the stored request

onSendReplyBefore

public abstract int onSendReplyBefore(Reply reply)
This method is called before the sending of a reply

Parameters:
reply - the reply that will be sent

onSendReplyAfter

public abstract int onSendReplyAfter(Reply reply,
                                     int rdvValue,
                                     UniversalBody destination)
This method is called after the sending of a reply

Parameters:
reply - the sent reply
rdvValue - the value returned by the sending
destination - the destination body of reply
Returns:
depends on fault-tolerance protocol

onSendRequestBefore

public abstract int onSendRequestBefore(Request request)
This method is called before the sending of a request

Parameters:
request - the request that will be sent
Returns:
depends on fault-tolerance protocol

onSendRequestAfter

public abstract int onSendRequestAfter(Request request,
                                       int rdvValue,
                                       UniversalBody destination)
                                throws RenegotiateSessionException
This method is called after the sending of a request

Parameters:
request - the sent request
rdvValue - the value returned by the sending
destination - the destination body of request
Returns:
depends on fault-tolerance protocol
Throws:
RenegotiateSessionException

onServeRequestBefore

public abstract int onServeRequestBefore(Request request)
This method is called before the service of a request

Parameters:
request - the request that is served
Returns:
depends on fault-tolerance protocol

onServeRequestAfter

public abstract int onServeRequestAfter(Request request)
This method is called after the service of a request

Parameters:
request - the request that has been served
Returns:
depends on fault-tolerance protocol

beforeRestartAfterRecovery

public abstract int beforeRestartAfterRecovery(CheckpointInfo ci,
                                               int inc)
This method is called before restarting an object which has been recovered from a checkpoint.

Parameters:
ci - infos of the checkpoint used for recovery
inc - incarantion number of this recovery
Returns:
depends on fault-tolerance protocol

sendRequest

public abstract int sendRequest(Request r,
                                UniversalBody destination)
                         throws RenegotiateSessionException
Fault-tolerant sending: this send notices fault tolerance servers if the destination is unreachable and resent the message until destination is reachable.

Parameters:
r - the request to send
destination - the destination of the request
Returns:
the value returned by the sending
Throws:
RenegotiateSessionException

sendReply

public abstract 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.

Parameters:
r - the reply to send
destination - the destination of the reply
Returns:
the value returned by the sending

handleFTMessage

public abstract int handleFTMessage(FTMessage fte)
This method is called when a non fonctionnal fault-tolerance message is received

Parameters:
fte - the received message
Returns:
still not used


Copyright ? April 2005 INRIA All Rights Reserved.