[jboss-cvs] JBossAS SVN: r77036 - in trunk/tomcat/src/main/org/jboss/web/tomcat/service/modcluster/load: metric and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Aug 13 17:09:08 EDT 2008


Author: pferraro
Date: 2008-08-13 17:09:08 -0400 (Wed, 13 Aug 2008)
New Revision: 77036

Added:
   trunk/tomcat/src/main/org/jboss/web/tomcat/service/modcluster/load/metric/
   trunk/tomcat/src/main/org/jboss/web/tomcat/service/modcluster/load/metric/LoadMetric.java
   trunk/tomcat/src/main/org/jboss/web/tomcat/service/modcluster/load/metric/LoadMetricSource.java
   trunk/tomcat/src/main/org/jboss/web/tomcat/service/modcluster/load/metric/LoadMetricSourceRegistration.java
Log:
[JBAS-5665] LoadMetricSource API

Added: trunk/tomcat/src/main/org/jboss/web/tomcat/service/modcluster/load/metric/LoadMetric.java
===================================================================
--- trunk/tomcat/src/main/org/jboss/web/tomcat/service/modcluster/load/metric/LoadMetric.java	                        (rev 0)
+++ trunk/tomcat/src/main/org/jboss/web/tomcat/service/modcluster/load/metric/LoadMetric.java	2008-08-13 21:09:08 UTC (rev 77036)
@@ -0,0 +1,34 @@
+/*
+ * 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;
+
+
+/**
+ * @author Paul Ferraro
+ *
+ */
+public interface LoadMetric
+{
+   int getWeight();
+   
+   double getMetric() throws Exception;
+}

Added: trunk/tomcat/src/main/org/jboss/web/tomcat/service/modcluster/load/metric/LoadMetricSource.java
===================================================================
--- trunk/tomcat/src/main/org/jboss/web/tomcat/service/modcluster/load/metric/LoadMetricSource.java	                        (rev 0)
+++ trunk/tomcat/src/main/org/jboss/web/tomcat/service/modcluster/load/metric/LoadMetricSource.java	2008-08-13 21:09:08 UTC (rev 77036)
@@ -0,0 +1,37 @@
+/*
+ * 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;
+
+import java.util.Collection;
+
+/**
+ * @author Paul Ferraro
+ *
+ */
+public interface LoadMetricSource
+{
+   Collection<? extends LoadMetric> getMetrics();
+   
+   void open();
+   
+   void close();
+}

Added: trunk/tomcat/src/main/org/jboss/web/tomcat/service/modcluster/load/metric/LoadMetricSourceRegistration.java
===================================================================
--- trunk/tomcat/src/main/org/jboss/web/tomcat/service/modcluster/load/metric/LoadMetricSourceRegistration.java	                        (rev 0)
+++ trunk/tomcat/src/main/org/jboss/web/tomcat/service/modcluster/load/metric/LoadMetricSourceRegistration.java	2008-08-13 21:09:08 UTC (rev 77036)
@@ -0,0 +1,32 @@
+/*
+ * 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;
+
+
+/**
+ * @author Paul Ferraro
+ *
+ */
+public interface LoadMetricSourceRegistration
+{
+   void add(LoadMetricSource source);
+}




More information about the jboss-cvs-commits mailing list