public static synchronized void ensureRunning( DBClientConnManager manager, int idleTimeoutSeconds, int checkIntervalSeconds) { if (thread == null) { thread = new IdleConnectionCloserThread(manager, idleTimeoutSeconds, checkIntervalSeconds); thread.start(); } }
@Override public ClientConnectionRequest requestConnection(HttpRoute route, Object state) { IdleConnectionCloserThread.ensureRunning( this, KEEP_ALIVE_DURATION_SECS, KEEP_ALIVE_MONITOR_INTERVAL_SECS); return super.requestConnection(route, state); }