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

Method initializeInternal

lib/java/src/main/java/com/dianping/cat/Cat.java:303–331  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

301 }
302
303 private static void initializeInternal() {
304 validate();
305
306 if (isEnabled()) {
307 try {
308 if (!init) {
309 synchronized (instance) {
310 if (!init) {
311 producer = DefaultMessageProducer.getInstance();
312 manager = DefaultMessageManager.getInstance();
313
314 StatusUpdateTask heartbeatTask = new StatusUpdateTask();
315 TcpSocketSender messageSender = TcpSocketSender.getInstance();
316
317 Threads.forGroup("cat").start(heartbeatTask);
318 Threads.forGroup("cat").start(messageSender);
319 Threads.forGroup("cat").start(new LocalAggregator.DataUploader());
320
321 CatLogger.getInstance().info("Cat is lazy initialized!");
322 init = true;
323 }
324 }
325 }
326 } catch (Exception e) {
327 errorHandler(e);
328 disable();
329 }
330 }
331 }
332
333 private static void initializeInternal(ClientConfig config) {
334 if (isEnabled()) {

Callers 4

checkAndInitializeMethod · 0.95
initializeMethod · 0.95
initializeByDomainMethod · 0.95

Calls 13

validateMethod · 0.95
isEnabledMethod · 0.95
getInstanceMethod · 0.95
getInstanceMethod · 0.95
getInstanceMethod · 0.95
forGroupMethod · 0.95
getInstanceMethod · 0.95
errorHandlerMethod · 0.95
disableMethod · 0.95
setPropertyMethod · 0.80
startMethod · 0.65
infoMethod · 0.45

Tested by

no test coverage detected