Skip to content

Commit

Permalink
Rename EWYK The AdaptiveExecutionStrategy
Browse files Browse the repository at this point in the history
niggles for javadoc

Signed-off-by: Greg Wilkins <gregw@webtide.com>
  • Loading branch information
gregw committed Jun 14, 2021
1 parent 8dd8f1b commit 8acfd44
Showing 1 changed file with 6 additions and 5 deletions.
Expand Up @@ -213,7 +213,7 @@ private void tryProduce(boolean wasPending)
break;

case PRODUCING:
// The strategy is already producing, so another thread must be the producer
// The strategy is already producing, so another thread must be the producer.
// However, it may be just about to stop being the producer so we set the
// REPRODUCING state to force it to call #doProduce at least once more.
_state = State.REPRODUCING;
Expand Down Expand Up @@ -278,7 +278,7 @@ private void tryProduce(boolean wasPending)
* Select the execution strategy.
* @param task The task to select the strategy for.
* @param nonBlocking True if the producing thread cannot block.
* @return The sub-strategy mode to use for the task.
* @return The sub-strategy to use for the task.
*/
private SubStrategy selectSubStrategy(Runnable task, boolean nonBlocking)
{
Expand Down Expand Up @@ -341,7 +341,8 @@ private SubStrategy selectSubStrategy(Runnable task, boolean nonBlocking)
}
}

/** Consume a task with a sub-strategy.
/**
* Consume a task with a sub-strategy.
* @param task The task to consume.
* @param subStrategy The execution sub-strategy mode to use to consume it.
* @return True if the sub-strategy requires the caller to continue to produce tasks.
Expand All @@ -350,7 +351,7 @@ private boolean consumeTask(Runnable task, SubStrategy subStrategy)
{
// Consume and/or execute task according to the selected mode.
if (LOG.isDebugEnabled())
LOG.debug("{} m={} t={}/{}", this, subStrategy, task, Invocable.getInvocationType(task));
LOG.debug("{} ss={} t={}/{} {}", this, subStrategy, task, Invocable.getInvocationType(task));
switch (subStrategy)
{
case PRODUCE_CONSUME:
Expand Down Expand Up @@ -393,7 +394,7 @@ private boolean consumeTask(Runnable task, SubStrategy subStrategy)
}

/**
* Run a Runnable task, logging any thrown exception.
* Runs a Runnable task, logging any thrown exception.
* @param task The task to run.
*/
private void runTask(Runnable task)
Expand Down

0 comments on commit 8acfd44

Please sign in to comment.