Merge 00b1308223 into a53473d536
This commit is contained in:
commit
58d14d8dc1
1 changed files with 9 additions and 1 deletions
|
|
@ -104,6 +104,7 @@ public class Worker implements Runnable {
|
||||||
private volatile boolean shutdown;
|
private volatile boolean shutdown;
|
||||||
private volatile long shutdownStartTimeMillis;
|
private volatile long shutdownStartTimeMillis;
|
||||||
private volatile boolean shutdownComplete = false;
|
private volatile boolean shutdownComplete = false;
|
||||||
|
private volatile Exception lastException = null;
|
||||||
|
|
||||||
// Holds consumers for shards the worker is currently tracking. Key is shard
|
// Holds consumers for shards the worker is currently tracking. Key is shard
|
||||||
// info, value is ShardConsumer.
|
// info, value is ShardConsumer.
|
||||||
|
|
@ -617,7 +618,6 @@ public class Worker implements Runnable {
|
||||||
private void initialize() {
|
private void initialize() {
|
||||||
workerStateChangeListener.onWorkerStateChange(WorkerStateChangeListener.WorkerState.INITIALIZING);
|
workerStateChangeListener.onWorkerStateChange(WorkerStateChangeListener.WorkerState.INITIALIZING);
|
||||||
boolean isDone = false;
|
boolean isDone = false;
|
||||||
Exception lastException = null;
|
|
||||||
|
|
||||||
for (int i = 0; (!isDone) && (i < MAX_INITIALIZATION_ATTEMPTS); i++) {
|
for (int i = 0; (!isDone) && (i < MAX_INITIALIZATION_ATTEMPTS); i++) {
|
||||||
try {
|
try {
|
||||||
|
|
@ -881,6 +881,14 @@ public class Worker implements Runnable {
|
||||||
WorkerStateChangeListener getWorkerStateChangeListener() {
|
WorkerStateChangeListener getWorkerStateChangeListener() {
|
||||||
return workerStateChangeListener;
|
return workerStateChangeListener;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The last of any exception encountered during initialize() will be available here
|
||||||
|
*/
|
||||||
|
public Exception getLastException()
|
||||||
|
{
|
||||||
|
return lastException;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Signals worker to shutdown. Worker will try initiating shutdown of all record processors. Note that if executor
|
* Signals worker to shutdown. Worker will try initiating shutdown of all record processors. Note that if executor
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue