Author: sebb Date: Thu Sep 27 22:30:08 2012 New Revision: 1391242 URL: http://svn.apache.org/viewvc?rev=1391242&view=rev Log: Document sync. strategy
Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/concurrent/BackgroundInitializer.java commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/concurrent/TimedSemaphore.java Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/concurrent/BackgroundInitializer.java URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/concurrent/BackgroundInitializer.java?rev=1391242&r1=1391241&r2=1391242&view=diff ============================================================================== --- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/concurrent/BackgroundInitializer.java (original) +++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/concurrent/BackgroundInitializer.java Thu Sep 27 22:30:08 2012 @@ -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 Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/concurrent/TimedSemaphore.java URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/concurrent/TimedSemaphore.java?rev=1391242&r1=1391241&r2=1391242&view=diff ============================================================================== --- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/concurrent/TimedSemaphore.java (original) +++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/concurrent/TimedSemaphore.java Thu Sep 27 22:30:08 2012 @@ -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