com.alipay.remoting
Class ScheduledDisconnectStrategy

java.lang.Object
  extended by 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.

  • Constructor Summary
    ScheduledDisconnectStrategy()
               
     
    Method Summary
     Map<String,List<Connection>> filter(List<Connection> connections)
              Filter connections to monitor
     void monitor(Map<String,RunStateRecordedFutureTask<ConnectionPool>> connPools)
              Monitor connections and close connections with status is off
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Constructor Detail

    ScheduledDisconnectStrategy

    public ScheduledDisconnectStrategy()
    Method Detail

    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.