anvil.database
Class ConnectionPool.ConnectionAllocator

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--anvil.database.ConnectionPool.ConnectionAllocator
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
ConnectionPool

public class ConnectionPool.ConnectionAllocator
extends java.lang.Thread

Connection allocator runs through the loop sleeping specified amount on each loop and invoking checkConnections method on each loop. Allocator is also interrupted immediately by other threads when new connections can be created.

See Also:
ConnectionPool#checkConnections()

Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ConnectionPool.ConnectionAllocator(java.lang.String name)
          Creates the allocator.
 
Method Summary
 void run()
          Runs the allocator.
 void shutdown()
          Shuts down the allocator.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConnectionPool.ConnectionAllocator

public ConnectionPool.ConnectionAllocator(java.lang.String name)
Creates the allocator.

Method Detail

shutdown

public void shutdown()
Shuts down the allocator.


run

public void run()
Runs the allocator.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread