Deprecate CommonJ scheduling in favor of JSR-236 Concurrency Utilities
Issue: SPR-17117
This commit is contained in:
parent
50550717d6
commit
6735e2387c
|
|
@ -28,7 +28,10 @@ import org.springframework.util.Assert;
|
||||||
* @since 2.0
|
* @since 2.0
|
||||||
* @see commonj.timers.TimerListener
|
* @see commonj.timers.TimerListener
|
||||||
* @see java.lang.Runnable
|
* @see java.lang.Runnable
|
||||||
|
* @deprecated as of 5.1, in favor of EE 7's
|
||||||
|
* {@link org.springframework.scheduling.concurrent.DefaultManagedTaskScheduler}
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public class DelegatingTimerListener implements TimerListener {
|
public class DelegatingTimerListener implements TimerListener {
|
||||||
|
|
||||||
private final Runnable runnable;
|
private final Runnable runnable;
|
||||||
|
|
|
||||||
|
|
@ -26,9 +26,10 @@ import org.springframework.util.Assert;
|
||||||
*
|
*
|
||||||
* @author Juergen Hoeller
|
* @author Juergen Hoeller
|
||||||
* @since 2.0
|
* @since 2.0
|
||||||
* @see commonj.work.Work
|
* @deprecated as of 5.1, in favor of EE 7's
|
||||||
* @see java.lang.Runnable
|
* {@link org.springframework.scheduling.concurrent.DefaultManagedTaskExecutor}
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public class DelegatingWork implements Work {
|
public class DelegatingWork implements Work {
|
||||||
|
|
||||||
private final Runnable delegate;
|
private final Runnable delegate;
|
||||||
|
|
|
||||||
|
|
@ -36,10 +36,10 @@ import org.springframework.lang.Nullable;
|
||||||
*
|
*
|
||||||
* @author Juergen Hoeller
|
* @author Juergen Hoeller
|
||||||
* @since 2.0
|
* @since 2.0
|
||||||
* @see commonj.timers.TimerListener
|
* @deprecated as of 5.1, in favor of EE 7's
|
||||||
* @see commonj.timers.TimerManager#schedule(commonj.timers.TimerListener, long, long)
|
* {@link org.springframework.scheduling.concurrent.DefaultManagedTaskScheduler}
|
||||||
* @see commonj.timers.TimerManager#scheduleAtFixedRate(commonj.timers.TimerListener, long, long)
|
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public class ScheduledTimerListener {
|
public class ScheduledTimerListener {
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,10 @@ import org.springframework.util.Assert;
|
||||||
* @author Juergen Hoeller
|
* @author Juergen Hoeller
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
* @see commonj.timers.TimerManager
|
* @see commonj.timers.TimerManager
|
||||||
|
* @deprecated as of 5.1, in favor of EE 7's
|
||||||
|
* {@link org.springframework.scheduling.concurrent.DefaultManagedTaskScheduler}
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public abstract class TimerManagerAccessor extends JndiLocatorSupport
|
public abstract class TimerManagerAccessor extends JndiLocatorSupport
|
||||||
implements InitializingBean, DisposableBean, Lifecycle {
|
implements InitializingBean, DisposableBean, Lifecycle {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,10 @@ import org.springframework.lang.Nullable;
|
||||||
* @see ScheduledTimerListener
|
* @see ScheduledTimerListener
|
||||||
* @see commonj.timers.TimerManager
|
* @see commonj.timers.TimerManager
|
||||||
* @see commonj.timers.TimerListener
|
* @see commonj.timers.TimerListener
|
||||||
|
* @deprecated as of 5.1, in favor of EE 7's
|
||||||
|
* {@link org.springframework.scheduling.concurrent.DefaultManagedTaskScheduler}
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public class TimerManagerFactoryBean extends TimerManagerAccessor
|
public class TimerManagerFactoryBean extends TimerManagerAccessor
|
||||||
implements FactoryBean<TimerManager>, InitializingBean, DisposableBean, Lifecycle {
|
implements FactoryBean<TimerManager>, InitializingBean, DisposableBean, Lifecycle {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,10 @@ import org.springframework.util.ErrorHandler;
|
||||||
* @author Juergen Hoeller
|
* @author Juergen Hoeller
|
||||||
* @author Mark Fisher
|
* @author Mark Fisher
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
|
* @deprecated as of 5.1, in favor of EE 7's
|
||||||
|
* {@link org.springframework.scheduling.concurrent.DefaultManagedTaskScheduler}
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public class TimerManagerTaskScheduler extends TimerManagerAccessor implements TaskScheduler {
|
public class TimerManagerTaskScheduler extends TimerManagerAccessor implements TaskScheduler {
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2017 the original author or authors.
|
* Copyright 2002-2018 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -63,7 +63,10 @@ import org.springframework.util.concurrent.ListenableFutureTask;
|
||||||
*
|
*
|
||||||
* @author Juergen Hoeller
|
* @author Juergen Hoeller
|
||||||
* @since 2.0
|
* @since 2.0
|
||||||
|
* @deprecated as of 5.1, in favor of EE 7's
|
||||||
|
* {@link org.springframework.scheduling.concurrent.DefaultManagedTaskExecutor}
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public class WorkManagerTaskExecutor extends JndiLocatorSupport
|
public class WorkManagerTaskExecutor extends JndiLocatorSupport
|
||||||
implements AsyncListenableTaskExecutor, SchedulingTaskExecutor, WorkManager, InitializingBean {
|
implements AsyncListenableTaskExecutor, SchedulingTaskExecutor, WorkManager, InitializingBean {
|
||||||
|
|
||||||
|
|
@ -195,14 +198,6 @@ public class WorkManagerTaskExecutor extends JndiLocatorSupport
|
||||||
return future;
|
return future;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* This task executor prefers short-lived work units.
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public boolean prefersShortLivedTasks() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
// Implementation of the CommonJ WorkManager interface
|
// Implementation of the CommonJ WorkManager interface
|
||||||
|
|
|
||||||
|
|
@ -294,7 +294,7 @@ public class SchedulerFactoryBean extends SchedulerAccessor implements FactoryBe
|
||||||
* @see #setQuartzProperties
|
* @see #setQuartzProperties
|
||||||
* @see LocalTaskExecutorThreadPool
|
* @see LocalTaskExecutorThreadPool
|
||||||
* @see org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor
|
* @see org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor
|
||||||
* @see org.springframework.scheduling.commonj.WorkManagerTaskExecutor
|
* @see org.springframework.scheduling.concurrent.DefaultManagedTaskExecutor
|
||||||
*/
|
*/
|
||||||
public void setTaskExecutor(Executor taskExecutor) {
|
public void setTaskExecutor(Executor taskExecutor) {
|
||||||
this.taskExecutor = taskExecutor;
|
this.taskExecutor = taskExecutor;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue