HBASE-14977 ChoreService.shutdown may result in ConcurrentModificationException - ADDENDUM to fix extra concurrency issues

This commit is contained in:
Enis Soztutar 2015-12-22 02:04:09 -08:00
parent cf059e54b5
commit 1b66f474b5
1 changed files with 6 additions and 6 deletions

View File

@ -228,7 +228,7 @@ public abstract class ScheduledChore implements Runnable {
&& getTimeBetweenRuns() > getMaximumAllowedTimeBetweenRuns(); && getTimeBetweenRuns() > getMaximumAllowedTimeBetweenRuns();
} }
private synchronized double getMaximumAllowedTimeBetweenRuns() { private double getMaximumAllowedTimeBetweenRuns() {
// Threshold used to determine if the Chore's current run started too late // Threshold used to determine if the Chore's current run started too late
return 1.5 * period; return 1.5 * period;
} }
@ -268,23 +268,23 @@ public abstract class ScheduledChore implements Runnable {
choreServicer = null; choreServicer = null;
} }
public synchronized String getName() { public String getName() {
return name; return name;
} }
public synchronized Stoppable getStopper() { public Stoppable getStopper() {
return stopper; return stopper;
} }
public synchronized int getPeriod() { public int getPeriod() {
return period; return period;
} }
public synchronized long getInitialDelay() { public long getInitialDelay() {
return initialDelay; return initialDelay;
} }
public final synchronized TimeUnit getTimeUnit() { public TimeUnit getTimeUnit() {
return timeUnit; return timeUnit;
} }