org.objectweb.proactive.core.body.ft.protocols.pmlrb.managers
Class FTManagerPMLRB

java.lang.Object
  extended byorg.objectweb.proactive.core.body.ft.protocols.FTManager
      extended byorg.objectweb.proactive.core.body.ft.protocols.pmlrb.managers.FTManagerPMLRB
All Implemented Interfaces:
java.io.Serializable

public class FTManagerPMLRB
extends FTManager

This class defines the fault-tolerance manager for the Pessimistic Message Logging protocol, Receiver Based approach.

Since:
3.0
Author:
cdelbe
See Also:
Serialized Form

Field Summary
static int IGNORED_MSG
          Value returned if the message is ignored
static int INC_VALUE
          Incarantion is not used for PML.
protected static org.apache.log4j.Logger logger
           
 
Fields inherited from class org.objectweb.proactive.core.body.ft.protocols.FTManager
additionalCodebase, DEFAULT_TTC_VALUE, HALF_BODY_EXCEPTION_MESSAGE, IMMEDIATE_SERVICE, location, NON_FT, ORPHAN_REPLY, owner, ownerID, recovery, storage, TIME_TO_RESEND, ttc
 
Constructor Summary
FTManagerPMLRB()
           
 
Method Summary
 int beforeRestartAfterRecovery(CheckpointInfo ci, int inc)
          Message logs are contained in the checkpoint info structure.
 java.lang.Object handleFTMessage(FTMessage fte)
          This method is called when a non fonctionnal fault-tolerance message is received
 int init(AbstractBody owner)
          FTManager initialization.
 int onDeliverReply(Reply reply)
          Message must be synchronously logged before being delivered.
 int onDeliverRequest(Request request)
          Message must be synchronously logged before being delivered.
 int onReceiveReply(Reply reply)
          Message can be ignored if its index is l.t. lastestReceivedIndex[sender]
 int onReceiveRequest(Request request)
          Message can be ignored if its index is l.t. lastestReceivedIndex[sender]
 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
 
Methods inherited from class org.objectweb.proactive.core.body.ft.protocols.FTManager
communicationFailed, getProtoSelector, handleHBEvent, isACheckpoint, sendReply, sendRequest, setCheckpointTag, termination
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INC_VALUE

public static final int INC_VALUE
Incarantion is not used for PML. Set to a default value

See Also:
Constant Field Values

IGNORED_MSG

public static final int IGNORED_MSG
Value returned if the message is ignored

See Also:
Constant Field Values

logger

protected static org.apache.log4j.Logger logger
Constructor Detail

FTManagerPMLRB

public FTManagerPMLRB()
Method Detail

init

public int init(AbstractBody owner)
         throws ProActiveException
FTManager initialization.

Overrides:
init in class FTManager
Parameters:
owner - the attached body.
Returns:
still not used
Throws:
ProActiveException - A problem occurs during the connection with the servers

onReceiveReply

public int onReceiveReply(Reply reply)
Message can be ignored if its index is l.t. lastestReceivedIndex[sender]

Specified by:
onReceiveReply in class FTManager
Parameters:
reply - the received reply
See Also:
FTManager.onReceiveReply(org.objectweb.proactive.core.body.reply.Reply)

onReceiveRequest

public int onReceiveRequest(Request request)
Message can be ignored if its index is l.t. lastestReceivedIndex[sender]

Specified by:
onReceiveRequest in class FTManager
Parameters:
request - the received request
See Also:
FTManager.onReceiveRequest(org.objectweb.proactive.core.body.request.Request)

onDeliverReply

public int onDeliverReply(Reply reply)
Message must be synchronously logged before being delivered. The LatestRcvdIndex table is updated

Specified by:
onDeliverReply in class FTManager
Parameters:
reply - the reply that updates a future
See Also:
FTManager.onDeliverReply(org.objectweb.proactive.core.body.reply.Reply)

onDeliverRequest

public int onDeliverRequest(Request request)
Message must be synchronously logged before being delivered. The LatestRcvdIndex table is updated

Specified by:
onDeliverRequest in class FTManager
Parameters:
request - the stored request
See Also:
FTManager.onReceiveRequest(org.objectweb.proactive.core.body.request.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
See Also:
FTManager.onSendReplyBefore(org.objectweb.proactive.core.body.reply.Reply)

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
See Also:
FTManager.onSendReplyAfter(org.objectweb.proactive.core.body.reply.Reply, int, org.objectweb.proactive.core.body.UniversalBody)

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
See Also:
FTManager.onSendRequestBefore(org.objectweb.proactive.core.body.request.Request)

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
See Also:
FTManager.onSendRequestAfter(org.objectweb.proactive.core.body.request.Request, int, org.objectweb.proactive.core.body.UniversalBody)

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
See Also:
FTManager.onServeRequestBefore(org.objectweb.proactive.core.body.request.Request)

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
See Also:
FTManager.onServeRequestAfter(org.objectweb.proactive.core.body.request.Request)

beforeRestartAfterRecovery

public int beforeRestartAfterRecovery(CheckpointInfo ci,
                                      int inc)
Message logs are contained in the checkpoint info structure.

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

handleFTMessage

public java.lang.Object 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:
depend on the message meaning
See Also:
FTManager.handleFTMessage(org.objectweb.proactive.core.body.ft.internalmsg.FTMessage)


Copyright 2001-2005 INRIA All Rights Reserved.