MCPcopy Create free account
hub / github.com/e2wugui/zeze / Config

Class Config

ZezeJava/ZezeJava/src/main/java/Zeze/Config.java:30–1125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28import org.w3c.dom.NodeList;
29
30public final class Config {
31 public interface ICustomize {
32 @NotNull String getName();
33
34 void parse(@NotNull Element self);
35 }
36
37 public enum DbType {
38 Memory,
39 MySql,
40 SqlServer,
41 Tikv,
42 RocksDb,
43 DynamoDb,
44 Dbh2,
45 Redis,
46 }
47
48 private @NotNull String name = "";
49 private int scheduledThreads;
50 private int workerThreads;
51 private int completionPortThreads;
52 private int checkpointPeriod = 60000;
53 private @NotNull CheckpointFlushMode checkpointFlushMode = CheckpointFlushMode.MultiThreadMerge;
54 private int checkpointModeTableFlushSetCount = 50;
55 private @NotNull CheckpointMode checkpointMode = CheckpointMode.Table;
56 private @NotNull Level processReturnErrorLogLevel = Level.INFO;
57 private int serverId;
58 private boolean noDatabase = false;
59 private @NotNull String globalCacheManagerHostNameOrAddress = "";
60
61 private @NotNull String serviceManager = ""; // ""|"raft"|"disable", default: enable service manager
62 // raft:本来可以直接在这里配置raftXmlFile。但是,
63 // 1. 文件名名字空间属于自定义的,不污染这里了,
64 // 2. 这里定义服务类型,raft配置可以留在文件中,
65 // 3. raft配置,service配置可以共存,这里配置选择方式。
66 // end serviceManager
67
68 // 分成多行配置,支持多HostNameOrAddress或者多raft.xml。
69 // 多行的时候,所有服务器的顺序必须保持一致。
70 // 为了保持原来接口不变,多行会被编码成一个string保存到GlobalCacheManagerHostNameOrAddress中。
71 public GlobalCacheManagersConf globalCacheManagers;
72 public ServiceManagerConf serviceManagerConf;
73
74 private int globalCacheManagerPort;
75 private final ConcurrentHashMap<String, TableConf> tableConfMap = new ConcurrentHashMap<>();
76 private TableConf defaultTableConf;
77 private boolean allowReadWhenRecordNotAccessed = true;
78 private boolean allowSchemasReuseVariableIdWithSameType = true;
79 private boolean fastRedoWhenConflict = false;
80 private final ConcurrentHashMap<String, Element> customizes = new ConcurrentHashMap<>();
81 private boolean autoResetTable = false;
82 private final ConcurrentHashMap<String, DatabaseConf> databaseConfMap = new ConcurrentHashMap<>();
83 private final ConcurrentHashMap<String, ServiceConf> serviceConfMap = new ConcurrentHashMap<>();
84 private @NotNull ServiceConf defaultServiceConf = new ServiceConf();
85
86 private int onlineLogoutDelay = 60_000; // 1 minute
87

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected