mirror of
https://gitee.com/mirrors/Spring-Cloud-Alibaba.git
synced 2021-06-26 13:25:11 +08:00
Use common execute service for all oss resource
This commit is contained in:
parent
572b13a0b3
commit
fdf8bda86b
@ -58,7 +58,8 @@ public class OssStorageResource implements WritableResource {
|
|||||||
private final URI location;
|
private final URI location;
|
||||||
private final boolean autoCreateFiles;
|
private final boolean autoCreateFiles;
|
||||||
|
|
||||||
private final ExecutorService executorService;
|
private static final ExecutorService executorService = new ThreadPoolExecutor(8, 128,
|
||||||
|
60, TimeUnit.SECONDS, new SynchronousQueue<>());
|
||||||
|
|
||||||
public OssStorageResource(OSS oss, String location) {
|
public OssStorageResource(OSS oss, String location) {
|
||||||
this(oss, location, false);
|
this(oss, location, false);
|
||||||
@ -86,9 +87,6 @@ public class OssStorageResource implements WritableResource {
|
|||||||
throw new IllegalArgumentException("Invalid location: " + location, e);
|
throw new IllegalArgumentException("Invalid location: " + location, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.executorService = new ThreadPoolExecutor(
|
|
||||||
1, 1, 60, TimeUnit.SECONDS,
|
|
||||||
new SynchronousQueue<>());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isAutoCreateFiles() {
|
public boolean isAutoCreateFiles() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user