Home » activemq-parent-5.3.1-source-release » org.apache » activemq » usage » [javadoc | source]
org.apache.activemq.usage
public class: MemoryUsage [javadoc | source]
java.lang.Object
   org.apache.activemq.usage.Usage<MemoryUsage>
      org.apache.activemq.usage.MemoryUsage

All Implemented Interfaces:
    Service

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.
Fields inherited from org.apache.activemq.usage.Usage:
usageMutex,  percentUsage,  parent
Constructor:
 public MemoryUsage() 
 public MemoryUsage(MemoryUsage parent) 
    Create the memory manager linked to a parent. When the memory manager is linked to a parent then when usage increased or decreased, the parent's usage is also increased or decreased.
    Parameters:
    parent -
 public MemoryUsage(String name) 
 public MemoryUsage(MemoryUsage parent,
    String name) 
 public MemoryUsage(MemoryUsage parent,
    String name,
    float portion) 
Method from org.apache.activemq.usage.MemoryUsage Summary:
decreaseUsage,   enqueueUsage,   getUsage,   increaseUsage,   isFull,   retrieveUsage,   setUsage,   waitForSpace,   waitForSpace
Methods from org.apache.activemq.usage.Usage:
addUsageListener,   caclPercentUsage,   getExecutor,   getLimit,   getLimiter,   getName,   getParent,   getPercentUsage,   getPercentUsageMinDelta,   getPollingTime,   getUsage,   getUsagePortion,   isFull,   notifyCallbackWhenNotFull,   onLimitChange,   removeUsageListener,   retrieveUsage,   setLimit,   setLimiter,   setName,   setParent,   setPercentUsage,   setPercentUsageMinDelta,   setPollingTime,   setUsagePortion,   start,   stop,   toString,   waitForSpace,   waitForSpace
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.activemq.usage.MemoryUsage Detail:
 public  void decreaseUsage(long value) 
    Decreases the usage by the value amount.
 public  void enqueueUsage(long value) throws InterruptedException 
    Tries to increase the usage by value amount but blocks if this object is currently full.
 public long getUsage() 
 public  void increaseUsage(long value) 
    Increases the usage by the value amount.
 public boolean isFull() 
 protected long retrieveUsage() 
 public  void setUsage(long usage) 
 public  void waitForSpace() throws InterruptedException 
 public boolean waitForSpace(long timeout) throws InterruptedException