org.objectweb.proactive.core.body.ft.protocols.cic
Class FTManagerCIC

java.lang.Object
  extended byorg.objectweb.proactive.core.body.ft.protocols.FTManager
      extended byorg.objectweb.proactive.core.body.ft.protocols.cic.FTManagerCIC
All Implemented Interfaces:
java.io.Serializable

public class FTManagerCIC
extends FTManager

This class implements a Communication Induced Checkpointing protocol for ProActive. This FTManager is linked to each fault-tolerant active object.

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

Field Summary
protected static short CKPT_INDEX
           
protected static short FROM_HALF_BODY
           
protected static short HISTO_INDEX
           
protected static short INCARNATION
           
protected static short INFOS_SIZE
           
protected static short IS_ACTIVE
           
protected static short IS_HALF
           
protected static short IS_ORPHAN_FOR
           
protected static short LAST_REC
           
protected static org.apache.log4j.Logger logger
           
static int RECOVER
          Value returned by an object if the sender of the received message must recover asap
static int RESEND_MESSAGE
          Value returned by an object if the recieved message must be send again
static long TIME_TO_RESEND
          Time to wait between a send and a resend in ms
 
Fields inherited from class org.objectweb.proactive.core.body.ft.protocols.FTManager
additionalCodebase, DEFAULT_TTC_VALUE, IMMEDIATE_SERVICE, location, NON_FT, ORPHAN_REPLY, owner, recovery, storage, ttc
 
Constructor Summary
FTManagerCIC()
           
 
Method Summary
 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)
           
 int handleFTMessage(FTMessage fte)
          This method is called when a non fonctionnal fault-tolerance message is received
 int HandleHBEvent(Heartbeat fte)
          Heartbeat message.
 int HandlingGSCEEvent(GlobalStateCompletion fte)
          Closing history.
 int init(AbstractBody owner)
          Initialize the FTManager.
 int onDeliverReply(Reply reply)
          This method is called after the future is updated by the reply.
 int onDeliverRequest(Request request)
          This method is called when a request is stored in the requestqueue
 int onReceiveReply(Reply reply)
          This method is called when a reply is received.
 int onReceiveRequest(Request request)
          This method is called when a request is received.
 int onSendReplyAfter(Reply reply, int rdvValue, UniversalBody destination)
          This method is called after the sending of a reply
 int onSendReplyBefore(Reply reply)
          This method is called before the sending of a reply
 int onSendRequestAfter(Request request, int rdvValue, UniversalBody destination)
          This method is called after the sending of a request
 int onSendRequestBefore(Request request)
          This method is called before the sending of a request
 int onServeRequestAfter(Request request)
          This method is called after the service of a request
 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.
 java.lang.String toString()
           
 
Methods inherited from class org.objectweb.proactive.core.body.ft.protocols.FTManager
isACheckpoint, setCheckpointTag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TIME_TO_RESEND

public static final long TIME_TO_RESEND
Time to wait between a send and a resend in ms

See Also:
Constant Field Values

RESEND_MESSAGE

public static final int RESEND_MESSAGE
Value returned by an object if the recieved message must be send again

See Also:
Constant Field Values

RECOVER

public static final int RECOVER
Value returned by an object if the sender of the received message must recover asap

See Also:
Constant Field Values

logger

protected static org.apache.log4j.Logger logger

INFOS_SIZE

protected static final short INFOS_SIZE
See Also:
Constant Field Values

CKPT_INDEX

protected static final short CKPT_INDEX
See Also:
Constant Field Values

HISTO_INDEX

protected static final short HISTO_INDEX
See Also:
Constant Field Values

INCARNATION

protected static final short INCARNATION
See Also:
Constant Field Values

LAST_REC

protected static final short LAST_REC
See Also:
Constant Field Values

IS_ORPHAN_FOR

protected static final short IS_ORPHAN_FOR
See Also:
Constant Field Values

FROM_HALF_BODY

protected static final short FROM_HALF_BODY
See Also:
Constant Field Values

IS_HALF

protected static final short IS_HALF
See Also:
Constant Field Values

IS_ACTIVE

protected static final short IS_ACTIVE
See Also:
Constant Field Values
Constructor Detail

FTManagerCIC

public FTManagerCIC()
Method Detail

init

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

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

onReceiveReply

public int onReceiveReply(Reply reply)
Description copied from class: FTManager
This method is called when a reply is received.

Specified by:
onReceiveReply in class FTManager
Parameters:
reply - the received reply

onDeliverReply

public int onDeliverReply(Reply reply)
Description copied from class: FTManager
This method is called after the future is updated by the reply.

Specified by:
onDeliverReply in class FTManager
Parameters:
reply - the reply that updates a future

onReceiveRequest

public int onReceiveRequest(Request request)
Description copied from class: FTManager
This method is called when a request is received.

Specified by:
onReceiveRequest in class FTManager
Parameters:
request - the received request

onDeliverRequest

public int onDeliverRequest(Request request)
Description copied from class: FTManager
This method is called when a request is stored in the requestqueue

Specified by:
onDeliverRequest in class FTManager
Parameters:
request - the stored request

onSendReplyBefore

public int onSendReplyBefore(Reply reply)
Description copied from class: FTManager
This method is called before the sending of a reply

Specified by:
onSendReplyBefore in class FTManager
Parameters:
reply - the reply that will be sent

onSendReplyAfter

public int onSendReplyAfter(Reply reply,
                            int rdvValue,
                            UniversalBody destination)
Description copied from class: FTManager
This method is called after the sending of a reply

Specified by:
onSendReplyAfter in class FTManager
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 int onSendRequestBefore(Request request)
Description copied from class: FTManager
This method is called before the sending of a request

Specified by:
onSendRequestBefore in class FTManager
Parameters:
request - the request that will be sent
Returns:
depends on fault-tolerance protocol

onSendRequestAfter

public int onSendRequestAfter(Request request,
                              int rdvValue,
                              UniversalBody destination)
                       throws RenegotiateSessionException
Description copied from class: FTManager
This method is called after the sending of a request

Specified by:
onSendRequestAfter in class FTManager
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 int onServeRequestBefore(Request request)
Description copied from class: FTManager
This method is called before the service of a request

Specified by:
onServeRequestBefore in class FTManager
Parameters:
request - the request that is served
Returns:
depends on fault-tolerance protocol

onServeRequestAfter

public int onServeRequestAfter(Request request)
Description copied from class: FTManager
This method is called after the service of a request

Specified by:
onServeRequestAfter in class FTManager
Parameters:
request - the request that has been served
Returns:
depends on fault-tolerance protocol

beforeRestartAfterRecovery

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

Specified by:
beforeRestartAfterRecovery in class FTManager
Parameters:
ci - infos of the checkpoint used for recovery
inc - incarantion number of this recovery
Returns:
depends on fault-tolerance protocol

sendReply

public int sendReply(Reply r,
                     UniversalBody destination)
Description copied from class: FTManager
Fault-tolerant sending: this send notices fault tolerance servers if the destination is unreachable and resent the message until destination is reachable.

Specified by:
sendReply in class FTManager
Parameters:
r - the reply to send
destination - the destination of the reply
Returns:
the value returned by the sending

sendRequest

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

Specified by:
sendRequest in class FTManager
Parameters:
r - the request to send
destination - the destination of the request
Returns:
the value returned by the sending
Throws:
RenegotiateSessionException

toString

public java.lang.String toString()

communicationFailed

public UniversalBody communicationFailed(UniqueID suspect,
                                         UniversalBody suspectLocation,
                                         java.lang.Exception e)

handleFTMessage

public int handleFTMessage(FTMessage fte)
Description copied from class: FTManager
This method is called when a non fonctionnal fault-tolerance message is received

Specified by:
handleFTMessage in class FTManager
Parameters:
fte - the received message
Returns:
still not used

HandlingGSCEEvent

public int HandlingGSCEEvent(GlobalStateCompletion fte)
Closing history.

Parameters:
fte - Message that contains the last complete global state
Returns:
index of the last closed history

HandleHBEvent

public int HandleHBEvent(Heartbeat fte)
Heartbeat message. Send state value to the fault detector.

Parameters:
fte - heartbeat message.
Returns:
FaultDetector.OK if active object is alive, FaultDetector.IS_DEAD otherwise.


Copyright ? April 2005 INRIA All Rights Reserved.