NebulaGraph Java Client  release-3.8
StoragePoolConfig.java
1 /* Copyright (c) 2020 vesoft inc. All rights reserved.
2  *
3  * This source code is licensed under Apache 2.0 License.
4  */
5 
6 package com.vesoft.nebula.client.storage;
7 
8 import com.vesoft.nebula.client.graph.data.SSLParam;
9 import java.io.Serializable;
10 
11 public class StoragePoolConfig implements Serializable {
12 
13  private static final long serialVersionUID = 8022858741090966149L;
14 
15  // The min connections in pool for all addresses
16  private int minConnsSize = 0;
17 
18  // The max connections in pool for all addresses
19  private int maxConnsSize = 10;
20 
21  // Socket timeout and Socket connection timeout, unit: millisecond
22  private int timeout = 0;
23 
24  // The idleTime of the connection, unit: millisecond
25  // The connection's idle time more than idleTime, it will be delete
26  // 0 means never delete
27  private int idleTime = 0;
28 
29  // the max total connection in pool for all key
30  private int maxTotal = 50;
31 
32  // the max total connection in pool for each key
33  private int maxTotalPerKey = 10;
34 
35  private boolean enableSSL = false;
36 
37  private SSLParam sslParam = null;
38 
39  public int getMinConnsSize() {
40  return minConnsSize;
41  }
42 
43  public void setMinConnsSize(int minConnsSize) {
44  this.minConnsSize = minConnsSize;
45  }
46 
47  public int getMaxConnsSize() {
48  return maxConnsSize;
49  }
50 
51  public void setMaxConnsSize(int maxConnsSize) {
52  this.maxConnsSize = maxConnsSize;
53  }
54 
55  public int getTimeout() {
56  return timeout;
57  }
58 
59  public void setTimeout(int timeout) {
60  this.timeout = timeout;
61  }
62 
63  public int getIdleTime() {
64  return idleTime;
65  }
66 
67  public void setIdleTime(int idleTime) {
68  this.idleTime = idleTime;
69  }
70 
71  public int getMaxTotal() {
72  return maxTotal;
73  }
74 
75  public void setMaxTotal(int maxTotal) {
76  this.maxTotal = maxTotal;
77  }
78 
79  public int getMaxTotalPerKey() {
80  return maxTotalPerKey;
81  }
82 
83  public void setMaxTotalPerKey(int maxTotalPerKey) {
84  this.maxTotalPerKey = maxTotalPerKey;
85  }
86 
87  public boolean isEnableSSL() {
88  return enableSSL;
89  }
90 
91  public void setEnableSSL(boolean enableSSL) {
92  this.enableSSL = enableSSL;
93  }
94 
95  public SSLParam getSslParam() {
96  return sslParam;
97  }
98 
99  public void setSslParam(SSLParam sslParam) {
100  this.sslParam = sslParam;
101  }
102 }