Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
爱吃血肠
spring-framework
提交
facf31f0
S
spring-framework
项目概览
爱吃血肠
/
spring-framework
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
spring-framework
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
facf31f0
编写于
9月 02, 2013
作者:
J
Juergen Hoeller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Javadoc fixes
上级
e8c0ef83
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
14 addition
and
18 deletion
+14
-18
spring-context/src/main/java/org/springframework/scheduling/concurrent/ExecutorConfigurationSupport.java
...k/scheduling/concurrent/ExecutorConfigurationSupport.java
+5
-5
spring-context/src/main/java/org/springframework/scheduling/concurrent/ScheduledExecutorFactoryBean.java
...k/scheduling/concurrent/ScheduledExecutorFactoryBean.java
+8
-7
spring-context/src/main/java/org/springframework/scheduling/concurrent/ThreadPoolExecutorFactoryBean.java
.../scheduling/concurrent/ThreadPoolExecutorFactoryBean.java
+1
-6
未找到文件。
spring-context/src/main/java/org/springframework/scheduling/concurrent/ExecutorConfigurationSupport.java
浏览文件 @
facf31f0
...
...
@@ -63,8 +63,8 @@ public abstract class ExecutorConfigurationSupport extends CustomizableThreadFac
/**
* Set the ThreadFactory to use for the
ThreadPoolExecutor
's thread pool.
* Default is the
ThreadPoolExecutor
's default thread factory.
* Set the ThreadFactory to use for the
ExecutorService
's thread pool.
* Default is the
underlying ExecutorService
's default thread factory.
* <p>In a Java EE 7 or other managed environment with JSR-236 support,
* consider specifying a JNDI-located ManagedThreadFactory: by default,
* to be found at "java:comp/env/concurrent/tf/DefaultThreadFactory".
...
...
@@ -83,8 +83,8 @@ public abstract class ExecutorConfigurationSupport extends CustomizableThreadFac
}
/**
* Set the RejectedExecutionHandler to use for the
ThreadPoolExecutor
.
* Default is the
ThreadPoolExecutor
's default abort policy.
* Set the RejectedExecutionHandler to use for the
ExecutorService
.
* Default is the
ExecutorService
's default abort policy.
* @see java.util.concurrent.ThreadPoolExecutor.AbortPolicy
*/
public
void
setRejectedExecutionHandler
(
RejectedExecutionHandler
rejectedExecutionHandler
)
{
...
...
@@ -189,7 +189,7 @@ public abstract class ExecutorConfigurationSupport extends CustomizableThreadFac
}
/**
* Perform a shutdown on the
ThreadPoolExecutor
.
* Perform a shutdown on the
underlying ExecutorService
.
* @see java.util.concurrent.ExecutorService#shutdown()
* @see java.util.concurrent.ExecutorService#shutdownNow()
* @see #awaitTerminationIfNecessary()
...
...
spring-context/src/main/java/org/springframework/scheduling/concurrent/ScheduledExecutorFactoryBean.java
浏览文件 @
facf31f0
/*
* Copyright 2002-201
2
the original author or authors.
* Copyright 2002-201
3
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.
...
...
@@ -37,9 +37,10 @@ import org.springframework.util.ObjectUtils;
*
* <p>Allows for registration of {@link ScheduledExecutorTask ScheduledExecutorTasks},
* automatically starting the {@link ScheduledExecutorService} on initialization and
* cancelling it on destruction of the context. In scenarios that
just
require static
* cancelling it on destruction of the context. In scenarios that
only
require static
* registration of tasks at startup, there is no need to access the
* {@link ScheduledExecutorService} instance itself in application code.
* {@link ScheduledExecutorService} instance itself in application code at all;
* ScheduledExecutorFactoryBean is then just being used for lifecycle integration.
*
* <p>Note that {@link java.util.concurrent.ScheduledExecutorService}
* uses a {@link Runnable} instance that is shared between repeated executions,
...
...
@@ -92,7 +93,7 @@ public class ScheduledExecutorFactoryBean extends ExecutorConfigurationSupport
* @see java.util.concurrent.ScheduledExecutorService#scheduleWithFixedDelay(java.lang.Runnable, long, long, java.util.concurrent.TimeUnit)
* @see java.util.concurrent.ScheduledExecutorService#scheduleAtFixedRate(java.lang.Runnable, long, long, java.util.concurrent.TimeUnit)
*/
public
void
setScheduledExecutorTasks
(
ScheduledExecutorTask
[]
scheduledExecutorTasks
)
{
public
void
setScheduledExecutorTasks
(
ScheduledExecutorTask
...
scheduledExecutorTasks
)
{
this
.
scheduledExecutorTasks
=
scheduledExecutorTasks
;
}
...
...
@@ -193,9 +194,9 @@ public class ScheduledExecutorFactoryBean extends ExecutorConfigurationSupport
* @return the actual Runnable to schedule (may be a decorator)
*/
protected
Runnable
getRunnableToSchedule
(
ScheduledExecutorTask
task
)
{
return
this
.
continueScheduledExecutionAfterException
?
new
DelegatingErrorHandlingRunnable
(
task
.
getRunnable
(),
TaskUtils
.
LOG_AND_SUPPRESS_ERROR_HANDLER
)
:
new
DelegatingErrorHandlingRunnable
(
task
.
getRunnable
(),
TaskUtils
.
LOG_AND_PROPAGATE_ERROR_HANDLER
);
return
(
this
.
continueScheduledExecutionAfterException
?
new
DelegatingErrorHandlingRunnable
(
task
.
getRunnable
(),
TaskUtils
.
LOG_AND_SUPPRESS_ERROR_HANDLER
)
:
new
DelegatingErrorHandlingRunnable
(
task
.
getRunnable
(),
TaskUtils
.
LOG_AND_PROPAGATE_ERROR_HANDLER
)
);
}
...
...
spring-context/src/main/java/org/springframework/scheduling/concurrent/ThreadPoolExecutorFactoryBean.java
浏览文件 @
facf31f0
...
...
@@ -71,7 +71,6 @@ public class ThreadPoolExecutorFactoryBean extends ExecutorConfigurationSupport
/**
* Set the ThreadPoolExecutor's core pool size.
* Default is 1.
* <p><b>This setting can be modified at runtime, for example through JMX.</b>
*/
public
void
setCorePoolSize
(
int
corePoolSize
)
{
this
.
corePoolSize
=
corePoolSize
;
...
...
@@ -80,7 +79,6 @@ public class ThreadPoolExecutorFactoryBean extends ExecutorConfigurationSupport
/**
* Set the ThreadPoolExecutor's maximum pool size.
* Default is {@code Integer.MAX_VALUE}.
* <p><b>This setting can be modified at runtime, for example through JMX.</b>
*/
public
void
setMaxPoolSize
(
int
maxPoolSize
)
{
this
.
maxPoolSize
=
maxPoolSize
;
...
...
@@ -89,7 +87,6 @@ public class ThreadPoolExecutorFactoryBean extends ExecutorConfigurationSupport
/**
* Set the ThreadPoolExecutor's keep-alive seconds.
* Default is 60.
* <p><b>This setting can be modified at runtime, for example through JMX.</b>
*/
public
void
setKeepAliveSeconds
(
int
keepAliveSeconds
)
{
this
.
keepAliveSeconds
=
keepAliveSeconds
;
...
...
@@ -99,9 +96,7 @@ public class ThreadPoolExecutorFactoryBean extends ExecutorConfigurationSupport
* Specify whether to allow core threads to time out. This enables dynamic
* growing and shrinking even in combination with a non-zero queue (since
* the max pool size will only grow once the queue is full).
* <p>Default is "false". Note that this feature is only available on Java 6
* or above. On Java 5, consider switching to the backport-concurrent
* version of ThreadPoolTaskExecutor which also supports this feature.
* <p>Default is "false".
* @see java.util.concurrent.ThreadPoolExecutor#allowCoreThreadTimeOut(boolean)
*/
public
void
setAllowCoreThreadTimeOut
(
boolean
allowCoreThreadTimeOut
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录