com.alipay.remoting
Class ScheduledDisconnectStrategy
java.lang.Object
com.alipay.remoting.ScheduledDisconnectStrategy
- All Implemented Interfaces:
- ConnectionMonitorStrategy
public class ScheduledDisconnectStrategy
- extends Object
- implements ConnectionMonitorStrategy
An implemented strategy to monitor connections:
each time scheduled, filter connections with Configs.CONN_SERVICE_STATUS_OFF at first.
then close connections.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ScheduledDisconnectStrategy
public ScheduledDisconnectStrategy()
filter
public Map<String,List<Connection>> filter(List<Connection> connections)
- Filter connections to monitor
- Specified by:
filter in interface ConnectionMonitorStrategy
- Parameters:
connections -
monitor
public void monitor(Map<String,RunStateRecordedFutureTask<ConnectionPool>> connPools)
- Monitor connections and close connections with status is off
- Specified by:
monitor in interface ConnectionMonitorStrategy
- Parameters:
connPools -
Copyright © 2018. All rights reserved.