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

Method parse

ZezeJava/ZezeJava/src/main/java/Zeze/Config.java:521–701  ·  view source on GitHub ↗
(@NotNull Element self)

Source from the content-addressed store, hash-verified

519 }
520
521 public void parse(@NotNull Element self) {
522 if (!self.getNodeName().equals("zeze"))
523 throw new IllegalStateException("is it a zeze config?");
524
525 name = self.getAttribute("name").trim();
526
527 String attr = self.getAttribute("CheckpointPeriod");
528 if (!attr.isBlank())
529 checkpointPeriod = Integer.parseInt(attr);
530
531 attr = self.getAttribute("CheckpointTransactionPeriod");
532 if (!attr.isBlank())
533 checkpointTransactionPeriod = Integer.parseInt(attr);
534
535 attr = self.getAttribute("ServerId");
536 if (!attr.isBlank())
537 serverId = Integer.parseInt(attr);
538
539 noDatabase = self.getAttribute("NoDatabase").trim().equalsIgnoreCase("true");
540
541 globalCacheManagerHostNameOrAddress = self.getAttribute("GlobalCacheManagerHostNameOrAddress").trim();
542
543 attr = self.getAttribute("GlobalCacheManagerPort");
544 if (!attr.isBlank())
545 globalCacheManagerPort = Integer.parseInt(attr);
546
547 attr = self.getAttribute("OnlineLogoutDelay");
548 if (!attr.isBlank())
549 onlineLogoutDelay = Integer.parseInt(attr);
550
551 attr = self.getAttribute("CheckpointModeTableFlushSetCount");
552 if (!attr.isBlank())
553 checkpointModeTableFlushSetCount = Integer.parseInt(attr);
554
555 attr = self.getAttribute("ProcessReturnErrorLogLevel");
556 if (!attr.isBlank())
557 setProcessReturnErrorLogLevel(Level.toLevel(attr));
558
559 attr = self.getAttribute("WorkerThreads");
560 if (!attr.isBlank())
561 workerThreads = Integer.parseInt(attr);
562
563 attr = self.getAttribute("ScheduledThreads");
564 if (!attr.isBlank())
565 scheduledThreads = Integer.parseInt(attr);
566
567 attr = self.getAttribute("CompletionPortThreads");
568 if (!attr.isBlank())
569 completionPortThreads = Integer.parseInt(attr);
570
571 attr = self.getAttribute("AllowReadWhenRecordNotAccessed");
572 allowReadWhenRecordNotAccessed = attr.isBlank() || Boolean.parseBoolean(attr);
573
574 attr = self.getAttribute("AllowSchemasReuseVariableIdWithSameType");
575 allowSchemasReuseVariableIdWithSameType = attr.isBlank() || Boolean.parseBoolean(attr);
576
577 attr = self.getAttribute("FastRedoWhenConflict");
578 fastRedoWhenConflict = attr.isBlank() || Boolean.parseBoolean(attr);

Callers 1

loadAndParseMethod · 0.95

Calls 13

setCheckpointModeMethod · 0.95
parseVersionMethod · 0.95
trimMethod · 0.80
parseIntMethod · 0.80
parseLongMethod · 0.80
setPropertyMethod · 0.80
equalsMethod · 0.65
isEmptyMethod · 0.65
putIfAbsentMethod · 0.65
getLengthMethod · 0.45

Tested by

no test coverage detected