#include <src/main/activemq/util/MemoryUsage.h>
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 |
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 | ) |
|
|
inlinevirtual |
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: