Package org.apache.activemq.usage
Class StoreUsage
- java.lang.Object
-
- org.apache.activemq.usage.Usage<T>
-
- org.apache.activemq.usage.PercentLimitUsage<StoreUsage>
-
- org.apache.activemq.usage.StoreUsage
-
- All Implemented Interfaces:
Service
public class StoreUsage extends PercentLimitUsage<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.PercentLimitUsage
percentLimit, total
-
Fields inherited from class org.apache.activemq.usage.Usage
name, parent, percentUsage, usageLock, waitForSpaceCondition
-
-
Constructor Summary
Constructors Constructor Description StoreUsage()
StoreUsage(String name, PersistenceAdapter store)
StoreUsage(StoreUsage parent, String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StoreUsage
copy()
int
getPercentUsage()
PersistenceAdapter
getStore()
protected long
retrieveUsage()
void
setStore(PersistenceAdapter store)
protected void
updateLimitBasedOnPercent()
-
Methods inherited from class org.apache.activemq.usage.PercentLimitUsage
getPercentLimit, getTotal, percentLimitFromFile, setPercentLimit, setTotal
-
Methods inherited from class org.apache.activemq.usage.Usage
addChild, addUsageListener, caclPercentUsage, getExecutor, getLimit, getLimiter, getName, getNumUsageListeners, getParent, getPercentUsageMinDelta, getPollingTime, getUsage, getUsagePortion, isFull, isFull, isStarted, notifyCallbackWhenNotFull, onLimitChange, removeChild, removeUsageListener, setExecutor, setLimit, setLimiter, setName, setParent, setPercentUsage, setPercentUsageMinDelta, setPollingTime, setUsagePortion, start, stop, toString, waitForSpace, waitForSpace, waitForSpace
-
-
-
-
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 classUsage<StoreUsage>
-
getStore
public PersistenceAdapter getStore()
-
setStore
public void setStore(PersistenceAdapter store)
-
getPercentUsage
public int getPercentUsage()
- Overrides:
getPercentUsage
in classUsage<StoreUsage>
-
updateLimitBasedOnPercent
protected void updateLimitBasedOnPercent()
- Specified by:
updateLimitBasedOnPercent
in classPercentLimitUsage<StoreUsage>
-
copy
public StoreUsage copy()
-
-