|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
org.objectweb.proactive.core.body.ft.servers.FTServer
This server contains one instance of each needed servers for fault tolerance, and delegates each method call to the concerned subserver.
Field Summary | |
static int |
DEFAULT_FDETECT_SCAN_PERIOD
Period of the failure detector sanning (ms) |
static int |
DEFAULT_PORT
Default server port |
static java.lang.String |
DEFAULT_SERVER_NAME
Default name of this server |
protected static org.apache.log4j.Logger |
logger
|
Fields inherited from class java.rmi.server.RemoteObject |
ref |
Fields inherited from interface org.objectweb.proactive.core.body.ft.servers.faultdetection.FaultDetector |
IS_DEAD, OK |
Fields inherited from interface org.objectweb.proactive.core.body.ft.servers.recovery.RecoveryProcess |
FAILED, RECOVERING, RUNNING |
Constructor Summary | |
FTServer()
|
Method Summary | |
void |
addFreeNode(Node n)
Add a new node usable for recovery. |
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. |
void |
failureDetected(UniqueID id)
Notify the recovery process that the body passed in paramater is suspected to be failed. |
void |
forceDetection()
Force a failure detection even if the failure detector thread is waiting. |
java.util.ArrayList |
getAllLocations()
Return the list of locations of all registered bodies. |
Checkpoint |
getCheckpoint(UniqueID id,
int sequenceNumber)
Return a checkpoint of the object identified by id. |
CheckpointServer |
getCheckpointServer()
|
FaultDetector |
getFaultDetector()
|
Node |
getFreeNode()
Return the next available node for recovery |
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 |
UniversalBody |
getLocation(UniqueID id)
Return the current known location of a registred body. |
LocationServer |
getLocationServer()
|
RecoveryProcess |
getRecoveryProcess()
|
ResourceServer |
getResourceServer()
|
java.lang.String |
getServerCodebase()
Return the URL of the classServer linked to this checkpointServer. |
int |
getSystemSize()
Return the size of the system, i.e. the number of registred bodies. |
void |
init(FaultDetector fd,
LocationServer ls,
RecoveryProcess rp,
ResourceServer rs,
CheckpointServer cs)
Initialized server with each needed subservers |
void |
initialize()
Reinit the state of the fault detector |
boolean |
isUnreachable(UniversalBody body)
The fault detector test the reachability of the active object body by sending a heartbeat message to body. |
void |
outputCommit(MessageInfo mi)
The state of the system must be commited before the sent of the message linked to the messageInfo mi. |
void |
register(UniqueID id)
Register the calling AO. |
UniversalBody |
searchObject(UniqueID id,
UniversalBody oldLocation,
UniqueID caller)
Return the current location of object id. |
void |
setCheckpointServer(CheckpointServer checkpointServer)
|
void |
setFaultDetector(FaultDetector faultDetector)
|
void |
setLocationServer(LocationServer locationServer)
|
void |
setRecoveryProcess(RecoveryProcess recoveryProcess)
|
void |
setResourceServer(ResourceServer resourceServer)
|
void |
startFailureDetector()
Start the tread that periodically test the reachability of objects that are registred in the location server ls. |
void |
stopFailureDetector()
Stop the the failure detector thread. |
int |
storeCheckpoint(Checkpoint c,
int incarnation)
Store a checkpoint in the checkpoint server. |
void |
storeReply(UniqueID receiverID,
Reply reply)
The reply passed in paramter must be synchronously logged on the server. |
void |
storeRequest(UniqueID receiverId,
Request request)
The request passed in paramter must be synchronously logged on the server. |
void |
submitJob(ActiveQueueJob job)
to submit a job to recovery process |
JobBarrier |
submitJobWithBarrier(ActiveQueueJob job)
to submit a job to recovery process, with a barrier for waiting its completion |
void |
suspendFailureDetector()
Temporarily suspend the failure detector thread. |
void |
unregister(UniqueID id)
Unregister the AO identified by id. |
void |
updateLocation(UniqueID id,
UniversalBody newLocation)
Set the new location of the active object identified by id. |
void |
updateState(UniqueID id,
int state)
Update the current state of the active object id. |
Methods inherited from class java.rmi.server.UnicastRemoteObject |
clone, exportObject, exportObject, exportObject, unexportObject |
Methods inherited from class java.rmi.server.RemoteServer |
getClientHost, getLog, setLog |
Methods inherited from class java.rmi.server.RemoteObject |
equals, getRef, hashCode, toString, toStub |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
protected static org.apache.log4j.Logger logger
public static final int DEFAULT_PORT
public static final int DEFAULT_FDETECT_SCAN_PERIOD
public static final java.lang.String DEFAULT_SERVER_NAME
Constructor Detail |
public FTServer() throws java.rmi.RemoteException
java.rmi.RemoteException
Method Detail |
public void init(FaultDetector fd, LocationServer ls, RecoveryProcess rp, ResourceServer rs, CheckpointServer cs)
public boolean isUnreachable(UniversalBody body) throws java.rmi.RemoteException
FaultDetector
isUnreachable
in interface FaultDetector
body
- the tested active object
java.rmi.RemoteException
FaultDetector.isUnreachable(org.objectweb.proactive.core.body.UniversalBody)
public void startFailureDetector() throws java.rmi.RemoteException
FaultDetector
startFailureDetector
in interface FaultDetector
java.rmi.RemoteException
FaultDetector.startFailureDetector()
public void suspendFailureDetector() throws java.rmi.RemoteException
FaultDetector
suspendFailureDetector
in interface FaultDetector
java.rmi.RemoteException
FaultDetector.suspendFailureDetector()
public void stopFailureDetector() throws java.rmi.RemoteException
FaultDetector
stopFailureDetector
in interface FaultDetector
java.rmi.RemoteException
FaultDetector.stopFailureDetector()
public void forceDetection() throws java.rmi.RemoteException
FaultDetector
forceDetection
in interface FaultDetector
java.rmi.RemoteException
FaultDetector.forceDetection()
public UniversalBody searchObject(UniqueID id, UniversalBody oldLocation, UniqueID caller) throws java.rmi.RemoteException
LocationServer
searchObject
in interface LocationServer
id
- Unique id of the searched objectoldLocation
- last known location of the searched object
java.rmi.RemoteException
LocationServer.searchObject(org.objectweb.proactive.core.UniqueID, org.objectweb.proactive.core.body.UniversalBody, org.objectweb.proactive.core.UniqueID)
public void updateLocation(UniqueID id, UniversalBody newLocation) throws java.rmi.RemoteException
LocationServer
updateLocation
in interface LocationServer
id
- id of the callernewLocation
- new location of the caller. If this location is null,
the body id is removed from the location table.
java.rmi.RemoteException
LocationServer.updateLocation(org.objectweb.proactive.core.UniqueID, org.objectweb.proactive.core.body.UniversalBody)
public java.util.ArrayList getAllLocations() throws java.rmi.RemoteException
LocationServer
getAllLocations
in interface LocationServer
java.rmi.RemoteException
LocationServer.getAllLocations()
public UniversalBody getLocation(UniqueID id) throws java.rmi.RemoteException
LocationServer
getLocation
in interface LocationServer
java.rmi.RemoteException
LocationServer.getLocation(org.objectweb.proactive.core.UniqueID)
public void register(UniqueID id) throws java.rmi.RemoteException
RecoveryProcess
register
in interface RecoveryProcess
id
- the registered body id
java.rmi.RemoteException
RecoveryProcess.register(org.objectweb.proactive.core.UniqueID)
public void unregister(UniqueID id) throws java.rmi.RemoteException
RecoveryProcess
unregister
in interface RecoveryProcess
id
- the unregistered body id
java.rmi.RemoteException
RecoveryProcess.unregister(org.objectweb.proactive.core.UniqueID)
public void failureDetected(UniqueID id) throws java.rmi.RemoteException
RecoveryProcess
failureDetected
in interface RecoveryProcess
id
- the id of the suspected AO
java.rmi.RemoteException
RecoveryProcess.failureDetected(org.objectweb.proactive.core.UniqueID)
public void updateState(UniqueID id, int state) throws java.rmi.RemoteException
RecoveryProcess
updateState
in interface RecoveryProcess
id
- id of the AO to updatestate
- state of the active object
java.rmi.RemoteException
RecoveryProcess.updateState(org.objectweb.proactive.core.UniqueID, int)
public int getSystemSize() throws java.rmi.RemoteException
RecoveryProcess
getSystemSize
in interface RecoveryProcess
java.rmi.RemoteException
RecoveryProcess.getSystemSize()
public void submitJob(ActiveQueueJob job) throws java.rmi.RemoteException
RecoveryProcess
submitJob
in interface RecoveryProcess
job
- the job to submit
java.rmi.RemoteException
RecoveryProcess.submitJob(org.objectweb.proactive.core.body.ft.servers.util.ActiveQueueJob)
public JobBarrier submitJobWithBarrier(ActiveQueueJob job) throws java.rmi.RemoteException
RecoveryProcess
submitJobWithBarrier
in interface RecoveryProcess
job
- the job to submit
java.rmi.RemoteException
RecoveryProcess.submitJobWithBarrier(org.objectweb.proactive.core.body.ft.servers.util.ActiveQueueJob)
public void addFreeNode(Node n) throws java.rmi.RemoteException
ResourceServer
addFreeNode
in interface ResourceServer
n
- the node to add
java.rmi.RemoteException
ResourceServer.addFreeNode(org.objectweb.proactive.core.node.Node)
public Node getFreeNode() throws java.rmi.RemoteException
ResourceServer
getFreeNode
in interface ResourceServer
java.rmi.RemoteException
ResourceServer.getFreeNode()
public int storeCheckpoint(Checkpoint c, int incarnation) throws java.rmi.RemoteException
CheckpointServer
storeCheckpoint
in interface CheckpointServer
c
- the checkpoint to storedincarnation
- incarnation number of the caller
java.rmi.RemoteException
CheckpointServer.storeCheckpoint(org.objectweb.proactive.core.body.ft.checkpointing.Checkpoint, int)
public Checkpoint getCheckpoint(UniqueID id, int sequenceNumber) throws java.rmi.RemoteException
CheckpointServer
getCheckpoint
in interface CheckpointServer
id
- the owner of the returned checkpointsequenceNumber
- the index of the requiered checkpoint
java.rmi.RemoteException
CheckpointServer.getCheckpoint(org.objectweb.proactive.core.UniqueID, int)
public Checkpoint getLastCheckpoint(UniqueID id) throws java.rmi.RemoteException
CheckpointServer
getLastCheckpoint
in interface CheckpointServer
id
- the owner of the returned checkpoint
java.rmi.RemoteException
CheckpointServer.getLastCheckpoint(org.objectweb.proactive.core.UniqueID)
public void addInfoToCheckpoint(CheckpointInfo ci, UniqueID id, int sequenceNumber, int incarnation) throws java.rmi.RemoteException
CheckpointServer
addInfoToCheckpoint
in interface CheckpointServer
ci
- informations that have to be addedid
- owner of the considered checkpointsequenceNumber
- index of the considered checkpointincarnation
- incarnation number of the caller
java.rmi.RemoteException
CheckpointServer.addInfoToCheckpoint(org.objectweb.proactive.core.body.ft.checkpointing.CheckpointInfo, org.objectweb.proactive.core.UniqueID, int, int)
public CheckpointInfo getInfoFromCheckpoint(UniqueID id, int sequenceNumber) throws java.rmi.RemoteException
CheckpointServer
getInfoFromCheckpoint
in interface CheckpointServer
id
- owner of the considered checkpointsequenceNumber
- index of the considered checkpoint
java.rmi.RemoteException
CheckpointServer.getInfoFromCheckpoint(org.objectweb.proactive.core.UniqueID, int)
public void commitHistory(HistoryUpdater rh) throws java.rmi.RemoteException
CheckpointServer
commitHistory
in interface CheckpointServer
rh
- the history updater.
java.rmi.RemoteException
CheckpointServer.commitHistory(org.objectweb.proactive.core.body.ft.message.HistoryUpdater)
public void outputCommit(MessageInfo mi) throws java.rmi.RemoteException
CheckpointServer
outputCommit
in interface CheckpointServer
mi
- the message information linked to the message that is sent to the outside world
java.rmi.RemoteException
CheckpointServer.outputCommit(org.objectweb.proactive.core.body.ft.message.MessageInfo)
public java.lang.String getServerCodebase() throws java.rmi.RemoteException
CheckpointServer
getServerCodebase
in interface CheckpointServer
java.rmi.RemoteException
CheckpointServer.getServerCodebase()
public void storeRequest(UniqueID receiverId, Request request) throws java.rmi.RemoteException
CheckpointServer
storeRequest
in interface CheckpointServer
receiverId
- the ID associated to the request.request
- the request to log.
java.rmi.RemoteException
- If communication with server fails.CheckpointServer.storeRequest(org.objectweb.proactive.core.UniqueID, org.objectweb.proactive.core.body.request.Request)
public void storeReply(UniqueID receiverID, Reply reply) throws java.rmi.RemoteException
CheckpointServer
storeReply
in interface CheckpointServer
receiverID
- the ID associated to the reply.reply
- the reply to log.
java.rmi.RemoteException
- If communication with server fails.CheckpointServer.storeReply(org.objectweb.proactive.core.UniqueID, org.objectweb.proactive.core.body.reply.Reply)
public CheckpointServer getCheckpointServer()
public void setCheckpointServer(CheckpointServer checkpointServer)
checkpointServer
- The checkpointServer to set.public FaultDetector getFaultDetector()
public void setFaultDetector(FaultDetector faultDetector)
faultDetector
- The faultDetector to set.public LocationServer getLocationServer()
public void setLocationServer(LocationServer locationServer)
locationServer
- The locationServer to set.public RecoveryProcess getRecoveryProcess()
public void setRecoveryProcess(RecoveryProcess recoveryProcess)
recoveryProcess
- The recoveryProcess to set.public ResourceServer getResourceServer()
public void setResourceServer(ResourceServer resourceServer)
resourceServer
- The resourceServer to set.public void initialize() throws java.rmi.RemoteException
FaultDetector
initialize
in interface FaultDetector
java.rmi.RemoteException
LocationServer.initialize()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |