public class WorkloadExecutor extends Object
| Constructor and Description |
|---|
WorkloadExecutor() |
WorkloadExecutor(Properties properties) |
WorkloadExecutor(Properties properties,
List<Workload> workloads,
boolean isPerformance) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Workload workload) |
void |
complete()
Complete all workloads in the list.
|
void |
get()
Blocks on waiting for all workloads to finish.
|
void |
get(Workload workload)
Calls the
Future.get() method pertaining to this workflow. |
ExecutorService |
getPool()
TODO This should be removed, Access to the pool should be restriced and callers should Workflows
|
boolean |
isPerformance() |
void |
shutdown() |
public WorkloadExecutor(Properties properties) throws Exception
Exceptionpublic WorkloadExecutor(Properties properties, List<Workload> workloads, boolean isPerformance) throws Exception
Exceptionpublic void get()
Workload Requires complete() to be called, it must
be called prior to using this method. Otherwise it will block infinitely.public void get(Workload workload)
Future.get() method pertaining to this workflow.
Once the Future competes, the workflow is removed from the list.workload - Key entry in the HashMappublic void complete()
public void shutdown()
public ExecutorService getPool()
ExecutorService Exposes the underlying thread poolpublic boolean isPerformance()
Copyright © 2017 Apache Software Foundation. All Rights Reserved.