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:
parent
38fea7d456
commit
91b9a3de99
|
@ -86,13 +86,13 @@ import java.util.concurrent.Future;
|
|||
public abstract class BackgroundInitializer<T> implements
|
||||
ConcurrentInitializer<T> {
|
||||
/** 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. */
|
||||
private ExecutorService executor;
|
||||
private ExecutorService executor; // @GuardedBy("this")
|
||||
|
||||
/** 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
|
||||
|
|
|
@ -149,28 +149,28 @@ public class TimedSemaphore {
|
|||
private final boolean ownExecutor;
|
||||
|
||||
/** 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. */
|
||||
private long totalAcquireCount;
|
||||
private long totalAcquireCount; // @GuardedBy("this")
|
||||
|
||||
/**
|
||||
* The counter for the periods. This counter is increased every time a
|
||||
* period ends.
|
||||
*/
|
||||
private long periodCount;
|
||||
private long periodCount; // @GuardedBy("this")
|
||||
|
||||
/** The limit. */
|
||||
private int limit;
|
||||
private int limit; // @GuardedBy("this")
|
||||
|
||||
/** The current counter. */
|
||||
private int acquireCount;
|
||||
private int acquireCount; // @GuardedBy("this")
|
||||
|
||||
/** The number of invocations of acquire() in the last period. */
|
||||
private int lastCallsPerPeriod;
|
||||
private int lastCallsPerPeriod; // @GuardedBy("this")
|
||||
|
||||
/** 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
|
||||
|
|
Loading…
Reference in New Issue