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