#include <src/main/activemq/util/MemoryUsage.h>
Public Member Functions |
| | MemoryUsage () |
| | Default Constructor.
|
| | MemoryUsage (unsigned long long limit) |
| | Creates an instance of an Usage monitor with a set limit.
|
| virtual | ~MemoryUsage () |
| virtual void | waitForSpace () |
| | Waits forever for more space to be returned to this Usage Manager.
|
| virtual void | waitForSpace (unsigned int timeout) |
| | Waits for more space to be returned to this Usage Manager, times out when the given time span in milliseconds elapses.
|
| virtual void | enqueueUsage (unsigned long long value) |
| | Tries to increase the usage by value amount but blocks if this object is currently full.
|
| virtual void | increaseUsage (unsigned long long value) |
| | Increases the usage by the value amount.
|
| virtual void | decreaseUsage (unsigned long long value) |
| | Decreases the usage by the value amount.
|
| virtual bool | isFull () const |
| | Returns true if this Usage instance is full, i.e.
|
| unsigned long long | getUsage () const |
| | Gets the current usage amount.
|
| void | setUsage (unsigned long long usage) |
| | Sets the current usage amount.
|
| unsigned long long | getLimit () const |
| | Gets the current limit amount.
|
| void | setLimit (unsigned long long limit) |
| | Sets the current limit amount.
|
Constructor & Destructor Documentation
| activemq::util::MemoryUsage::MemoryUsage |
( |
| ) |
|
| activemq::util::MemoryUsage::MemoryUsage |
( |
unsigned long long |
limit | ) |
|
Creates an instance of an Usage monitor with a set limit.
- Parameters:
-
| limit | - amount of memory this manager allows. |
| virtual activemq::util::MemoryUsage::~MemoryUsage |
( |
| ) |
[virtual] |
Member Function Documentation
| virtual void activemq::util::MemoryUsage::decreaseUsage |
( |
unsigned long long |
value | ) |
[virtual] |
Decreases the usage by the value amount.
- Parameters:
-
| value | Amount of space to return to the pool |
Implements activemq::util::Usage.
| virtual void activemq::util::MemoryUsage::enqueueUsage |
( |
unsigned long long |
value | ) |
[inline, virtual] |
Tries to increase the usage by value amount but blocks if this object is currently full.
- Parameters:
-
| value | Amount of usage in bytes to add. |
Implements activemq::util::Usage.
| unsigned long long activemq::util::MemoryUsage::getLimit |
( |
| ) |
const [inline] |
Gets the current limit amount.
- Returns:
- the amount that can be used before full.
| unsigned long long activemq::util::MemoryUsage::getUsage |
( |
| ) |
const [inline] |
Gets the current usage amount.
- Returns:
- the amount of bytes currently used.
| virtual void activemq::util::MemoryUsage::increaseUsage |
( |
unsigned long long |
value | ) |
[virtual] |
Increases the usage by the value amount.
- Parameters:
-
| value | Amount of usage to add. |
Implements activemq::util::Usage.
| virtual bool activemq::util::MemoryUsage::isFull |
( |
| ) |
const [virtual] |
| void activemq::util::MemoryUsage::setLimit |
( |
unsigned long long |
limit | ) |
[inline] |
Sets the current limit amount.
- Parameters:
-
| limit | - The amount that can be used before full. |
| void activemq::util::MemoryUsage::setUsage |
( |
unsigned long long |
usage | ) |
[inline] |
Sets the current usage amount.
- Parameters:
-
| usage | - The amount to tag as used. |
| virtual void activemq::util::MemoryUsage::waitForSpace |
( |
| ) |
[virtual] |
| virtual void activemq::util::MemoryUsage::waitForSpace |
( |
unsigned int |
timeout | ) |
[virtual] |
Waits for more space to be returned to this Usage Manager, times out when the given time span in milliseconds elapses.
- Parameters:
-
| timeout | The time to wait for more space. |
Implements activemq::util::Usage.
The documentation for this class was generated from the following file: