Package com.mchange.v2.c3p0
Class AbstractExecutorTaskRunnerFactory.AbstractExecutorAsynchronousRunner
- java.lang.Object
-
- com.mchange.v2.c3p0.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
Consider overriding those if you can!public int getThreadCount() { return -1; } public int getIdleCount() { return -1; } public int getPendingTaskCount() { return -1; }
-
-
Field Summary
Fields Modifier and Type Field Description protected TaskRunnerInit
init
protected java.util.Timer
timer
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractExecutorAsynchronousRunner(TaskRunnerInit init, java.util.Timer timer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected int
activeCount()
void
close()
void
close(boolean skip_remaining_tasks)
protected java.util.concurrent.Executor
executor()
int
getActiveCount()
int
getIdleCount()
int
getPendingTaskCount()
java.lang.String
getStackTraces()
java.lang.String
getStatus()
int
getThreadCount()
protected boolean
isClosed()
void
postRunnable(java.lang.Runnable r)
protected void
registerActive(com.mchange.v2.c3p0.AbstractExecutorTaskRunnerFactory.AbstractExecutorAsynchronousRunner.WrapperRunnable wr)
protected java.util.HashSet
snapshotActives()
protected void
unregisterActive(com.mchange.v2.c3p0.AbstractExecutorTaskRunnerFactory.AbstractExecutorAsynchronousRunner.WrapperRunnable wr)
-
-
-
Field Detail
-
init
protected final TaskRunnerInit init
-
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 interfacecom.mchange.v2.async.AsynchronousRunner
-
close
public void close(boolean skip_remaining_tasks)
- Specified by:
close
in interfacecom.mchange.v2.async.AsynchronousRunner
-
close
public void close()
- Specified by:
close
in interfacecom.mchange.v2.async.AsynchronousRunner
- Specified by:
close
in interfacecom.mchange.v1.util.ClosableResource
-
getThreadCount
public int getThreadCount()
- Specified by:
getThreadCount
in interfacecom.mchange.v2.async.ThreadPoolReportingAsynchronousRunner
-
getActiveCount
public int getActiveCount()
- Specified by:
getActiveCount
in interfacecom.mchange.v2.async.ThreadPoolReportingAsynchronousRunner
-
getIdleCount
public int getIdleCount()
- Specified by:
getIdleCount
in interfacecom.mchange.v2.async.ThreadPoolReportingAsynchronousRunner
-
getPendingTaskCount
public int getPendingTaskCount()
- Specified by:
getPendingTaskCount
in interfacecom.mchange.v2.async.ThreadPoolReportingAsynchronousRunner
-
getStatus
public java.lang.String getStatus()
- Specified by:
getStatus
in interfacecom.mchange.v2.async.ThreadPoolReportingAsynchronousRunner
-
getStackTraces
public java.lang.String getStackTraces()
- Specified by:
getStackTraces
in interfacecom.mchange.v2.async.ThreadPoolReportingAsynchronousRunner
-
-