Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
haoban3.0
haoban-manage3.0
Commits
94fbc213
Commit
94fbc213
authored
Oct 29, 2024
by
王祖波
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
线程池
parent
f4a1601e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
ImageCombined.java
...haoban/manage/service/context/combined/ImageCombined.java
+5
-2
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/context/combined/ImageCombined.java
View file @
94fbc213
...
...
@@ -5,6 +5,7 @@ import com.ctrip.framework.apollo.ConfigChangeListener;
import
com.ctrip.framework.apollo.ConfigService
;
import
com.ctrip.framework.apollo.model.ConfigChange
;
import
com.ctrip.framework.apollo.model.ConfigChangeEvent
;
import
com.gic.commons.util.TraceIdUtil
;
import
com.gic.haoban.manage.api.qdto.combined.CombinedQDTO
;
import
com.gic.haoban.manage.service.util.ApolloUtils
;
import
com.github.benmanes.caffeine.cache.Cache
;
...
...
@@ -47,8 +48,8 @@ public class ImageCombined {
.
build
();
public
static
final
ThreadPoolExecutor
EXECUTOR
=
new
ThreadPoolExecutor
(
20
,
40
,
ApolloUtils
.
combinedCorePoolSize
()
,
ApolloUtils
.
combinedMaximumPoolSize
()
,
60L
,
TimeUnit
.
SECONDS
,
new
ArrayBlockingQueue
<>(
40
),
...
...
@@ -59,6 +60,7 @@ public class ImageCombined {
if
(!
StringUtils
.
equals
(
changeEvent
.
getNamespace
(),
APPLICATION
))
{
return
;
}
TraceIdUtil
.
traceBegin
(
TraceIdUtil
.
EntranceType
.
QUARTZ
);
ConfigChange
combinedCorePoolSizeChange
=
changeEvent
.
getChange
(
"combinedCorePoolSize"
);
ConfigChange
combinedMaximumPoolSizeChange
=
changeEvent
.
getChange
(
"combinedMaximumPoolSize"
);
if
((
combinedCorePoolSizeChange
!=
null
&&
combinedCorePoolSizeChange
.
getNewValue
()
!=
null
)
...
...
@@ -69,6 +71,7 @@ public class ImageCombined {
EXECUTOR
.
setCorePoolSize
(
corePoolSize
);
EXECUTOR
.
setMaximumPoolSize
(
maximumPoolSize
);
}
TraceIdUtil
.
traceEnd
();
}
public
static
final
String
IMAGE_REDIS_KEY
=
"haoban-manage3-service:combined_image:"
;
...
...
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