Package org.apache.activemq.usage
Class TempUsage
- java.lang.Object
-
- org.apache.activemq.usage.Usage<T>
-
- org.apache.activemq.usage.PercentLimitUsage<TempUsage>
-
- org.apache.activemq.usage.TempUsage
-
- All Implemented Interfaces:
Service
public class TempUsage extends PercentLimitUsage<TempUsage>
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
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getPercentUsage()
PListStore
getStore()
protected long
retrieveUsage()
void
setStore(PListStore 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
-
TempUsage
public TempUsage()
-
TempUsage
public TempUsage(String name, PListStore store)
-
-
Method Detail
-
getPercentUsage
public int getPercentUsage()
- Overrides:
getPercentUsage
in classUsage<TempUsage>
-
retrieveUsage
protected long retrieveUsage()
- Specified by:
retrieveUsage
in classUsage<TempUsage>
-
getStore
public PListStore getStore()
-
setStore
public void setStore(PListStore store)
-
updateLimitBasedOnPercent
protected void updateLimitBasedOnPercent()
- Specified by:
updateLimitBasedOnPercent
in classPercentLimitUsage<TempUsage>
-
-