Modifier and Type | Field and Description |
---|---|
protected int |
id |
Constructor and Description |
---|
Worker() |
Modifier and Type | Method and Description |
---|---|
void |
clearException() |
void |
close()
Cleanup anything.
|
Parallel.Worker<T> |
copy()
Make a deep copy of this worker.
|
Exception |
getException() |
long |
getWaitTime() |
long |
getWorkTime() |
void |
init(int id)
Called before any work is given.
|
void |
run() |
void |
setWork(int index,
T item) |
abstract void |
work(int index,
T item)
Do the actual work.
|
public void close()
public Parallel.Worker<T> copy()
public void init(int id)
public void clearException()
public Exception getException()
public long getWaitTime()
public long getWorkTime()
public final void setWork(int index, T item)
public abstract void work(int index, T item)
Copyright © 2018 University of California, Santa Cruz. All rights reserved.