rippled
|
An endpoint that consumes resources. More...
Public Member Functions | |
Consumer () | |
~Consumer () | |
Consumer (Consumer const &other) | |
Consumer & | operator= (Consumer const &other) |
std::string | to_string () const |
Return a human readable string uniquely identifying this consumer. More... | |
bool | isUnlimited () const |
Returns true if this is a privileged endpoint. More... | |
void | elevate (std::string const &name) |
Raise the Consumer's privilege level to a Named endpoint. More... | |
Disposition | disposition () const |
Returns the current disposition of this consumer. More... | |
Disposition | charge (Charge const &fee) |
Apply a load charge to the consumer. More... | |
bool | warn () |
Returns true if the consumer should be warned. More... | |
bool | disconnect (beast::Journal const &j) |
Returns true if the consumer should be disconnected. More... | |
int | balance () |
Returns the credit balance representing consumption. More... | |
Entry & | entry () |
Private Member Functions | |
Consumer (Logic &logic, Entry &entry) | |
Private Attributes | |
Logic * | m_logic |
Entry * | m_entry |
Friends | |
class | Logic |
An endpoint that consumes resources.
Definition at line 34 of file Consumer.h.
Definition at line 28 of file Consumer.cpp.
ripple::Resource::Consumer::Consumer | ( | ) |
Definition at line 33 of file Consumer.cpp.
ripple::Resource::Consumer::~Consumer | ( | ) |
Definition at line 47 of file Consumer.cpp.
ripple::Resource::Consumer::Consumer | ( | Consumer const & | other | ) |
Definition at line 37 of file Consumer.cpp.
Definition at line 54 of file Consumer.cpp.
std::string ripple::Resource::Consumer::to_string | ( | ) | const |
Return a human readable string uniquely identifying this consumer.
Definition at line 71 of file Consumer.cpp.
bool ripple::Resource::Consumer::isUnlimited | ( | ) | const |
Returns true
if this is a privileged endpoint.
Definition at line 80 of file Consumer.cpp.
void ripple::Resource::Consumer::elevate | ( | std::string const & | name | ) |
Raise the Consumer's privilege level to a Named endpoint.
The reference to the original endpoint descriptor is released.
Disposition ripple::Resource::Consumer::disposition | ( | ) | const |
Returns the current disposition of this consumer.
This should be checked upon creation to determine if the consumer should be disconnected immediately.
Definition at line 89 of file Consumer.cpp.
Disposition ripple::Resource::Consumer::charge | ( | Charge const & | fee | ) |
Apply a load charge to the consumer.
Definition at line 99 of file Consumer.cpp.
bool ripple::Resource::Consumer::warn | ( | ) |
Returns true
if the consumer should be warned.
This consumes the warning.
Definition at line 110 of file Consumer.cpp.
bool ripple::Resource::Consumer::disconnect | ( | beast::Journal const & | j | ) |
Returns true
if the consumer should be disconnected.
Definition at line 117 of file Consumer.cpp.
int ripple::Resource::Consumer::balance | ( | ) |
Returns the credit balance representing consumption.
Definition at line 129 of file Consumer.cpp.
Entry & ripple::Resource::Consumer::entry | ( | ) |
Definition at line 136 of file Consumer.cpp.
|
friend |
Definition at line 37 of file Consumer.h.
|
private |
Definition at line 91 of file Consumer.h.
|
private |
Definition at line 92 of file Consumer.h.