public abstract class AbstractScheduledPoolConnectionMonitor<T,L> extends Object implements IConnectionMonitor<T,L>
Modifier and Type | Class and Description |
---|---|
class |
AbstractScheduledPoolConnectionMonitor.MonitorConnectedConnectionTask |
Modifier and Type | Field and Description |
---|---|
protected Logger |
_specificLogger |
boolean |
mayInterruptIfRunning |
Constructor and Description |
---|
AbstractScheduledPoolConnectionMonitor(String myLookupName,
int corePoolSize,
long monitorConnectedDelay,
long monitorDisconnectedDelay,
TimeUnit timeUnit) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected abstract Runnable |
createMonitorDisconnectedTask(AbstractProxyBasedReplicationMonitoredConnection<T,L> connection) |
String |
dumpState() |
protected String |
getLogPrefix() |
int |
getMonitoredCount() |
void |
monitor(AbstractProxyBasedReplicationMonitoredConnection<T,L> connection)
Adds a new connection to monitor
|
void |
stopMonitoring(AbstractProxyBasedReplicationMonitoredConnection<T,L> connection)
Stops monitoring the specified connection
|
void |
updateDisconnected(AbstractProxyBasedReplicationMonitoredConnection<T,L> 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
|
protected final Logger _specificLogger
public final boolean mayInterruptIfRunning
protected String getLogPrefix()
public void monitor(AbstractProxyBasedReplicationMonitoredConnection<T,L> connection)
IConnectionMonitor
monitor
in interface IConnectionMonitor<T,L>
connection
- connection to monitorprotected abstract Runnable createMonitorDisconnectedTask(AbstractProxyBasedReplicationMonitoredConnection<T,L> connection)
public void stopMonitoring(AbstractProxyBasedReplicationMonitoredConnection<T,L> connection)
IConnectionMonitor
stopMonitoring
in interface IConnectionMonitor<T,L>
connection
- that should be not be monitored anymorepublic void updateDisconnected(AbstractProxyBasedReplicationMonitoredConnection<T,L> connection, Exception reason)
IConnectionMonitor
updateDisconnected
in interface IConnectionMonitor<T,L>
connection
- connection that was disconnectedpublic int getMonitoredCount()
public void close()
close
in interface IConnectionMonitor<T,L>
public String dumpState()
dumpState
in interface IConnectionMonitor<T,L>
Copyright © GigaSpaces.