18#ifndef _ACTIVEMQ_UTIL_MEMORYUSAGE_H_
19#define _ACTIVEMQ_UTIL_MEMORYUSAGE_H_
32 unsigned long long limit;
35 unsigned long long usage;
#define AMQCPP_API
Definition: Config.h:30
Definition: MemoryUsage.h:28
virtual void enqueueUsage(unsigned long long value)
Tries to increase the usage by value amount but blocks if this object is currently full.
Definition: MemoryUsage.h:72
unsigned long long getUsage() const
Gets the current usage amount.
Definition: MemoryUsage.h:98
virtual bool isFull() const
Returns true if this Usage instance is full, i.e.
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 mill...
virtual void decreaseUsage(unsigned long long value)
Decreases the usage by the value amount.
MemoryUsage()
Default Constructor.
virtual void increaseUsage(unsigned long long value)
Increases the usage by the value amount.
unsigned long long getLimit() const
Gets the current limit amount.
Definition: MemoryUsage.h:114
MemoryUsage(unsigned long long limit)
Creates an instance of an Usage monitor with a set limit.
void setUsage(unsigned long long usage)
Sets the current usage amount.
Definition: MemoryUsage.h:106
void setLimit(unsigned long long limit)
Sets the current limit amount.
Definition: MemoryUsage.h:122
virtual void waitForSpace()
Waits forever for more space to be returned to this Usage Manager.
Mutex object that offers recursive support on all platforms as well as providing the ability to use t...
Definition: Mutex.h:39
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition: CachedConsumer.h:24