[jboss-cvs] JBossAS SVN: r77464 - trunk/tomcat/src/main/org/jboss/web/tomcat/service/modcluster/load/metric/impl.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Aug 25 19:10:08 EDT 2008


Author: pferraro
Date: 2008-08-25 19:10:08 -0400 (Mon, 25 Aug 2008)
New Revision: 77464

Removed:
   trunk/tomcat/src/main/org/jboss/web/tomcat/service/modcluster/load/metric/impl/DeterministicLoadMetric.java
Log:
Replaced by DeterministicLoadState

Deleted: trunk/tomcat/src/main/org/jboss/web/tomcat/service/modcluster/load/metric/impl/DeterministicLoadMetric.java
===================================================================
--- trunk/tomcat/src/main/org/jboss/web/tomcat/service/modcluster/load/metric/impl/DeterministicLoadMetric.java	2008-08-25 23:09:16 UTC (rev 77463)
+++ trunk/tomcat/src/main/org/jboss/web/tomcat/service/modcluster/load/metric/impl/DeterministicLoadMetric.java	2008-08-25 23:10:08 UTC (rev 77464)
@@ -1,51 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.web.tomcat.service.modcluster.load.metric.impl;
-
-import java.util.concurrent.atomic.AtomicReference;
-
-import org.jboss.web.tomcat.service.modcluster.load.metric.LoadMetric;
-
-/**
- * Abstract {@link LoadMetric} implementation for deterministic metrics,
- * i.e. metrics whose significance is relative to the previous value.
- * 
- * @author Paul Ferraro
- */
-public abstract class DeterministicLoadMetric extends AbstractLoadMetric
-{
-   private AtomicReference<Double> currentMetric = new AtomicReference<Double>(new Double(0));
-   
-   /**
-    * @{inheritDoc}
-    * @see org.jboss.web.tomcat.service.modcluster.load.metric.LoadMetric#getLoad()
-    */
-   public final double getLoad() throws Exception
-   {
-      double currentMetric = this.getDeterministicMetric();
-      double previousMetric = this.currentMetric.getAndSet(new Double(currentMetric)).doubleValue();
-      
-      return currentMetric - previousMetric;
-   }
-
-   protected abstract double getDeterministicMetric() throws Exception;
-}
\ No newline at end of file




More information about the jboss-cvs-commits mailing list