admin 管理员组

文章数量: 887021


2023年12月17日发(作者:为什么eclipse运行不出结果)

public void run() { try { while (!tThread().isInterrupted()) { //休眠sleepTimeMs时间 (sleepTimeMs); //清除过期的连接 xpiredConnections(); if (maxIdleTimeMs > 0) { //清除闲置过久的连接 dleConnections(maxIdleTimeMs, ECONDS); } } } catch (final Exception ex) { exception = ex; }}//关闭过期的连接 @Override public void closeExpiredConnections() { ("Closing expired connections"); xpired(); }

public void closeExpired() { final long now = tTimeMillis(); enumAvailable(new PoolEntryCallback() { @Override public void process(final PoolEntry entry) { if (red(now)) { (); } } }); }//关闭闲置太久的连接

@Override public void closeIdleConnections(final long idleTimeout, final TimeUnit tunit) { if (gEnabled()) { ("Closing connections idle longer than " + idleTimeout + " " + tunit); } dle(idleTimeout, tunit); } public void closeIdle(final long idletime, final TimeUnit tunit) { l(tunit, "Time unit"); long time = is(idletime); if (time < 0) { time = 0; } final long deadline = tTimeMillis() - time; enumAvailable(new PoolEntryCallback() { @Override public void process(final PoolEntry entry) { if (ated() <= deadline) { (); } } }); }


本文标签: 运行 连接 闲置 时间 休眠