org.objectweb.proactive.core.body.ft.protocols.cic.servers
Class CheckpointServerCIC

java.lang.Object
  extended by org.objectweb.proactive.core.body.ft.servers.storage.CheckpointServerImpl
      extended by org.objectweb.proactive.core.body.ft.protocols.cic.servers.CheckpointServerCIC
All Implemented Interfaces:
java.rmi.Remote, CheckpointServer

public class CheckpointServerCIC
extends CheckpointServerImpl

This class define a checkpoint server for the CIC protocol.

Since:
2.2
Author:
cdelbe

Field Summary
static int DEFAULT_GC_PERIOD
          Period of the checkpoints garbage collection (ms)
protected static org.apache.log4j.Logger logger
           
 
Fields inherited from class org.objectweb.proactive.core.body.ft.servers.storage.CheckpointServerImpl
checkpointStorage, classServerHelper, codebase, server
 
Constructor Summary
CheckpointServerCIC(FTServer server)
           
 
Method Summary
 void addInfoToCheckpoint(CheckpointInfo ci, UniqueID id, int sequenceNumber, int incarnation)
          Add informations to an already stored checkpoint
 void commitHistory(HistoryUpdater rh)
          Add an history to a checkpoint.
 Checkpoint getCheckpoint(UniqueID id, int sequenceNumber)
          Return a checkpoint of the object identified by id.
 CheckpointInfo getInfoFromCheckpoint(UniqueID id, int sequenceNumber)
          Return informations on the given checkpoint
 Checkpoint getLastCheckpoint(UniqueID id)
          Return the latest checkpoint of the object identified by id
 void initialize()
          Reintialize the server.
protected  void internalRecover(UniqueID failed)
           
 void outputCommit(MessageInfo mi)
          The state of the system must be commited before the sent of the message linked to the messageInfo mi.
 int storeCheckpoint(Checkpoint c, int incarnation)
          Store a checkpoint in the checkpoint server.
 void storeReply(UniqueID receiverID, Reply reply)
          Not implemented for the CIC protocol
 void storeRequest(UniqueID receiverId, Request request)
          Not implemented for the CIC protocol
 
Methods inherited from class org.objectweb.proactive.core.body.ft.servers.storage.CheckpointServerImpl
getServerCodebase, getSize, getUsedMem
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_GC_PERIOD

public static final int DEFAULT_GC_PERIOD
Period of the checkpoints garbage collection (ms)

See Also:
Constant Field Values

logger

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

CheckpointServerCIC

public CheckpointServerCIC(FTServer server)
Method Detail

storeCheckpoint

public int storeCheckpoint(Checkpoint c,
                           int incarnation)
                    throws java.rmi.RemoteException
Description copied from interface: CheckpointServer
Store a checkpoint in the checkpoint server.

Parameters:
c - the checkpoint to stored
incarnation - incarnation number of the caller
Returns:
the last global state of the system, i.e. the index of the latest completed image of the system.
Throws:
java.rmi.RemoteException
See Also:
CheckpointServer.storeCheckpoint(org.objectweb.proactive.core.body.ft.checkpointing.Checkpoint, int)

getCheckpoint

public Checkpoint getCheckpoint(UniqueID id,
                                int sequenceNumber)
                         throws java.rmi.RemoteException
Description copied from interface: CheckpointServer
Return a checkpoint of the object identified by id.

Parameters:
id - the owner of the returned checkpoint
sequenceNumber - the index of the requiered checkpoint
Returns:
a checkpoint of the object identified by id
Throws:
java.rmi.RemoteException
See Also:
CheckpointServer.getCheckpoint(org.objectweb.proactive.core.UniqueID, int)

getLastCheckpoint

public Checkpoint getLastCheckpoint(UniqueID id)
                             throws java.rmi.RemoteException
Description copied from interface: CheckpointServer
Return the latest checkpoint of the object identified by id

Parameters:
id - the owner of the returned checkpoint
Returns:
the latest checkpoint of the object identified by id
Throws:
java.rmi.RemoteException
See Also:
CheckpointServer.getLastCheckpoint(org.objectweb.proactive.core.UniqueID)

addInfoToCheckpoint

public void addInfoToCheckpoint(CheckpointInfo ci,
                                UniqueID id,
                                int sequenceNumber,
                                int incarnation)
                         throws java.rmi.RemoteException
Description copied from interface: CheckpointServer
Add informations to an already stored checkpoint

Parameters:
ci - informations that have to be added
id - owner of the considered checkpoint
sequenceNumber - index of the considered checkpoint
incarnation - incarnation number of the caller
Throws:
java.rmi.RemoteException
See Also:
CheckpointServer.addInfoToCheckpoint(org.objectweb.proactive.core.body.ft.checkpointing.CheckpointInfo, org.objectweb.proactive.core.UniqueID, int, int)

commitHistory

public void commitHistory(HistoryUpdater rh)
                   throws java.rmi.RemoteException
Description copied from interface: CheckpointServer
Add an history to a checkpoint. Informations about the corresponding checkpoint are stored in the HistoryUpdater object.

Parameters:
rh - the history updater.
Throws:
java.rmi.RemoteException
See Also:
CheckpointServer.commitHistory(org.objectweb.proactive.core.body.ft.message.HistoryUpdater)

getInfoFromCheckpoint

public CheckpointInfo getInfoFromCheckpoint(UniqueID id,
                                            int sequenceNumber)
                                     throws java.rmi.RemoteException
Description copied from interface: CheckpointServer
Return informations on the given checkpoint

Parameters:
id - owner of the considered checkpoint
sequenceNumber - index of the considered checkpoint
Returns:
informations on the given checkpoint
Throws:
java.rmi.RemoteException
See Also:
CheckpointServer.getInfoFromCheckpoint(org.objectweb.proactive.core.UniqueID, int)

storeRequest

public void storeRequest(UniqueID receiverId,
                         Request request)
                  throws java.rmi.RemoteException
Not implemented for the CIC protocol

Parameters:
receiverId - the ID associated to the request.
request - the request to log.
Throws:
java.rmi.RemoteException - If communication with server fails.
See Also:
CheckpointServer.storeRequest(org.objectweb.proactive.core.UniqueID, org.objectweb.proactive.core.body.request.Request)

storeReply

public void storeReply(UniqueID receiverID,
                       Reply reply)
                throws java.rmi.RemoteException
Not implemented for the CIC protocol

Parameters:
receiverID - the ID associated to the reply.
reply - the reply to log.
Throws:
java.rmi.RemoteException - If communication with server fails.
See Also:
CheckpointServer.storeReply(org.objectweb.proactive.core.UniqueID, org.objectweb.proactive.core.body.reply.Reply)

internalRecover

protected void internalRecover(UniqueID failed)

outputCommit

public void outputCommit(MessageInfo mi)
                  throws java.rmi.RemoteException
Description copied from interface: CheckpointServer
The state of the system must be commited before the sent of the message linked to the messageInfo mi.

Parameters:
mi - the message information linked to the message that is sent to the outside world
Throws:
java.rmi.RemoteException
See Also:
CheckpointServer.outputCommit(org.objectweb.proactive.core.body.ft.message.MessageInfo)

initialize

public void initialize()
                throws java.rmi.RemoteException
Reintialize the server.

Specified by:
initialize in interface CheckpointServer
Overrides:
initialize in class CheckpointServerImpl
Throws:
java.rmi.RemoteException
See Also:
CheckpointServer.initialize()


Copyright 2001-2007 INRIA All Rights Reserved.