org.apache.activemq.usage
Class SystemUsage

java.lang.Object
  extended by org.apache.activemq.usage.SystemUsage
All Implemented Interfaces:
Service

public class SystemUsage
extends Object
implements Service

Holder for Usage instances for memory, store and temp files Main use case is manage memory usage.


Constructor Summary
SystemUsage()
           
SystemUsage(String name, PersistenceAdapter adapter, PListStore tempStore)
           
SystemUsage(SystemUsage parent, String name)
           
 
Method Summary
 ThreadPoolExecutor getExecutor()
           
 MemoryUsage getMemoryUsage()
           
 String getName()
           
 SystemUsage getParent()
           
 long getSendFailIfNoSpaceAfterTimeout()
           
 StoreUsage getStoreUsage()
           
 TempUsage getTempUsage()
           
 boolean isSendFailIfNoSpace()
           
 boolean isSendFailIfNoSpaceExplicitySet()
           
 void setExecutor(ThreadPoolExecutor executor)
           
 void setMemoryUsage(MemoryUsage memoryUsage)
           
 void setName(String name)
           
 void setParent(SystemUsage parent)
           
 void setSendFailIfNoSpace(boolean failProducerIfNoSpace)
          Sets whether or not a send() should fail if there is no space free.
 void setSendFailIfNoSpaceAfterTimeout(long sendFailIfNoSpaceAfterTimeout)
           
 void setSendFailIfNoSpaceExplicitySet(boolean sendFailIfNoSpaceExplicitySet)
           
 void setStoreUsage(StoreUsage storeUsage)
           
 void setTempUsage(TempUsage tempDiskUsage)
           
 void start()
           
 void stop()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SystemUsage

public SystemUsage()

SystemUsage

public SystemUsage(String name,
                   PersistenceAdapter adapter,
                   PListStore tempStore)

SystemUsage

public SystemUsage(SystemUsage parent,
                   String name)
Method Detail

getName

public String getName()

getMemoryUsage

public MemoryUsage getMemoryUsage()
Returns:
the memoryUsage

getStoreUsage

public StoreUsage getStoreUsage()
Returns:
the storeUsage

getTempUsage

public TempUsage getTempUsage()
Returns:
the tempDiskUsage

toString

public String toString()
Overrides:
toString in class Object

start

public void start()
Specified by:
start in interface Service

stop

public void stop()
Specified by:
stop in interface Service

setSendFailIfNoSpace

public void setSendFailIfNoSpace(boolean failProducerIfNoSpace)
Sets whether or not a send() should fail if there is no space free. The default value is false which means to block the send() method until space becomes available


isSendFailIfNoSpace

public boolean isSendFailIfNoSpace()

getParent

public SystemUsage getParent()

setParent

public void setParent(SystemUsage parent)

isSendFailIfNoSpaceExplicitySet

public boolean isSendFailIfNoSpaceExplicitySet()

setSendFailIfNoSpaceExplicitySet

public void setSendFailIfNoSpaceExplicitySet(boolean sendFailIfNoSpaceExplicitySet)

getSendFailIfNoSpaceAfterTimeout

public long getSendFailIfNoSpaceAfterTimeout()

setSendFailIfNoSpaceAfterTimeout

public void setSendFailIfNoSpaceAfterTimeout(long sendFailIfNoSpaceAfterTimeout)

setName

public void setName(String name)

setMemoryUsage

public void setMemoryUsage(MemoryUsage memoryUsage)

setStoreUsage

public void setStoreUsage(StoreUsage storeUsage)

setTempUsage

public void setTempUsage(TempUsage tempDiskUsage)

getExecutor

public ThreadPoolExecutor getExecutor()
Returns:
the executor

setExecutor

public void setExecutor(ThreadPoolExecutor executor)
Parameters:
executor - the executor to set


Copyright © 2005-2012 The Apache Software Foundation. All Rights Reserved.