X-Git-Url: https://code.wpia.club/?p=gigi.git;a=blobdiff_plain;f=lib%2Fjetty%2Forg%2Feclipse%2Fjetty%2Futil%2Fcomponent%2FAbstractLifeCycle.java;h=4aef3418f49386ba9ddb2a3d488c12260aa0a181;hp=8f2d9dc7ab02447bad8e8abf2c28994acc481e0d;hb=ba4f228fa9f72d50991a2218cfd83987ef5d385e;hpb=875b5e9651498a0cd8e0001c0742ba843e47cad0 diff --git a/lib/jetty/org/eclipse/jetty/util/component/AbstractLifeCycle.java b/lib/jetty/org/eclipse/jetty/util/component/AbstractLifeCycle.java index 8f2d9dc7..4aef3418 100644 --- a/lib/jetty/org/eclipse/jetty/util/component/AbstractLifeCycle.java +++ b/lib/jetty/org/eclipse/jetty/util/component/AbstractLifeCycle.java @@ -1,6 +1,6 @@ // // ======================================================================== -// Copyright (c) 1995-2014 Mort Bay Consulting Pty. Ltd. +// Copyright (c) 1995-2016 Mort Bay Consulting Pty. Ltd. // ------------------------------------------------------------------------ // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 @@ -18,9 +18,9 @@ package org.eclipse.jetty.util.component; -import java.lang.management.ManagementFactory; import java.util.concurrent.CopyOnWriteArrayList; +import org.eclipse.jetty.util.Uptime; import org.eclipse.jetty.util.annotation.ManagedAttribute; import org.eclipse.jetty.util.annotation.ManagedObject; import org.eclipse.jetty.util.log.Log; @@ -174,15 +174,15 @@ public abstract class AbstractLifeCycle implements LifeCycle { _state = __STARTED; if (LOG.isDebugEnabled()) - - LOG.debug(STARTED+" @{}ms {}",ManagementFactory.getRuntimeMXBean().getUptime(),this); + LOG.debug(STARTED+" @{}ms {}",Uptime.getUptime(),this); for (Listener listener : _listeners) listener.lifeCycleStarted(this); } private void setStarting() { - LOG.debug("starting {}",this); + if (LOG.isDebugEnabled()) + LOG.debug("starting {}",this); _state = __STARTING; for (Listener listener : _listeners) listener.lifeCycleStarting(this); @@ -190,7 +190,8 @@ public abstract class AbstractLifeCycle implements LifeCycle private void setStopping() { - LOG.debug("stopping {}",this); + if (LOG.isDebugEnabled()) + LOG.debug("stopping {}",this); _state = __STOPPING; for (Listener listener : _listeners) listener.lifeCycleStopping(this); @@ -199,7 +200,8 @@ public abstract class AbstractLifeCycle implements LifeCycle private void setStopped() { _state = __STOPPED; - LOG.debug("{} {}",STOPPED,this); + if (LOG.isDebugEnabled()) + LOG.debug("{} {}",STOPPED,this); for (Listener listener : _listeners) listener.lifeCycleStopped(this); }