public final class TaskExecutors extends Object
TaskExecutor| Modifier and Type | Method and Description |
|---|---|
static TaskExecutor |
directExecutor()
Returns a
TaskExecutor that executes tasks as soon as they get
submitted. |
static TaskExecutor |
forExecutorService(ExecutorService executor) |
static TaskExecutor |
onDemandExecutor()
Returns a
TaskExecutor which executes tasks when the
Future.get() method is invoked. |
public static TaskExecutor forExecutorService(ExecutorService executor)
public static TaskExecutor onDemandExecutor()
TaskExecutor which executes tasks when the
Future.get() method is invoked.public static TaskExecutor directExecutor()
TaskExecutor that executes tasks as soon as they get
submitted.Copyright © 2009-2012 TranceCode. All Rights Reserved.