Document sync. strategy

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1391242 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2012-09-27 22:30:08 +00:00
parent 38fea7d456
commit 91b9a3de99
2 changed files with 10 additions and 10 deletions

View File

@ -86,13 +86,13 @@ import java.util.concurrent.Future;
public abstract class BackgroundInitializer<T> implements public abstract class BackgroundInitializer<T> implements
ConcurrentInitializer<T> { ConcurrentInitializer<T> {
/** The external executor service for executing tasks. */ /** The external executor service for executing tasks. */
private ExecutorService externalExecutor; private ExecutorService externalExecutor; // @GuardedBy("this")
/** A reference to the executor service that is actually used. */ /** A reference to the executor service that is actually used. */
private ExecutorService executor; private ExecutorService executor; // @GuardedBy("this")
/** Stores the handle to the background task. */ /** Stores the handle to the background task. */
private Future<T> future; private Future<T> future; // @GuardedBy("this")
/** /**
* Creates a new instance of {@code BackgroundInitializer}. No external * Creates a new instance of {@code BackgroundInitializer}. No external

View File

@ -149,28 +149,28 @@ public class TimedSemaphore {
private final boolean ownExecutor; private final boolean ownExecutor;
/** A future object representing the timer task. */ /** A future object representing the timer task. */
private ScheduledFuture<?> task; private ScheduledFuture<?> task; // @GuardedBy("this")
/** Stores the total number of invocations of the acquire() method. */ /** Stores the total number of invocations of the acquire() method. */
private long totalAcquireCount; private long totalAcquireCount; // @GuardedBy("this")
/** /**
* The counter for the periods. This counter is increased every time a * The counter for the periods. This counter is increased every time a
* period ends. * period ends.
*/ */
private long periodCount; private long periodCount; // @GuardedBy("this")
/** The limit. */ /** The limit. */
private int limit; private int limit; // @GuardedBy("this")
/** The current counter. */ /** The current counter. */
private int acquireCount; private int acquireCount; // @GuardedBy("this")
/** The number of invocations of acquire() in the last period. */ /** The number of invocations of acquire() in the last period. */
private int lastCallsPerPeriod; private int lastCallsPerPeriod; // @GuardedBy("this")
/** A flag whether shutdown() was called. */ /** A flag whether shutdown() was called. */
private boolean shutdown; private boolean shutdown; // @GuardedBy("this")
/** /**
* Creates a new instance of {@link TimedSemaphore} and initializes it with * Creates a new instance of {@link TimedSemaphore} and initializes it with