org.d_haven.mpool
Class ManagePoolsCommand

java.lang.Object
  extended by org.d_haven.mpool.ManagePoolsCommand
All Implemented Interfaces:
org.d_haven.event.command.Command, org.d_haven.event.command.DelayedCommand, org.d_haven.event.command.RepeatedCommand

public class ManagePoolsCommand
extends java.lang.Object
implements org.d_haven.event.command.RepeatedCommand

The ManagePoolsCommand will manage a set of pools using the same set of parameters. These parameters are "good enough" parameters, and are only meant as a starting point. Eventually we will provide a mechanism to customize everything.


Field Summary
private static int DEFAULT_MAX
           
private static long DELAY_INTERVAL
           
private  int m_grow
           
private  int m_max
           
private  int m_min
           
private  java.util.List m_pools
           
 
Constructor Summary
ManagePoolsCommand(java.util.List pools)
          Create the ManagePoolsCommand with the supplied list of pools.
 
Method Summary
 void execute()
           
 long getDelayInterval()
           
 int getNumberOfRepeats()
           
 long getRepeatInterval()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DELAY_INTERVAL

private static final long DELAY_INTERVAL
See Also:
Constant Field Values

DEFAULT_MAX

private static final int DEFAULT_MAX
See Also:
Constant Field Values

m_pools

private final java.util.List m_pools

m_min

private final int m_min
See Also:
Constant Field Values

m_max

private final int m_max
See Also:
Constant Field Values

m_grow

private final int m_grow
See Also:
Constant Field Values
Constructor Detail

ManagePoolsCommand

public ManagePoolsCommand(java.util.List pools)
Create the ManagePoolsCommand with the supplied list of pools. The command will use the list of pools as is so that any additions and removals from the list is handled correctly.

Parameters:
pools - the list of pools to manage
Method Detail

getDelayInterval

public long getDelayInterval()
Specified by:
getDelayInterval in interface org.d_haven.event.command.DelayedCommand

getRepeatInterval

public long getRepeatInterval()
Specified by:
getRepeatInterval in interface org.d_haven.event.command.RepeatedCommand

getNumberOfRepeats

public int getNumberOfRepeats()
Specified by:
getNumberOfRepeats in interface org.d_haven.event.command.RepeatedCommand

execute

public void execute()
             throws java.lang.Exception
Specified by:
execute in interface org.d_haven.event.command.Command
Throws:
java.lang.Exception

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object