Methods Summary |
---|
private void | internalRegisterPool(InternalManagedConnectionPool mcp, long interval)
synchronized (pools)
{
pools.add(mcp);
if (interval > 1 && interval/2 < this.interval)
{
this.interval = interval/2;
long maybeNext = System.currentTimeMillis() + this.interval;
if (next > maybeNext && maybeNext > 0)
{
next = maybeNext;
log.debug("internalRegisterPool: about to notify thread: old next: " + next + ", new next: " + maybeNext);
pools.notify();
}
}
}
|
private void | internalUnregisterPool(InternalManagedConnectionPool mcp)
synchronized (pools)
{
pools.remove(mcp);
if (pools.size() == 0)
{
log.debug("internalUnregisterPool: setting interval to Long.MAX_VALUE");
interval = Long.MAX_VALUE;
}
}
|
public static void | registerPool(InternalManagedConnectionPool mcp, long interval)
validator.internalRegisterPool(mcp, interval);
|
private void | setupContextClassLoader()
// Could be null if loaded from system classloader
final ClassLoader cl = IdleRemover.class.getClassLoader();
if (cl == null)
return;
SecurityManager sm = System.getSecurityManager();
if (sm == null)
Thread.currentThread().setContextClassLoader(cl);
AccessController.doPrivileged(new PrivilegedAction()
{
public Object run()
{
Thread.currentThread().setContextClassLoader(cl);
return null;
}
});
|
public static void | unRegisterPool(InternalManagedConnectionPool mcp)
validator.internalUnregisterPool(mcp);
|
public static void | waitForBackgroundThread()
synchronized (validator.pools)
{
return;
}
|