mirror of
https://github.com/Alfresco/SearchServices.git
synced 2025-09-17 14:21:20 +00:00
MNT-22712 introduced snchronized method
This commit is contained in:
@@ -222,18 +222,7 @@ public abstract class AbstractTracker implements Tracker
|
|||||||
assert(assertTrackerStateRemainsNull());
|
assert(assertTrackerStateRemainsNull());
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.state == null)
|
updateTrackerState(iterationId);
|
||||||
{
|
|
||||||
this.state = getTrackerState();
|
|
||||||
|
|
||||||
LOGGER.debug("[{} / {} / {}] Global Tracker State set to: {}", coreName, trackerId, iterationId, this.state.toString());
|
|
||||||
this.state.setRunning(true);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
continueState();
|
|
||||||
this.state.setRunning(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
infoSrv.registerTrackerThread();
|
infoSrv.registerTrackerThread();
|
||||||
|
|
||||||
@@ -275,6 +264,21 @@ public abstract class AbstractTracker implements Tracker
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private synchronized void updateTrackerState(String iterationId) {
|
||||||
|
if(this.state == null)
|
||||||
|
{
|
||||||
|
this.state = getTrackerState();
|
||||||
|
|
||||||
|
LOGGER.debug("[{} / {} / {}] Global Tracker State set to: {}", coreName, trackerId, iterationId, this.state.toString());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
continueState();
|
||||||
|
}
|
||||||
|
|
||||||
|
this.state.setRunning(true);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* At the end of the tracking method, the {@link TrackerState} should be turned off.
|
* At the end of the tracking method, the {@link TrackerState} should be turned off.
|
||||||
* However, during a rollback (that could be started by another tracker) the {@link TrackerState} instance
|
* However, during a rollback (that could be started by another tracker) the {@link TrackerState} instance
|
||||||
|
Reference in New Issue
Block a user