/** * Lazily initialize this module if not done so yet. */ private void initialize(String name) { if (initialized) return; synchronized(this) { if(!initialized) { // if we are preparing, we should just not initiate initialization. if (module.getState().equals(ModuleState.PREPARING)) { return; } initialized = true; module.start(); // remember who started us to assist debugging. initializerThread = Thread.currentThread().getStackTrace(); initializerClassName = name; } } }
/** * Lazily initialize this module if not done so yet. */ private void initialize(String name) { if (initialized) return; synchronized(this) { if(!initialized) { // if we are preparing, we should just not initiate initialization. if (module.getState().equals(ModuleState.PREPARING)) { return; } initialized = true; module.start(); // remember who started us to assist debugging. initializerThread = Thread.currentThread().getStackTrace(); initializerClassName = name; } } }