org.ourgrid.corepeer
Class FakeFailureDetector
java.lang.Object
java.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
org.ourgrid.common.rmi.OurgridUnicastRemoteObject
org.ourgrid.common.fd.AbstractFailureDetector
org.ourgrid.corepeer.fd.CorePeerFailureDetector
org.ourgrid.corepeer.FakeFailureDetector
- All Implemented Interfaces:
- java.io.Serializable, java.rmi.Remote, Shutdownable, Monitor, Monitorable
public class FakeFailureDetector
- extends CorePeerFailureDetector
- See Also:
- Serialized Form
Fields inherited from class java.rmi.server.RemoteObject |
ref |
Method Summary |
java.util.Map<java.lang.String,MonitoringUnit> |
getMonitorables()
Retrieves a collection of monitorables |
void |
register(Notifiable notifiable,
java.lang.String monitorableAddress)
Adds an object interested in receiving Grid Machine state changes
notifications of the specified Grid Machine. |
void |
register(Notifiable notifiable,
java.lang.String monitorableAddress,
boolean imediatePing)
|
void |
startMonitoring()
The pingerTimerTask is initialized here because in certain
situations (e.g. |
void |
unregister(Notifiable notifiable)
Removes the object interested in receiving Grid Machine state changes
notifications of all monitorables interested list. |
void |
unregister(Notifiable notifiable,
java.lang.String monitorableAddress)
Removes the object interested in receiving Grid Machine state changes
notifications. |
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 |
FakeFailureDetector
public FakeFailureDetector(int queryFrequence)
throws java.rmi.RemoteException
- Throws:
java.rmi.RemoteException
register
public void register(Notifiable notifiable,
java.lang.String monitorableAddress)
throws java.rmi.RemoteException,
java.net.MalformedURLException
- Description copied from interface:
Monitor
- Adds an object interested in receiving Grid Machine state changes
notifications of the specified Grid Machine.
- Specified by:
register
in interface Monitor
- Overrides:
register
in class AbstractFailureDetector
- Parameters:
notifiable
- object interested in receiving the notificationsmonitorableAddress
- the address of the service (FailureDetector
..
Monitorable
) to monitor
- Throws:
java.rmi.RemoteException
- if anything wrong occurs in communication.
java.net.MalformedURLException
- If has something wrong with monitorable
URL.- See Also:
Monitor.register(org.ourgrid.common.fd.Notifiable,
String)
register
public void register(Notifiable notifiable,
java.lang.String monitorableAddress,
boolean imediatePing)
throws java.rmi.RemoteException,
java.net.MalformedURLException
- Overrides:
register
in class AbstractFailureDetector
- Throws:
java.rmi.RemoteException
java.net.MalformedURLException
unregister
public void unregister(Notifiable notifiable,
java.lang.String monitorableAddress)
throws java.rmi.RemoteException
- Description copied from interface:
Monitor
- Removes the object interested in receiving Grid Machine state changes
notifications.
- Specified by:
unregister
in interface Monitor
- Overrides:
unregister
in class AbstractFailureDetector
- Parameters:
notifiable
- the object to be removedmonitorableAddress
- the Monitorable
address that the
Notifiable
will not be interested.
- Throws:
java.rmi.RemoteException
- if anything wrong occurs in communication.- See Also:
Monitor.unregister(org.ourgrid.common.fd.Notifiable,
String)
unregister
public void unregister(Notifiable notifiable)
throws java.rmi.RemoteException
- Description copied from interface:
Monitor
- Removes the object interested in receiving Grid Machine state changes
notifications of all monitorables interested list.
- Specified by:
unregister
in interface Monitor
- Overrides:
unregister
in class AbstractFailureDetector
- Parameters:
notifiable
- the object to be removed
- Throws:
java.rmi.RemoteException
- if anything wrong occurs in communication.- See Also:
Monitor.unregister(org.ourgrid.common.fd.Notifiable)
startMonitoring
public void startMonitoring()
throws java.rmi.RemoteException
- Description copied from class:
AbstractFailureDetector
- The
pingerTimerTask
is initialized here because in certain
situations (e.g. Sensors) the monitoring will not occurs.
- Specified by:
startMonitoring
in interface Monitor
- Overrides:
startMonitoring
in class AbstractFailureDetector
- Throws:
java.rmi.RemoteException
- if anything wrong occurs in communication.- See Also:
Monitor.startMonitoring()
getMonitorables
public java.util.Map<java.lang.String,MonitoringUnit> getMonitorables()
throws java.rmi.RemoteException
- Description copied from interface:
Monitor
- Retrieves a collection of monitorables
- Specified by:
getMonitorables
in interface Monitor
- Overrides:
getMonitorables
in class AbstractFailureDetector
- Returns:
- The entities to be monitored
- Throws:
java.rmi.RemoteException
- If anything wrong occurs in communication.- See Also:
Monitor.getMonitorables()