private static MonitorFactoryInterface getMonitorFactory(final String label) { MonitorFactoryInterface factory = monitorFactories.get(label); if (factory == null) { factory = new FactoryEnabled(); monitorFactories.put(label, factory); } return factory; }
/** * Reset/remove all monitors. If the factory is disabled this method has no * action. */ public static void reset() { if (isEnabled()) enabledFactory = factory = new FactoryEnabled(); }
private static void init() { // enable the factory by default. boolean isKeySizeTrackingEnabled= (factory==null) ? false : factory.isTotalKeySizeTrackingEnabled(); factory = debugFactory = enabledFactory = new FactoryEnabled(); if (isKeySizeTrackingEnabled) { factory.enableTotalKeySizeTracking(); } disabledFactory = new FactoryDisabled(enabledFactory); setDebugEnabled(false); }
FactoryEnabled mf = new FactoryEnabled();