Class AbstractExecutorTaskRunnerFactory.AbstractExecutorAsynchronousRunner

  • All Implemented Interfaces:
    com.mchange.v1.util.ClosableResource, com.mchange.v2.async.AsynchronousRunner, com.mchange.v2.async.ThreadPoolReportingAsynchronousRunner
    Direct Known Subclasses:
    FixedThreadPoolExecutorTaskRunnerFactory.FixedThreadPoolExecutorAsynchronousRunner
    Enclosing class:
    AbstractExecutorTaskRunnerFactory

    protected abstract class AbstractExecutorTaskRunnerFactory.AbstractExecutorAsynchronousRunner
    extends java.lang.Object
    implements com.mchange.v2.async.ThreadPoolReportingAsynchronousRunner
    This implementation includes uninformative stub implementations of
    
       public int getThreadCount()      { return -1; }
       public int getIdleCount()        { return -1; }
       public int getPendingTaskCount() { return -1; }
       
    Consider overriding those if you can!
    • Field Detail

      • timer

        protected final java.util.Timer timer
    • Constructor Detail

      • AbstractExecutorAsynchronousRunner

        protected AbstractExecutorAsynchronousRunner​(TaskRunnerInit init,
                                                     java.util.Timer timer)
    • Method Detail

      • registerActive

        protected void registerActive​(com.mchange.v2.c3p0.AbstractExecutorTaskRunnerFactory.AbstractExecutorAsynchronousRunner.WrapperRunnable wr)
      • unregisterActive

        protected void unregisterActive​(com.mchange.v2.c3p0.AbstractExecutorTaskRunnerFactory.AbstractExecutorAsynchronousRunner.WrapperRunnable wr)
      • activeCount

        protected int activeCount()
      • snapshotActives

        protected java.util.HashSet snapshotActives()
      • isClosed

        protected boolean isClosed()
      • executor

        protected java.util.concurrent.Executor executor()
      • postRunnable

        public void postRunnable​(java.lang.Runnable r)
        Specified by:
        postRunnable in interface com.mchange.v2.async.AsynchronousRunner
      • close

        public void close​(boolean skip_remaining_tasks)
        Specified by:
        close in interface com.mchange.v2.async.AsynchronousRunner
      • close

        public void close()
        Specified by:
        close in interface com.mchange.v2.async.AsynchronousRunner
        Specified by:
        close in interface com.mchange.v1.util.ClosableResource
      • getThreadCount

        public int getThreadCount()
        Specified by:
        getThreadCount in interface com.mchange.v2.async.ThreadPoolReportingAsynchronousRunner
      • getActiveCount

        public int getActiveCount()
        Specified by:
        getActiveCount in interface com.mchange.v2.async.ThreadPoolReportingAsynchronousRunner
      • getIdleCount

        public int getIdleCount()
        Specified by:
        getIdleCount in interface com.mchange.v2.async.ThreadPoolReportingAsynchronousRunner
      • getPendingTaskCount

        public int getPendingTaskCount()
        Specified by:
        getPendingTaskCount in interface com.mchange.v2.async.ThreadPoolReportingAsynchronousRunner
      • getStatus

        public java.lang.String getStatus()
        Specified by:
        getStatus in interface com.mchange.v2.async.ThreadPoolReportingAsynchronousRunner
      • getStackTraces

        public java.lang.String getStackTraces()
        Specified by:
        getStackTraces in interface com.mchange.v2.async.ThreadPoolReportingAsynchronousRunner