Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
Y
yzg-util
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
YZG
yzg-util
Commits
95ec0538
Commit
95ec0538
authored
May 07, 2019
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
消除成功接收处理
parent
8309c227
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
RunExecute.java
...src/main/java/com/yanzuoguang/util/thread/RunExecute.java
+3
-0
ThreadList.java
...src/main/java/com/yanzuoguang/util/thread/ThreadList.java
+3
-0
No files found.
yzg-util-base/src/main/java/com/yanzuoguang/util/thread/RunExecute.java
View file @
95ec0538
...
@@ -4,6 +4,8 @@ import com.yanzuoguang.util.helper.EventRun;
...
@@ -4,6 +4,8 @@ import com.yanzuoguang.util.helper.EventRun;
/**
/**
* Runnable时间触发处理器
* Runnable时间触发处理器
*
* @author 颜佐光
*/
*/
public
class
RunExecute
implements
EventRun
<
Runnable
>
{
public
class
RunExecute
implements
EventRun
<
Runnable
>
{
/**
/**
...
@@ -12,6 +14,7 @@ public class RunExecute implements EventRun<Runnable> {
...
@@ -12,6 +14,7 @@ public class RunExecute implements EventRun<Runnable> {
* @param t 接口 需要执行的对象
* @param t 接口 需要执行的对象
* @throws Exception 跑出异常
* @throws Exception 跑出异常
*/
*/
@Override
public
void
Execute
(
Runnable
t
)
{
public
void
Execute
(
Runnable
t
)
{
t
.
run
();
t
.
run
();
}
}
...
...
yzg-util-base/src/main/java/com/yanzuoguang/util/thread/ThreadList.java
View file @
95ec0538
...
@@ -212,6 +212,7 @@ public abstract class ThreadList<T extends Object> implements ThreadWaitExecute
...
@@ -212,6 +212,7 @@ public abstract class ThreadList<T extends Object> implements ThreadWaitExecute
*
*
* @return
* @return
*/
*/
@Override
public
boolean
isFinally
()
{
public
boolean
isFinally
()
{
if
(
this
.
isWait
())
{
if
(
this
.
isWait
())
{
return
false
;
return
false
;
...
@@ -227,6 +228,7 @@ public abstract class ThreadList<T extends Object> implements ThreadWaitExecute
...
@@ -227,6 +228,7 @@ public abstract class ThreadList<T extends Object> implements ThreadWaitExecute
*
*
* @description
* @description
*/
*/
@Override
public
void
printStatus
()
{
public
void
printStatus
()
{
int
size
=
cache
.
size
()
+
cacheThread
.
size
();
int
size
=
cache
.
size
()
+
cacheThread
.
size
();
String
str
=
String
.
format
(
"%s 已处理: %d 错误: %d 剩余: %d 后暂停"
,
DateHelper
.
getNow
(),
String
str
=
String
.
format
(
"%s 已处理: %d 错误: %d 剩余: %d 后暂停"
,
DateHelper
.
getNow
(),
...
@@ -239,6 +241,7 @@ public abstract class ThreadList<T extends Object> implements ThreadWaitExecute
...
@@ -239,6 +241,7 @@ public abstract class ThreadList<T extends Object> implements ThreadWaitExecute
*
*
* @return
* @return
*/
*/
@Override
public
int
printTimeout
()
{
public
int
printTimeout
()
{
return
PrintTimeout
;
return
PrintTimeout
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment