diff --git a/shiroha-server/src/main/java/io/nanachiyo0721/shiroha/utils/profiling/RegionScheduleProfilerManager.java b/shiroha-server/src/main/java/io/nanachiyo0721/shiroha/utils/profiling/RegionScheduleProfilerManager.java index 281f6bc..cbc28ba 100644 --- a/shiroha-server/src/main/java/io/nanachiyo0721/shiroha/utils/profiling/RegionScheduleProfilerManager.java +++ b/shiroha-server/src/main/java/io/nanachiyo0721/shiroha/utils/profiling/RegionScheduleProfilerManager.java @@ -33,7 +33,7 @@ public class RegionScheduleProfilerManager { private static final Path PROFILER_FOLDER = Path.of("./shiroha_profiler"); private static final Pattern SESSION_FOLDER_PATTERN = Pattern.compile("session-([1-9]\\d*)"); - private final Map registereddProfilers = new ConcurrentHashMap<>(); + private final Map registeredProfilers = new ConcurrentHashMap<>(); private final OpThread opThread = new OpThread(); // note: following fields are managed by the OpThread @@ -154,7 +154,7 @@ public class RegionScheduleProfilerManager { return; } - for (RegionScheduleProfiler profiler : this.registereddProfilers.values()) { + for (RegionScheduleProfiler profiler : this.registeredProfilers.values()) { profiler.toggle(false); } } @@ -187,7 +187,7 @@ public class RegionScheduleProfilerManager { private Throwable stopActiveProfiling() { for (long id : this.lastProfilingIds) { - final RegionScheduleProfiler profiler = this.registereddProfilers.get(id); + final RegionScheduleProfiler profiler = this.registeredProfilers.get(id); // may be it was death, so no need to warn if (profiler == null) { @@ -295,7 +295,7 @@ public class RegionScheduleProfilerManager { } // check for existence - final RegionScheduleProfiler profiler = this.registereddProfilers.get(regionId); + final RegionScheduleProfiler profiler = this.registeredProfilers.get(regionId); if (profiler == null) { callback.completeExceptionally(new IllegalArgumentException("No registered region profiler with id " + regionId)); return; @@ -429,7 +429,7 @@ public class RegionScheduleProfilerManager { public RegionScheduleProfiler register(long id) { RegionScheduleProfiler ret = new RegionScheduleProfiler(id); - if (this.registereddProfilers.putIfAbsent(id, ret) != null) { + if (this.registeredProfilers.putIfAbsent(id, ret) != null) { throw new IllegalStateException("Already registed profiler for region of id " + id + "!"); } @@ -437,7 +437,7 @@ public class RegionScheduleProfilerManager { } public void deRegister(long id) { - this.registereddProfilers.remove(id); + this.registeredProfilers.remove(id); } public CompletableFuture export(