NebulaGraph Java Client  release-3.8
SessionsManagerConfig.java
1 /* Copyright (c) 2021 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.graph;
7 
8 import com.vesoft.nebula.client.graph.data.HostAddress;
9 import com.vesoft.nebula.client.graph.net.NebulaPool;
10 import java.io.Serializable;
11 import java.util.ArrayList;
12 import java.util.List;
13 
14 public class SessionsManagerConfig implements Serializable {
15 
16  private static final long serialVersionUID = -2460063747630193912L;
17 
18  // graphd addresses
19  private List<HostAddress> addresses = new ArrayList<>();
20 
21  // the userName to authenticate graph
22  private String userName = "root";
23 
24  // the password to authenticate graph
25  private String password = "nebula";
26 
27  // the space name
28  private String spaceName = "";
29 
30  // the session needs do reconnect
31  private Boolean reconnect = true;
32 
33  // The config of NebulaConfig
34  private NebulaPoolConfig poolConfig = new NebulaPoolConfig();
35 
36  public List<HostAddress> getAddresses() {
37  return addresses;
38  }
39 
40  public SessionsManagerConfig setAddresses(List<HostAddress> addresses) {
41  this.addresses = addresses;
42  return this;
43  }
44 
45  public String getUserName() {
46  return userName;
47  }
48 
49  public SessionsManagerConfig setUserName(String userName) {
50  this.userName = userName;
51  return this;
52  }
53 
54  public String getPassword() {
55  return password;
56  }
57 
58  public SessionsManagerConfig setPassword(String password) {
59  this.password = password;
60  return this;
61  }
62 
63  public String getSpaceName() {
64  return spaceName;
65  }
66 
67  public SessionsManagerConfig setSpaceName(String spaceName) {
68  this.spaceName = spaceName;
69  return this;
70  }
71 
72  public Boolean getReconnect() {
73  return reconnect;
74  }
75 
76  public void setReconnect(Boolean reconnect) {
77  this.reconnect = reconnect;
78  }
79 
80  public NebulaPoolConfig getPoolConfig() {
81  return poolConfig;
82  }
83 
84  public SessionsManagerConfig setPoolConfig(NebulaPoolConfig poolConfig) {
85  this.poolConfig = poolConfig;
86  return this;
87  }
88 }