コード例 #1
0
 @ManagedOperation(
     description = "Dumps the current cache statistic values to a file",
     displayName = "Dump cache Statistics to file")
 public final void dumpStatisticToFile(@Parameter(description = "The file path") String filePath)
     throws IOException {
   PrintStream stream = null;
   try {
     stream = new PrintStream(new File(filePath));
     cacheStatisticManager.dumpCacheStatisticsTo(stream);
   } finally {
     if (stream != null) {
       stream.close();
     }
   }
 }
コード例 #2
0
 @ManagedOperation(
     description = "Dumps the current cache statistic values to System.out",
     displayName = "Dump Cache Statistics to System.out")
 public final void dumpStatisticsToSystemOut() {
   cacheStatisticManager.dumpCacheStatisticsTo(System.out);
 }