content: /*
   *
   * Licensed to the Apache Software Foundation (ASF) under one or more
   * contributor license agreements.  See the NOTICE file distributed with
   * this work for additional information regarding copyright ownership.
   * The ASF licenses this file to You under the Apache License, Version 2.0
   * (the "License"); you may not use this file except in compliance with
   * the License.  You may obtain a copy of the License at
   *
   *     http://www.apache.org/licenses/LICENSE-2.0
   *
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   * See the License for the specific language governing permissions and
   * limitations under the License.
   *
   */
  package com.alibaba.cloudapp.starter.base.properties;
  
  import org.springframework.boot.context.properties.ConfigurationProperties;
  
  
  @ConfigurationProperties(prefix = ThreadPoolProperties.BINDING_PROP_KEY)
  public class ThreadPoolProperties extends RefreshableProperties {
      public static final String BINDING_PROP_KEY = "io.cloudapp.base.threadpool";
      
      private int corePoolSize = 2;
  
      private int maximumPoolSize = 10;
  
      private int keepAliveSeconds = 5;
  
      private int queueCapacity = 100;
  
      private String threadNamePrefix = "Base";
  
      private long awaitTerminationSeconds = 1;
  
      private boolean allowCoreThreadTimeOut = true;
  
  
  
      public int getCorePoolSize() {
          return corePoolSize;
      }
  
      public void setCorePoolSize(int corePoolSize) {
          this.corePoolSize = corePoolSize;
      }
  
      public int getMaximumPoolSize() {
          return maximumPoolSize;
      }
  
      public void setMaximumPoolSize(int maximumPoolSize) {
          this.maximumPoolSize = maximumPoolSize;
      }
  
      public int getKeepAliveSeconds() {
          return keepAliveSeconds;
      }
  
  
      public void setKeepAliveSeconds(int keepAliveSeconds) {
          this.keepAliveSeconds = keepAliveSeconds;
      }
  
      public int getQueueCapacity() {
          return queueCapacity;
      }
  
      public void setQueueCapacity(int queueCapacity) {
          this.queueCapacity = queueCapacity;
      }
  
      public String getThreadNamePrefix() {
          return threadNamePrefix;
      }
  
      public void setThreadNamePrefix(String threadNamePrefix) {
          this.threadNamePrefix = threadNamePrefix;
      }
  
      public long getAwaitTerminationSeconds() {
          return awaitTerminationSeconds;
      }
  
      public void setAwaitTerminationSeconds(long awaitTerminationSeconds) {
          this.awaitTerminationSeconds = awaitTerminationSeconds;
      }
  
      public boolean isAllowCoreThreadTimeOut() {
          return allowCoreThreadTimeOut;
      }
  
      public void setAllowCoreThreadTimeOut(boolean allowCoreThreadTimeOut) {
          this.allowCoreThreadTimeOut = allowCoreThreadTimeOut;
      }
  }
  