1 /*
2 * Copyright 2013-2019 the original author or authors.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * https://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 package org.springframework.cloud.aws.autoconfigure.context.properties;
18
19 /**
20 * Properties related to S3 client behavior within the application
21 * {@link org.springframework.core.io.ResourceLoader}.
22 *
23 * @author Tom Gianos
24 * @since 2.0.2
25 * @see org.springframework.cloud.aws.autoconfigure.context.ContextResourceLoaderAutoConfiguration
26 */
27 public class AwsS3ResourceLoaderProperties {
28
29 /**
30 * The core pool size of the Task Executor used for parallel S3 interaction.
31 *
32 * @see org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor#setCorePoolSize(int)
33 */
34 private int corePoolSize = 1;
35
36 /**
37 * The maximum pool size of the Task Executor used for parallel S3 interaction.
38 *
39 * @see org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor#setMaxPoolSize(int)
40 */
41 private int maxPoolSize = Integer.MAX_VALUE;
42
43 /**
44 * The maximum queue capacity for backed up S3 requests.
45 *
46 * @see org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor#setQueueCapacity(int)
47 */
48 private int queueCapacity = Integer.MAX_VALUE;
49
50 public int getCorePoolSize() {
51 return this.corePoolSize;
52 }
53
54 public void setCorePoolSize(int corePoolSize) {
55 this.corePoolSize = corePoolSize;
56 }
57
58 public int getMaxPoolSize() {
59 return this.maxPoolSize;
60 }
61
62 public void setMaxPoolSize(int maxPoolSize) {
63 this.maxPoolSize = maxPoolSize;
64 }
65
66 public int getQueueCapacity() {
67 return this.queueCapacity;
68 }
69
70 public void setQueueCapacity(int queueCapacity) {
71 this.queueCapacity = queueCapacity;
72 }
73
74 }
75