List of usage examples for org.apache.http.impl.conn.tsccm BasicPoolEntry getExpiry
public long getExpiry()
From source file:org.apache.http.impl.conn.tsccm.ConnPoolByRoute.java
@Override public void closeExpiredConnections() { log.debug("Closing expired connections"); final long now = System.currentTimeMillis(); poolLock.lock();//from w ww. j a va2 s . co m try { final Iterator<BasicPoolEntry> iter = freeConnections.iterator(); while (iter.hasNext()) { final BasicPoolEntry entry = iter.next(); if (entry.isExpired(now)) { if (log.isDebugEnabled()) { log.debug("Closing connection expired @ " + new Date(entry.getExpiry())); } iter.remove(); deleteEntry(entry); } } } finally { poolLock.unlock(); } }