//
// ========================================================================
-// 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
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;
{
_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);
private void setStopping()
{
- LOG.debug("stopping {}",this);
+ if (LOG.isDebugEnabled())
+ LOG.debug("stopping {}",this);
_state = __STOPPING;
for (Listener listener : _listeners)
listener.lifeCycleStopping(this);
private void setStopped()
{
_state = __STOPPED;
- LOG.debug("{} {}",STOPPED,this);
+ if (LOG.isDebugEnabled())
+ LOG.debug("{} {}",STOPPED,this);
for (Listener listener : _listeners)
listener.lifeCycleStopped(this);
}