|
|||||||||||
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.util.GlobalFTServer
A Generic fault-tolerance Server. This class implements all ft.util.* interfaces. This server is an RMI object.
Field Summary | |
static int |
DEFAULT_FDETECT_SCAN_PERIOD
Period of the failure detector sanning (ms) |
static int |
DEFAULT_GC_PERIOD
Period of the checkpoints garbage collection (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.util.recovery.RecoveryProcess |
FAILED, RECOVERING, RUNNING |
Fields inherited from interface org.objectweb.proactive.core.body.ft.util.faultdetection.FaultDetector |
IS_DEAD, OK |
Constructor Summary | |
GlobalFTServer(int fdPeriod)
Create a new FTServer. |
Method Summary | |
void |
addFreeNode(Node n)
Add a new node usable for recovery. |
void |
addInfoToCheckpoint(CheckpointInfo ci,
UniqueID id,
int sequenceNumber,
int inc)
Add informations to an already stored checkpoint |
void |
broadcastFTEvent(FTMessage fte)
Broadcast the event fte to every activity registered in the Recovery process |
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 index)
Return a checkpoint of the object identified by id. |
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 |
UniqueID |
getOneID()
|
java.lang.String |
getServerCodebase()
Return the URL of the classServer linked to this checkpointServer. |
boolean |
isUnreachable(UniversalBody body)
The fault detector test the reachability of the active object body by sending a heartbeat message to body. |
void |
register(UniqueID id)
Register the calling OA. |
UniversalBody |
searchObject(UniqueID id,
UniversalBody oldLocation,
UniqueID caller)
Return the current location of object id. |
void |
startFailureDetector(LocationServer ls,
RecoveryProcess rp)
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 inc)
Store a checkpoint in the checkpoint server. |
void |
suspendFailureDetector()
Temporarily suspend the failure detector thread. |
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 |
public static final int DEFAULT_PORT
public static final int DEFAULT_FDETECT_SCAN_PERIOD
public static final int DEFAULT_GC_PERIOD
public static final java.lang.String DEFAULT_SERVER_NAME
protected static org.apache.log4j.Logger logger
Constructor Detail |
public GlobalFTServer(int fdPeriod) throws java.rmi.RemoteException
fdPeriod
- the period of fault detection
java.rmi.RemoteException
Method Detail |
public int storeCheckpoint(Checkpoint c, int inc)
CheckpointServer
storeCheckpoint
in interface CheckpointServer
c
- the checkpoint to storedinc
- incarnation number of the caller
public Checkpoint getCheckpoint(UniqueID id, int index)
CheckpointServer
getCheckpoint
in interface CheckpointServer
id
- the owner of the returned checkpointindex
- the index of the requiered checkpoint
public Checkpoint getLastCheckpoint(UniqueID id)
CheckpointServer
getLastCheckpoint
in interface CheckpointServer
id
- the owner of the returned checkpoint
public CheckpointInfo getInfoFromCheckpoint(UniqueID id, int sequenceNumber)
CheckpointServer
getInfoFromCheckpoint
in interface CheckpointServer
id
- owner of the considered checkpointsequenceNumber
- index of the considered checkpoint
public void addInfoToCheckpoint(CheckpointInfo ci, UniqueID id, int sequenceNumber, int inc) 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 checkpointinc
- incarnation number of the caller
java.rmi.RemoteException
public java.lang.String getServerCodebase()
CheckpointServer
getServerCodebase
in interface CheckpointServer
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
public java.util.ArrayList getAllLocations()
LocationServer
getAllLocations
in interface LocationServer
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
java.rmi.RemoteException
public void addFreeNode(Node n)
ResourceServer
addFreeNode
in interface ResourceServer
n
- the node to addpublic Node getFreeNode()
ResourceServer
getFreeNode
in interface ResourceServer
public void register(UniqueID id)
RecoveryProcess
register
in interface RecoveryProcess
id
- the registered body idpublic void failureDetected(UniqueID id) throws java.rmi.RemoteException
RecoveryProcess
failureDetected
in interface RecoveryProcess
id
- the id of the suspected OA
java.rmi.RemoteException
public void updateState(UniqueID id, int state) throws java.rmi.RemoteException
RecoveryProcess
updateState
in interface RecoveryProcess
id
- id of the OA to updatestate
- state of the active object
java.rmi.RemoteException
public void broadcastFTEvent(FTMessage fte) throws java.rmi.RemoteException
RecoveryProcess
broadcastFTEvent
in interface RecoveryProcess
fte
- the event to broadcast
java.rmi.RemoteException
public boolean isUnreachable(UniversalBody body) throws java.rmi.RemoteException
FaultDetector
isUnreachable
in interface FaultDetector
body
- the tested active object
java.rmi.RemoteException
public void startFailureDetector(LocationServer ls, RecoveryProcess rp) throws java.rmi.RemoteException
FaultDetector
startFailureDetector
in interface FaultDetector
ls
- the location server that localizes objects to testrp
- the recovery process to notice if a failure is detected
java.rmi.RemoteException
public void suspendFailureDetector() throws java.rmi.RemoteException
FaultDetector
suspendFailureDetector
in interface FaultDetector
java.rmi.RemoteException
public void stopFailureDetector() throws java.rmi.RemoteException
FaultDetector
stopFailureDetector
in interface FaultDetector
java.rmi.RemoteException
public void forceDetection()
FaultDetector
forceDetection
in interface FaultDetector
public UniqueID getOneID()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |