Bläddra i källkod

remove deprecated methods

Shinsuke Sugaya 7 år sedan
förälder
incheckning
359d98b080
1 ändrade filer med 7 tillägg och 7 borttagningar
  1. 7 7
      src/main/java/org/codelibs/fess/timer/SystemMonitorTarget.java

+ 7 - 7
src/main/java/org/codelibs/fess/timer/SystemMonitorTarget.java

@@ -90,14 +90,14 @@ public class SystemMonitorTarget implements TimeoutTarget {
         final Mem mem = jvmStats.getMem();
         final Mem mem = jvmStats.getMem();
         buf.append("\"memory\":{");
         buf.append("\"memory\":{");
         buf.append("\"heap\":{");
         buf.append("\"heap\":{");
-        append(buf, "used", () -> mem.getHeapUsed().bytesAsInt()).append(',');
-        append(buf, "committed", () -> mem.getHeapCommitted().bytesAsInt()).append(',');
-        append(buf, "max", () -> mem.getHeapMax().bytesAsInt()).append(',');
+        append(buf, "used", () -> mem.getHeapUsed().getBytes()).append(',');
+        append(buf, "committed", () -> mem.getHeapCommitted().getBytes()).append(',');
+        append(buf, "max", () -> mem.getHeapMax().getBytes()).append(',');
         append(buf, "percent", () -> mem.getHeapUsedPercent());
         append(buf, "percent", () -> mem.getHeapUsedPercent());
         buf.append("},");
         buf.append("},");
         buf.append("\"non_heap\":{");
         buf.append("\"non_heap\":{");
-        append(buf, "used", () -> mem.getNonHeapUsed().bytesAsInt()).append(',');
-        append(buf, "committed", () -> mem.getNonHeapCommitted().bytesAsInt());
+        append(buf, "used", () -> mem.getNonHeapUsed().getBytes()).append(',');
+        append(buf, "committed", () -> mem.getNonHeapCommitted().getBytes());
         buf.append('}');
         buf.append('}');
         buf.append("},");
         buf.append("},");
         final List<BufferPool> bufferPools = jvmStats.getBufferPools();
         final List<BufferPool> bufferPools = jvmStats.getBufferPools();
@@ -106,8 +106,8 @@ public class SystemMonitorTarget implements TimeoutTarget {
             final StringBuilder b = new StringBuilder();
             final StringBuilder b = new StringBuilder();
             b.append('"').append(StringEscapeUtils.escapeJson(p.getName())).append("\":{");
             b.append('"').append(StringEscapeUtils.escapeJson(p.getName())).append("\":{");
             append(b, "count", () -> p.getCount()).append(',');
             append(b, "count", () -> p.getCount()).append(',');
-            append(b, "used", () -> p.getUsed().bytesAsInt()).append(',');
-            append(b, "capacity", () -> p.getTotalCapacity().bytesAsInt()).append('}');
+            append(b, "used", () -> p.getUsed().getBytes()).append(',');
+            append(b, "capacity", () -> p.getTotalCapacity().getBytes()).append('}');
             return b.toString();
             return b.toString();
         }).collect(Collectors.joining(",")));
         }).collect(Collectors.joining(",")));
         buf.append("},");
         buf.append("},");