org.apache.activemq.usage
Class StoreUsage

java.lang.Object
  extended by org.apache.activemq.usage.Usage<StoreUsage>
      extended by org.apache.activemq.usage.StoreUsage
All Implemented Interfaces:
Service

public class StoreUsage
extends Usage<StoreUsage>

Used to keep track of how much of something is being used so that a productive working set usage can be controlled. Main use case is manage memory usage.


Field Summary
 
Fields inherited from class org.apache.activemq.usage.Usage
name, parent, percentUsage, usageMutex
 
Constructor Summary
StoreUsage()
           
StoreUsage(StoreUsage parent, String name)
           
StoreUsage(String name, PersistenceAdapter store)
           
 
Method Summary
 int getPercentUsage()
           
 PersistenceAdapter getStore()
           
protected  long retrieveUsage()
           
 void setStore(PersistenceAdapter store)
           
 boolean waitForSpace(long timeout, int highWaterMark)
           
 
Methods inherited from class org.apache.activemq.usage.Usage
addChild, addUsageListener, caclPercentUsage, getExecutor, getLimit, getLimiter, getName, getParent, getPercentUsageMinDelta, getPollingTime, getUsage, getUsagePortion, isFull, isFull, notifyCallbackWhenNotFull, onLimitChange, removeChild, removeUsageListener, setExecutor, setLimit, setLimiter, setName, setParent, setPercentUsage, setPercentUsageMinDelta, setPollingTime, setUsagePortion, start, stop, toString, waitForSpace, waitForSpace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StoreUsage

public StoreUsage()

StoreUsage

public StoreUsage(String name,
                  PersistenceAdapter store)

StoreUsage

public StoreUsage(StoreUsage parent,
                  String name)
Method Detail

retrieveUsage

protected long retrieveUsage()
Specified by:
retrieveUsage in class Usage<StoreUsage>

getStore

public PersistenceAdapter getStore()

setStore

public void setStore(PersistenceAdapter store)

getPercentUsage

public int getPercentUsage()
Overrides:
getPercentUsage in class Usage<StoreUsage>

waitForSpace

public boolean waitForSpace(long timeout,
                            int highWaterMark)
                     throws InterruptedException
Overrides:
waitForSpace in class Usage<StoreUsage>
Returns:
true if space
Throws:
InterruptedException


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