示例#1
0
 public RegistryInitializer(Registry registry, boolean enableJmxLogging) {
   this.registry = registry;
   Spectator.globalRegistry().add(registry);
   if (enableJmxLogging) {
     Jmx.registerStandardMXBeans(registry);
   }
   gcLogger = new GcLogger();
   gcLogger.start(null);
 }
示例#2
0
 @PreDestroy
 public void destroy() {
   gcLogger.stop();
   Spectator.globalRegistry().remove(registry);
 }