private static class CurrentTaskFuture.QueueRunner
extends java.lang.Object
implements java.lang.Runnable
Modifier and Type | Field and Description |
---|---|
private java.util.HashSet<ActiveDescriptor<?>> |
alreadyTried |
private AsyncRunLevelContext |
asyncContext |
private ServiceLocator |
locator |
private int |
maxThreads |
private CurrentTaskFuture.UpOneLevel |
parent |
private java.lang.Object |
parentLock |
private java.util.List<ServiceHandle<?>> |
queue |
private java.lang.Object |
queueLock |
private ServiceHandle<?> |
wouldHaveBlocked |
Modifier | Constructor and Description |
---|---|
private |
QueueRunner(ServiceLocator locator,
AsyncRunLevelContext asyncContext,
java.lang.Object queueLock,
java.util.List<ServiceHandle<?>> queue,
CurrentTaskFuture.UpOneLevel parent,
java.lang.Object parentLock,
int maxThreads) |
Modifier and Type | Method and Description |
---|---|
private boolean |
isWouldBlockRightNow(java.util.HashSet<ActiveDescriptor<?>> cycleChecker,
ActiveDescriptor<?> checkMe)
This method does a preliminary check of whether or not the descriptor (or any children) would cause
the thread to block.
|
private void |
oneJob(ServiceHandle<?> fService,
boolean block) |
void |
run() |
private final ServiceLocator locator
private final AsyncRunLevelContext asyncContext
private final java.lang.Object queueLock
private final java.util.List<ServiceHandle<?>> queue
private final CurrentTaskFuture.UpOneLevel parent
private final java.lang.Object parentLock
private final int maxThreads
private ServiceHandle<?> wouldHaveBlocked
private final java.util.HashSet<ActiveDescriptor<?>> alreadyTried
private QueueRunner(ServiceLocator locator, AsyncRunLevelContext asyncContext, java.lang.Object queueLock, java.util.List<ServiceHandle<?>> queue, CurrentTaskFuture.UpOneLevel parent, java.lang.Object parentLock, int maxThreads)
public void run()
run
in interface java.lang.Runnable
private boolean isWouldBlockRightNow(java.util.HashSet<ActiveDescriptor<?>> cycleChecker, ActiveDescriptor<?> checkMe)
cycleChecker
- To ensure we are not caught in a cyclecheckMe
- The descriptor to checkprivate void oneJob(ServiceHandle<?> fService, boolean block)