Browse Source

Consistent javadoc references to java.util.concurrent and javax.enterprise.concurrent

pull/390/merge
Juergen Hoeller 12 years ago
parent
commit
b69ebe70a6
  1. 20
      spring-context/src/main/java/org/springframework/scheduling/concurrent/ConcurrentTaskExecutor.java
  2. 28
      spring-context/src/main/java/org/springframework/scheduling/concurrent/ConcurrentTaskScheduler.java
  3. 6
      spring-context/src/main/java/org/springframework/scheduling/concurrent/CustomizableThreadFactory.java
  4. 2
      spring-context/src/main/java/org/springframework/scheduling/concurrent/ScheduledExecutorFactoryBean.java
  5. 8
      spring-context/src/main/java/org/springframework/scheduling/concurrent/ScheduledExecutorTask.java
  6. 4
      spring-context/src/main/java/org/springframework/scheduling/concurrent/ThreadPoolExecutorFactoryBean.java
  7. 6
      spring-context/src/main/java/org/springframework/scheduling/concurrent/ThreadPoolTaskExecutor.java
  8. 4
      spring-context/src/main/java/org/springframework/scheduling/concurrent/package-info.java
  9. 4
      spring-core/src/main/java/org/springframework/util/ConcurrentReferenceHashMap.java

20
spring-context/src/main/java/org/springframework/scheduling/concurrent/ConcurrentTaskExecutor.java

@ -31,8 +31,8 @@ import org.springframework.scheduling.SchedulingTaskExecutor; @@ -31,8 +31,8 @@ import org.springframework.scheduling.SchedulingTaskExecutor;
import org.springframework.util.ClassUtils;
/**
* Adapter that takes a JDK 1.5 {@code java.util.concurrent.Executor} and
* exposes a Spring {@link org.springframework.core.task.TaskExecutor} for it.
* Adapter that takes a {@code java.util.concurrent.Executor} and exposes
* a Spring {@link org.springframework.core.task.TaskExecutor} for it.
* Also detects an extended {@code java.util.concurrent.ExecutorService}, adapting
* the {@link org.springframework.core.task.AsyncTaskExecutor} interface accordingly.
*
@ -41,8 +41,8 @@ import org.springframework.util.ClassUtils; @@ -41,8 +41,8 @@ import org.springframework.util.ClassUtils;
* exposing a long-running hint based on {@link SchedulingAwareRunnable} and an
* identity name based on the given Runnable/Callable's {@code toString()}.
*
* <p>Note that there is a pre-built {@link ThreadPoolTaskExecutor} that allows for
* defining a JDK 1.5 {@link java.util.concurrent.ThreadPoolExecutor} in bean style,
* <p>Note that there is a pre-built {@link ThreadPoolTaskExecutor} that allows
* for defining a {@link java.util.concurrent.ThreadPoolExecutor} in bean style,
* exposing it as a Spring {@link org.springframework.core.task.TaskExecutor} directly.
* This is a convenient alternative to a raw ThreadPoolExecutor definition with
* a separate definition of the present adapter class.
@ -77,8 +77,7 @@ public class ConcurrentTaskExecutor implements SchedulingTaskExecutor { @@ -77,8 +77,7 @@ public class ConcurrentTaskExecutor implements SchedulingTaskExecutor {
/**
* Create a new ConcurrentTaskExecutor,
* using a single thread executor as default.
* Create a new ConcurrentTaskExecutor, using a single thread executor as default.
* @see java.util.concurrent.Executors#newSingleThreadExecutor()
*/
public ConcurrentTaskExecutor() {
@ -86,11 +85,10 @@ public class ConcurrentTaskExecutor implements SchedulingTaskExecutor { @@ -86,11 +85,10 @@ public class ConcurrentTaskExecutor implements SchedulingTaskExecutor {
}
/**
* Create a new ConcurrentTaskExecutor,
* using the given JDK 1.5 concurrent executor.
* Create a new ConcurrentTaskExecutor, using the given {@link java.util.concurrent.Executor}.
* <p>Autodetects a JSR-236 {@link javax.enterprise.concurrent.ManagedExecutorService}
* in order to expose {@link javax.enterprise.concurrent.ManagedTask} adapters for it.
* @param concurrentExecutor the JDK 1.5 concurrent executor to delegate to
* @param concurrentExecutor the {@link java.util.concurrent.Executor} to delegate to
*/
public ConcurrentTaskExecutor(Executor concurrentExecutor) {
setConcurrentExecutor(concurrentExecutor);
@ -98,7 +96,7 @@ public class ConcurrentTaskExecutor implements SchedulingTaskExecutor { @@ -98,7 +96,7 @@ public class ConcurrentTaskExecutor implements SchedulingTaskExecutor {
/**
* Specify the JDK 1.5 concurrent executor to delegate to.
* Specify the {@link java.util.concurrent.Executor} to delegate to.
* <p>Autodetects a JSR-236 {@link javax.enterprise.concurrent.ManagedExecutorService}
* in order to expose {@link javax.enterprise.concurrent.ManagedTask} adapters for it.
*/
@ -119,7 +117,7 @@ public class ConcurrentTaskExecutor implements SchedulingTaskExecutor { @@ -119,7 +117,7 @@ public class ConcurrentTaskExecutor implements SchedulingTaskExecutor {
}
/**
* Return the JDK 1.5 concurrent executor that this adapter delegates to.
* Return the {@link java.util.concurrent.Executor} that this adapter delegates to.
*/
public final Executor getConcurrentExecutor() {
return this.concurrentExecutor;

28
spring-context/src/main/java/org/springframework/scheduling/concurrent/ConcurrentTaskScheduler.java

@ -36,8 +36,8 @@ import org.springframework.util.ClassUtils; @@ -36,8 +36,8 @@ import org.springframework.util.ClassUtils;
import org.springframework.util.ErrorHandler;
/**
* Adapter that takes a JDK 1.5 {@code java.util.concurrent.ScheduledExecutorService}
* and exposes a Spring {@link org.springframework.scheduling.TaskScheduler} for it.
* Adapter that takes a {@code java.util.concurrent.ScheduledExecutorService} and
* exposes a Spring {@link org.springframework.scheduling.TaskScheduler} for it.
* Extends {@link ConcurrentTaskExecutor} in order to implement the
* {@link org.springframework.scheduling.SchedulingTaskExecutor} interface as well.
*
@ -47,7 +47,7 @@ import org.springframework.util.ErrorHandler; @@ -47,7 +47,7 @@ import org.springframework.util.ErrorHandler;
* against the {@code java.util.concurrent.ScheduledExecutorService} API.
*
* <p>Note that there is a pre-built {@link ThreadPoolTaskScheduler} that allows for
* defining a JDK 1.5 {@link java.util.concurrent.ScheduledThreadPoolExecutor} in bean style,
* defining a {@link java.util.concurrent.ScheduledThreadPoolExecutor} in bean style,
* exposing it as a Spring {@link org.springframework.scheduling.TaskScheduler} directly.
* This is a convenient alternative to a raw ScheduledThreadPoolExecutor definition with
* a separate definition of the present adapter class.
@ -94,14 +94,14 @@ public class ConcurrentTaskScheduler extends ConcurrentTaskExecutor implements T @@ -94,14 +94,14 @@ public class ConcurrentTaskScheduler extends ConcurrentTaskExecutor implements T
}
/**
* Create a new ConcurrentTaskScheduler,
* using the given JDK 1.5 executor as shared delegate.
* Create a new ConcurrentTaskScheduler, using the given
* {@link java.util.concurrent.ScheduledExecutorService} as shared delegate.
* <p>Autodetects a JSR-236 {@link javax.enterprise.concurrent.ManagedScheduledExecutorService}
* in order to use it for trigger-based scheduling if possible,
* instead of Spring's local trigger management.
* @param scheduledExecutor the JDK 1.5 scheduled executor to delegate to
* for {@link org.springframework.scheduling.SchedulingTaskExecutor} as well
* as {@link TaskScheduler} invocations
* @param scheduledExecutor the {@link java.util.concurrent.ScheduledExecutorService}
* to delegate to for {@link org.springframework.scheduling.SchedulingTaskExecutor}
* as well as {@link TaskScheduler} invocations
*/
public ConcurrentTaskScheduler(ScheduledExecutorService scheduledExecutor) {
super(scheduledExecutor);
@ -109,15 +109,15 @@ public class ConcurrentTaskScheduler extends ConcurrentTaskExecutor implements T @@ -109,15 +109,15 @@ public class ConcurrentTaskScheduler extends ConcurrentTaskExecutor implements T
}
/**
* Create a new ConcurrentTaskScheduler,
* using the given JDK 1.5 executors as delegates.
* Create a new ConcurrentTaskScheduler, using the given {@link java.util.concurrent.Executor}
* and {@link java.util.concurrent.ScheduledExecutorService} as delegates.
* <p>Autodetects a JSR-236 {@link javax.enterprise.concurrent.ManagedScheduledExecutorService}
* in order to use it for trigger-based scheduling if possible,
* instead of Spring's local trigger management.
* @param concurrentExecutor the JDK 1.5 concurrent executor to delegate to
* @param concurrentExecutor the {@link java.util.concurrent.Executor} to delegate to
* for {@link org.springframework.scheduling.SchedulingTaskExecutor} invocations
* @param scheduledExecutor the JDK 1.5 scheduled executor to delegate to
* for {@link TaskScheduler} invocations
* @param scheduledExecutor the {@link java.util.concurrent.ScheduledExecutorService}
* to delegate to for {@link TaskScheduler} invocations
*/
public ConcurrentTaskScheduler(Executor concurrentExecutor, ScheduledExecutorService scheduledExecutor) {
super(concurrentExecutor);
@ -126,7 +126,7 @@ public class ConcurrentTaskScheduler extends ConcurrentTaskExecutor implements T @@ -126,7 +126,7 @@ public class ConcurrentTaskScheduler extends ConcurrentTaskExecutor implements T
/**
* Specify the JDK 1.5 scheduled executor to delegate to.
* Specify the {@link java.util.concurrent.ScheduledExecutorService} to delegate to.
* <p>Autodetects a JSR-236 {@link javax.enterprise.concurrent.ManagedScheduledExecutorService}
* in order to use it for trigger-based scheduling if possible,
* instead of Spring's local trigger management.

6
spring-context/src/main/java/org/springframework/scheduling/concurrent/CustomizableThreadFactory.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -21,8 +21,8 @@ import java.util.concurrent.ThreadFactory; @@ -21,8 +21,8 @@ import java.util.concurrent.ThreadFactory;
import org.springframework.util.CustomizableThreadCreator;
/**
* Implementation of the JDK 1.5 {@link java.util.concurrent.ThreadFactory}
* interface, allowing for customizing the created threads (name, priority, etc).
* Implementation of the {@link java.util.concurrent.ThreadFactory} interface,
* allowing for customizing the created threads (name, priority, etc).
*
* <p>See the base class {@link org.springframework.util.CustomizableThreadCreator}
* for details on the available configuration options.

2
spring-context/src/main/java/org/springframework/scheduling/concurrent/ScheduledExecutorFactoryBean.java

@ -31,7 +31,7 @@ import org.springframework.util.ObjectUtils; @@ -31,7 +31,7 @@ import org.springframework.util.ObjectUtils;
/**
* {@link org.springframework.beans.factory.FactoryBean} that sets up
* a JDK 1.5 {@link java.util.concurrent.ScheduledExecutorService}
* a {@link java.util.concurrent.ScheduledExecutorService}
* (by default: a {@link java.util.concurrent.ScheduledThreadPoolExecutor})
* and exposes it for bean references.
*

8
spring-context/src/main/java/org/springframework/scheduling/concurrent/ScheduledExecutorTask.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -23,9 +23,9 @@ import java.util.concurrent.TimeUnit; @@ -23,9 +23,9 @@ import java.util.concurrent.TimeUnit;
* {@link Runnable} and a delay plus period. The period needs to be specified;
* there is no point in a default for it.
*
* <p>The JDK 1.5 {@link java.util.concurrent.ScheduledExecutorService} does
* not offer more sophisticated scheduling options such as cron expressions.
* Consider using Quartz for such advanced needs.
* <p>The {@link java.util.concurrent.ScheduledExecutorService} does not offer
* more sophisticated scheduling options such as cron expressions.
* Consider using {@link ThreadPoolTaskScheduler} for such needs.
*
* <p>Note that the {@link java.util.concurrent.ScheduledExecutorService} mechanism
* uses a {@link Runnable} instance that is shared between repeated executions,

4
spring-context/src/main/java/org/springframework/scheduling/concurrent/ThreadPoolExecutorFactoryBean.java

@ -31,13 +31,13 @@ import org.springframework.beans.factory.FactoryBean; @@ -31,13 +31,13 @@ import org.springframework.beans.factory.FactoryBean;
import org.springframework.beans.factory.InitializingBean;
/**
* JavaBean that allows for configuring a JDK 1.5 {@link java.util.concurrent.ThreadPoolExecutor}
* JavaBean that allows for configuring a {@link java.util.concurrent.ThreadPoolExecutor}
* in bean style (through its "corePoolSize", "maxPoolSize", "keepAliveSeconds",
* "queueCapacity" properties) and exposing it as a bean reference of its native
* {@link java.util.concurrent.ExecutorService} type.
*
* <p>For an alternative, you may set up a ThreadPoolExecutor instance directly using
* constructor injection, or use a factory method definition that points to the JDK 1.5
* constructor injection, or use a factory method definition that points to the
* {@link java.util.concurrent.Executors} class.
*
* <p><b>If you need a timing-based {@link java.util.concurrent.ScheduledExecutorService}

6
spring-context/src/main/java/org/springframework/scheduling/concurrent/ThreadPoolTaskExecutor.java

@ -34,7 +34,7 @@ import org.springframework.scheduling.SchedulingTaskExecutor; @@ -34,7 +34,7 @@ import org.springframework.scheduling.SchedulingTaskExecutor;
import org.springframework.util.Assert;
/**
* JavaBean that allows for configuring a JDK 1.5 {@link java.util.concurrent.ThreadPoolExecutor}
* JavaBean that allows for configuring a {@link java.util.concurrent.ThreadPoolExecutor}
* in bean style (through its "corePoolSize", "maxPoolSize", "keepAliveSeconds", "queueCapacity"
* properties) and exposing it as a Spring {@link org.springframework.core.task.TaskExecutor}.
* This class is also well suited for management and monitoring (e.g. through JMX),
@ -42,13 +42,13 @@ import org.springframework.util.Assert; @@ -42,13 +42,13 @@ import org.springframework.util.Assert;
* (all supporting updates at runtime); "poolSize", "activeCount" (for introspection only).
*
* <p>For an alternative, you may set up a ThreadPoolExecutor instance directly using
* constructor injection, or use a factory method definition that points to the JDK 1.5
* constructor injection, or use a factory method definition that points to the
* {@link java.util.concurrent.Executors} class. To expose such a raw Executor as a
* Spring {@link org.springframework.core.task.TaskExecutor}, simply wrap it with a
* {@link org.springframework.scheduling.concurrent.ConcurrentTaskExecutor} adapter.
*
* <p><b>NOTE:</b> This class implements Spring's
* {@link org.springframework.core.task.TaskExecutor} interface as well as the JDK 1.5
* {@link org.springframework.core.task.TaskExecutor} interface as well as the
* {@link java.util.concurrent.Executor} interface, with the former being the primary
* interface, the other just serving as secondary convenience. For this reason, the
* exception handling follows the TaskExecutor contract rather than the Executor contract,

4
spring-context/src/main/java/org/springframework/scheduling/concurrent/package-info.java

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
/**
*
* Scheduling convenience classes for the JDK 1.5+ Executor mechanism
* in the {@code java.util.concurrent} package, allowing to set up a
* Scheduling convenience classes for the {@code java.util.concurrent}
* and {@code javax.enterprise.concurrent} packages, allowing to set up a
* ThreadPoolExecutor or ScheduledThreadPoolExecutor as a bean in a Spring
* context. Provides support for the native {@code java.util.concurrent}
* interfaces as well as the Spring {@code TaskExecutor} mechanism.

4
spring-core/src/main/java/org/springframework/util/ConcurrentReferenceHashMap.java

@ -48,7 +48,7 @@ import java.util.concurrent.locks.ReentrantLock; @@ -48,7 +48,7 @@ import java.util.concurrent.locks.ReentrantLock;
* references at any time, so it may appear that an unknown thread is silently removing
* entries.
*
* <p>If not explicitly specified this implementation will use
* <p>If not explicitly specified, this implementation will use
* {@linkplain SoftReference soft entry references}.
*
* @param <K> The key type
@ -425,7 +425,6 @@ public class ConcurrentReferenceHashMap<K, V> extends AbstractMap<K, V> implemen @@ -425,7 +425,6 @@ public class ConcurrentReferenceHashMap<K, V> extends AbstractMap<K, V> implemen
setReferences(createReferenceArray(this.initialSize));
}
public Reference<K, V> getReference(Object key, int hash, Restructure restructure) {
if (restructure == Restructure.WHEN_NECESSARY) {
restructureIfNecessary(false);
@ -895,6 +894,7 @@ public class ConcurrentReferenceHashMap<K, V> extends AbstractMap<K, V> implemen @@ -895,6 +894,7 @@ public class ConcurrentReferenceHashMap<K, V> extends AbstractMap<K, V> implemen
* The types of restructuring that can be performed.
*/
protected static enum Restructure {
WHEN_NECESSARY, NEVER
}

Loading…
Cancel
Save