Consistent javadoc references to java.util.concurrent and javax.enterprise.concurrent
This commit is contained in:
parent
3402628a74
commit
b69ebe70a6
|
|
@ -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;
|
|||
* 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 {
|
|||
|
||||
|
||||
/**
|
||||
* 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 {
|
|||
}
|
||||
|
||||
/**
|
||||
* 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 {
|
|||
|
||||
|
||||
/**
|
||||
* 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 {
|
|||
}
|
||||
|
||||
/**
|
||||
* 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;
|
||||
|
|
|
|||
|
|
@ -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;
|
|||
* 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
|
|||
}
|
||||
|
||||
/**
|
||||
* 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
|
|||
}
|
||||
|
||||
/**
|
||||
* 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
|
|||
|
||||
|
||||
/**
|
||||
* 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.
|
||||
|
|
|
|||
|
|
@ -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;
|
|||
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.
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -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;
|
|||
* {@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,
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
|
|
|
|||
|
|
@ -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;
|
|||
* (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,
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
|||
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
|
|||
* The types of restructuring that can be performed.
|
||||
*/
|
||||
protected static enum Restructure {
|
||||
|
||||
WHEN_NECESSARY, NEVER
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue