/** * Registers the given connection manager with this reaper; * * @param connectionManager Connection manager to register * @param maxIdleInMs Max idle connection timeout in milliseconds for this connection manager. * @return true if the connection manager has been successfully registered; false otherwise. */ public static boolean registerConnectionManager(HttpClientConnectionManager connectionManager, long maxIdleInMs) { if (instance == null) { synchronized (IdleConnectionReaper.class) { if (instance == null) { instance = new IdleConnectionReaper(); instance.start(); } } } return connectionManagers.put(connectionManager, maxIdleInMs) == null; }
/** * Registers the given connection manager with this reaper; * @param connectionManager the connection manager. * @return true if the connection manager has been successfully registered; * false otherwise. */ public static synchronized boolean registerConnectionManager( ClientConnectionManager connectionManager) { if (instance == null) { instance = new IdleConnectionReaper(); instance.start(); } return CONNECTION_MANAGERS.add(connectionManager); }
/** * Registers the given connection manager with this reaper; * * @param connectionManager Connection manager to register * @param maxIdleInMs Max idle connection timeout in milliseconds for this connection manager. * @return true if the connection manager has been successfully registered; false otherwise. */ public static boolean registerConnectionManager(HttpClientConnectionManager connectionManager, long maxIdleInMs) { if (instance == null) { synchronized (IdleConnectionReaper.class) { if (instance == null) { instance = new IdleConnectionReaper(); instance.start(); } } } return connectionManagers.put(connectionManager, maxIdleInMs) == null; }
/** * Registers the given connection manager with this reaper; * @param connectionManager the connection manager. * @return true if the connection manager has been successfully registered; * false otherwise. */ public static synchronized boolean registerConnectionManager( ClientConnectionManager connectionManager) { if (instance == null) { instance = new IdleConnectionReaper(); instance.start(); } return CONNECTION_MANAGERS.add(connectionManager); }
/** * Registers the given connection manager with this reaper; * @param connectionManager the connection manager. * @return true if the connection manager has been successfully registered; * false otherwise. */ public static synchronized boolean registerConnectionManager( ClientConnectionManager connectionManager) { if (instance == null) { instance = new IdleConnectionReaper(); instance.start(); } return CONNECTION_MANAGERS.add(connectionManager); }
/** * Registers the given connection manager with this reaper; * * @param connectionManager Connection manager to register * @param maxIdleInMs Max idle connection timeout in milliseconds for this connection manager. * @return true if the connection manager has been successfully registered; false otherwise. */ public static boolean registerConnectionManager(HttpClientConnectionManager connectionManager, long maxIdleInMs) { if (instance == null) { synchronized (IdleConnectionReaper.class) { if (instance == null) { instance = new IdleConnectionReaper(); instance.start(); } } } return connectionManagers.put(connectionManager, maxIdleInMs) == null; }