20 #ifndef RIPPLE_RESOURCE_CONSUMER_H_INCLUDED
21 #define RIPPLE_RESOURCE_CONSUMER_H_INCLUDED
23 #include <ripple/basics/Log.h>
24 #include <ripple/resource/Charge.h>
25 #include <ripple/resource/Disposition.h>
bool warn()
Returns true if the consumer should be warned.
bool disconnect(beast::Journal const &j)
Returns true if the consumer should be disconnected.
void elevate(std::string const &name)
Raise the Consumer's privilege level to a Named endpoint.
Disposition disposition() const
Returns the current disposition of this consumer.
std::ostream & operator<<(std::ostream &os, Charge const &v)
std::string to_string() const
Return a human readable string uniquely identifying this consumer.
int balance()
Returns the credit balance representing consumption.
A generic endpoint for log messages.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
An endpoint that consumes resources.
bool isUnlimited() const
Returns true if this is a privileged endpoint.
Consumer & operator=(Consumer const &other)
Disposition
The disposition of a consumer after applying a load charge.
Disposition charge(Charge const &fee)
Apply a load charge to the consumer.