Author: pferraro
Date: 2008-12-02 15:18:18 -0500 (Tue, 02 Dec 2008)
New Revision: 2087
Added:
trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/impl/SimpleLoadBalanceFactorProvider.java
trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/impl/SimpleLoadBalanceFactorProviderMBean.java
trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/SimpleLoadBalanceFactorProviderTestCase.java
Removed:
trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/impl/StaticLoadBalanceFactorProvider.java
trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/impl/StaticLoadBalanceFactorProviderMBean.java
trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/StaticLoadBalanceFactorProviderTestCase.java
Log:
Rename from Static* to Simple*, lbf is not really static - it can change at runtime.
Copied:
trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/impl/SimpleLoadBalanceFactorProvider.java
(from rev 2086,
trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/impl/StaticLoadBalanceFactorProvider.java)
===================================================================
---
trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/impl/SimpleLoadBalanceFactorProvider.java
(rev 0)
+++
trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/impl/SimpleLoadBalanceFactorProvider.java 2008-12-02
20:18:18 UTC (rev 2087)
@@ -0,0 +1,53 @@
+/*
+ * 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.modcluster.load.impl;
+
+
+/**
+ * A {@link LoadManagerImpl} that returns a static value.
+ *
+ * @author Brian Stansberry
+ * @version $Revision$
+ */
+public class SimpleLoadBalanceFactorProvider implements
SimpleLoadBalanceFactorProviderMBean
+{
+ private int loadBalanceFactor = 1;
+
+ /**
+ * @{inheritDoc}
+ * @see org.jboss.modcluster.load.LoadBalanceFactorProvider#getLoadBalanceFactor()
+ */
+ public int getLoadBalanceFactor()
+ {
+ return this.loadBalanceFactor;
+ }
+
+ /**
+ * @{inheritDoc}
+ * @see
org.jboss.modcluster.load.impl.SimpleLoadBalanceFactorProviderMBean#setLoadBalanceFactor(int)
+ */
+ public void setLoadBalanceFactor(int loadBalanceFactor)
+ {
+ this.loadBalanceFactor = loadBalanceFactor;
+ }
+}
Property changes on:
trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/impl/SimpleLoadBalanceFactorProvider.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied:
trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/impl/SimpleLoadBalanceFactorProviderMBean.java
(from rev 2086,
trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/impl/StaticLoadBalanceFactorProviderMBean.java)
===================================================================
---
trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/impl/SimpleLoadBalanceFactorProviderMBean.java
(rev 0)
+++
trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/impl/SimpleLoadBalanceFactorProviderMBean.java 2008-12-02
20:18:18 UTC (rev 2087)
@@ -0,0 +1,33 @@
+/*
+ * 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.modcluster.load.impl;
+
+import org.jboss.modcluster.load.LoadBalanceFactorProvider;
+
+/**
+ * @author Paul Ferraro
+ *
+ */
+public interface SimpleLoadBalanceFactorProviderMBean extends LoadBalanceFactorProvider
+{
+ public void setLoadBalanceFactor(int loadBalanceFactor);
+}
Property changes on:
trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/impl/SimpleLoadBalanceFactorProviderMBean.java
___________________________________________________________________
Name: svn:mergeinfo
+
Deleted:
trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/impl/StaticLoadBalanceFactorProvider.java
===================================================================
---
trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/impl/StaticLoadBalanceFactorProvider.java 2008-12-02
20:16:15 UTC (rev 2086)
+++
trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/impl/StaticLoadBalanceFactorProvider.java 2008-12-02
20:18:18 UTC (rev 2087)
@@ -1,53 +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.modcluster.load.impl;
-
-
-/**
- * A {@link LoadManagerImpl} that returns a static value.
- *
- * @author Brian Stansberry
- * @version $Revision$
- */
-public class StaticLoadBalanceFactorProvider implements
StaticLoadBalanceFactorProviderMBean
-{
- private int loadBalanceFactor = 1;
-
- /**
- * @{inheritDoc}
- * @see org.jboss.modcluster.load.LoadBalanceFactorProvider#getLoadBalanceFactor()
- */
- public int getLoadBalanceFactor()
- {
- return this.loadBalanceFactor;
- }
-
- /**
- * @{inheritDoc}
- * @see
org.jboss.modcluster.load.impl.StaticLoadBalanceFactorProviderMBean#setLoadBalanceFactor(int)
- */
- public void setLoadBalanceFactor(int loadBalanceFactor)
- {
- this.loadBalanceFactor = loadBalanceFactor;
- }
-}
Deleted:
trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/impl/StaticLoadBalanceFactorProviderMBean.java
===================================================================
---
trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/impl/StaticLoadBalanceFactorProviderMBean.java 2008-12-02
20:16:15 UTC (rev 2086)
+++
trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/impl/StaticLoadBalanceFactorProviderMBean.java 2008-12-02
20:18:18 UTC (rev 2087)
@@ -1,33 +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.modcluster.load.impl;
-
-import org.jboss.modcluster.load.LoadBalanceFactorProvider;
-
-/**
- * @author Paul Ferraro
- *
- */
-public interface StaticLoadBalanceFactorProviderMBean extends LoadBalanceFactorProvider
-{
- public void setLoadBalanceFactor(int loadBalanceFactor);
-}
Copied:
trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/SimpleLoadBalanceFactorProviderTestCase.java
(from rev 2078,
trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/StaticLoadBalanceFactorProviderTestCase.java)
===================================================================
---
trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/SimpleLoadBalanceFactorProviderTestCase.java
(rev 0)
+++
trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/SimpleLoadBalanceFactorProviderTestCase.java 2008-12-02
20:18:18 UTC (rev 2087)
@@ -0,0 +1,49 @@
+/*
+ * 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.modcluster.load;
+
+import org.jboss.modcluster.load.impl.SimpleLoadBalanceFactorProvider;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * @author Paul Ferraro
+ *
+ */
+public class SimpleLoadBalanceFactorProviderTestCase
+{
+ private SimpleLoadBalanceFactorProvider provider = new
SimpleLoadBalanceFactorProvider();
+
+ @Test
+ public void getLoadBalanceFactor()
+ {
+ int factor = this.provider.getLoadBalanceFactor();
+
+ Assert.assertEquals(1, factor);
+
+ this.provider.setLoadBalanceFactor(3);
+
+ factor = this.provider.getLoadBalanceFactor();
+
+ Assert.assertEquals(3, factor);
+ }
+}
Property changes on:
trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/SimpleLoadBalanceFactorProviderTestCase.java
___________________________________________________________________
Name: svn:mergeinfo
+
Deleted:
trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/StaticLoadBalanceFactorProviderTestCase.java
===================================================================
---
trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/StaticLoadBalanceFactorProviderTestCase.java 2008-12-02
20:16:15 UTC (rev 2086)
+++
trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/StaticLoadBalanceFactorProviderTestCase.java 2008-12-02
20:18:18 UTC (rev 2087)
@@ -1,49 +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.modcluster.load;
-
-import org.jboss.modcluster.load.impl.StaticLoadBalanceFactorProvider;
-import org.junit.Assert;
-import org.junit.Test;
-
-/**
- * @author Paul Ferraro
- *
- */
-public class StaticLoadBalanceFactorProviderTestCase
-{
- private StaticLoadBalanceFactorProvider provider = new
StaticLoadBalanceFactorProvider();
-
- @Test
- public void getLoadBalanceFactor()
- {
- int factor = this.provider.getLoadBalanceFactor();
-
- Assert.assertEquals(1, factor);
-
- this.provider.setLoadBalanceFactor(3);
-
- factor = this.provider.getLoadBalanceFactor();
-
- Assert.assertEquals(3, factor);
- }
-}