MCPcopy Index your code
hub / github.com/dianping/cat / initialize

Method initialize

cat-client/src/main/java/com/dianping/cat/Cat.java:182–209  ·  view source on GitHub ↗
(ClientConfig config)

Source from the content-addressed store, hash-verified

180
181 // this should be called during application initializing
182 public static void initialize(ClientConfig config) {
183 try {
184 if (!s_initialized.get()) {
185 synchronized (s_instance) {
186 if (!s_initialized.get()) {
187 PlexusContainer container = ContainerLoader.getDefaultContainer();
188 ClientConfigManager manager = container.lookup(ClientConfigManager.class);
189
190 manager.initialize(config);
191
192 ModuleContext ctx = new DefaultModuleContext(container);
193 Module module = ctx.lookup(Module.class, CatClientModule.ID);
194
195 if (!module.isInitialized()) {
196 ModuleInitializer initializer = ctx.lookup(ModuleInitializer.class);
197
198 initializer.execute(ctx, module);
199 }
200
201 log("INFO", "Cat is lazy initialized!");
202 s_initialized.set(true);
203 }
204 }
205 }
206 } catch (Exception e) {
207 errorHandler(e);
208 }
209 }
210
211 public static void initialize(File configFile) {
212 try {

Callers 12

testHourlyReportMethod · 0.95
testWithInitializeMethod · 0.95
testJobTestMethod · 0.95
setupMethod · 0.95
initClientMethod · 0.95
beforeClassMethod · 0.95
beforeMethod · 0.95
beforeClassMethod · 0.95
checkAndInitializeMethod · 0.95
initializeByDomainMethod · 0.95
contextInitializedMethod · 0.95

Calls 9

initializeMethod · 0.95
logMethod · 0.95
errorHandlerMethod · 0.95
parseMethod · 0.95
initializeByDomainMethod · 0.95
getMethod · 0.65
lookupMethod · 0.45
isInitializedMethod · 0.45
executeMethod · 0.45

Tested by 9

testHourlyReportMethod · 0.76
testWithInitializeMethod · 0.76
testJobTestMethod · 0.76
setupMethod · 0.76
initClientMethod · 0.76
beforeClassMethod · 0.76
beforeMethod · 0.76
beforeClassMethod · 0.76