public class FailureDetectorConnectionMonitor extends Object implements IConnectionMonitor<IRemoteSpace,SpaceURL>, FaultDetectionListener
ClusterFailureDetector
based implementation of the IConnectionMonitor
interface. Used an internal pool to monitor dead connections and the ClusterFailureDetector to
detect live connections failureModifier and Type | Class and Description |
---|---|
class |
FailureDetectorConnectionMonitor.MonitorDisconnectedConnectionTask |
Constructor and Description |
---|
FailureDetectorConnectionMonitor(String myLookupName,
int corePoolSize,
long monitorDisconnectedDelay,
TimeUnit timeUnit,
ISpaceProxyProvider proxyProvider,
IFailureDetector failureDetector) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
String |
dumpState() |
int |
getMonitoredCount() |
void |
monitor(AbstractProxyBasedReplicationMonitoredConnection<IRemoteSpace,SpaceURL> connection)
Adds a new connection to monitor
|
void |
serviceFailure(Object service,
Object serviceID)
Notify the FaultDetectionListener that the service has failed
|
void |
stopMonitoring(AbstractProxyBasedReplicationMonitoredConnection<IRemoteSpace,SpaceURL> connection)
Stops monitoring the specified connection
|
void |
updateDisconnected(AbstractProxyBasedReplicationMonitoredConnection<IRemoteSpace,SpaceURL> connection,
Exception reason)
Update the monitor externally that the provided connection is disconnected Due to some call
dispatch on that proxy which throw a remote exception
|
public FailureDetectorConnectionMonitor(String myLookupName, int corePoolSize, long monitorDisconnectedDelay, TimeUnit timeUnit, ISpaceProxyProvider proxyProvider, IFailureDetector failureDetector)
public void monitor(AbstractProxyBasedReplicationMonitoredConnection<IRemoteSpace,SpaceURL> connection)
IConnectionMonitor
monitor
in interface IConnectionMonitor<IRemoteSpace,SpaceURL>
connection
- connection to monitorpublic void stopMonitoring(AbstractProxyBasedReplicationMonitoredConnection<IRemoteSpace,SpaceURL> connection)
IConnectionMonitor
stopMonitoring
in interface IConnectionMonitor<IRemoteSpace,SpaceURL>
connection
- that should be not be monitored anymorepublic void updateDisconnected(AbstractProxyBasedReplicationMonitoredConnection<IRemoteSpace,SpaceURL> connection, Exception reason)
IConnectionMonitor
updateDisconnected
in interface IConnectionMonitor<IRemoteSpace,SpaceURL>
connection
- connection that was disconnectedpublic int getMonitoredCount()
public void serviceFailure(Object service, Object serviceID)
FaultDetectionListener
serviceFailure
in interface FaultDetectionListener
service
- The service that has failedserviceID
- An Object representing a unique service identifier of the service that has
failedpublic void close()
close
in interface IConnectionMonitor<IRemoteSpace,SpaceURL>
public String dumpState()
dumpState
in interface IConnectionMonitor<IRemoteSpace,SpaceURL>
Copyright © GigaSpaces.