db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DERBY-6285) Use factory method to create thread pool for timed login
Date Mon, 01 Jul 2013 15:07:20 GMT
Knut Anders Hatlen created DERBY-6285:

             Summary: Use factory method to create thread pool for timed login
                 Key: DERBY-6285
                 URL: https://issues.apache.org/jira/browse/DERBY-6285
             Project: Derby
          Issue Type: Improvement
          Components: JDBC
    Affects Versions:
            Reporter: Knut Anders Hatlen
            Assignee: Knut Anders Hatlen
            Priority: Trivial

InternalDriver creates a thread pool for running timed logins like this:

    private static final ThreadPoolExecutor _executorPool =
            new ThreadPoolExecutor(0, Integer.MAX_VALUE, 60L, TimeUnit.SECONDS,
                                   new SynchronousQueue<Runnable>());
    static {
        _executorPool.setThreadFactory(new DaemonThreadFactory());

The java.util.concurrent.Executors class has factory methods that create thread pools and
hide the details such as choosing keep-alive time and which kind of queue to use.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message