rippled
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Types | Private Attributes | List of all members
ripple::Resource::ResourceManager_test::TestLogic Class Reference
Inheritance diagram for ripple::Resource::ResourceManager_test::TestLogic:
Inheritance graph
[legend]
Collaboration diagram for ripple::Resource::ResourceManager_test::TestLogic:
Collaboration graph
[legend]

Public Member Functions

 TestLogic (beast::Journal journal)
 
void advance ()
 
TestStopwatchclock ()
 
Consumer newInboundEndpoint (beast::IP::Endpoint const &address)
 
Consumer newOutboundEndpoint (beast::IP::Endpoint const &address)
 
Consumer newUnlimitedEndpoint (beast::IP::Endpoint const &address)
 Create endpoint that should not have resource limits applied.
 
Json::Value getJson ()
 
Json::Value getJson (int threshold)
 Returns a Json::objectValue.
 
Gossip exportConsumers ()
 
void importConsumers (std::string const &origin, Gossip const &gossip)
 
void periodicActivity ()
 
void erase (Table::iterator iter)
 
void acquire (Entry &entry)
 
void release (Entry &entry)
 
Disposition charge (Entry &entry, Charge const &fee, std::string context={})
 
bool warn (Entry &entry)
 
bool disconnect (Entry &entry)
 
int balance (Entry &entry)
 
void writeList (clock_type::time_point const now, beast::PropertyStream::Set &items, EntryIntrusiveList &list)
 
void onWrite (beast::PropertyStream::Map &map)
 

Static Public Member Functions

static Disposition disposition (int balance)
 

Private Types

using clock_type = boost::base_from_member< TestStopwatch >
 
using Imports = hash_map< std::string, Import >
 
using Table = hash_map< Key, Entry, Key::hasher, Key::key_equal >
 
using EntryIntrusiveList = beast::List< Entry >
 

Private Attributes

Stats m_stats
 
Stopwatchm_clock
 
beast::Journal m_journal
 
std::recursive_mutex lock_
 
Table table_
 
EntryIntrusiveList inbound_
 
EntryIntrusiveList outbound_
 
EntryIntrusiveList admin_
 
EntryIntrusiveList inactive_
 
Imports importTable_
 

Detailed Description

Definition at line 20 of file Logic_test.cpp.

Member Typedef Documentation

◆ clock_type

Definition at line 25 of file Logic_test.cpp.

◆ Imports

Definition at line 26 of file include/xrpl/resource/detail/Logic.h.

◆ Table

Definition at line 27 of file include/xrpl/resource/detail/Logic.h.

◆ EntryIntrusiveList

Definition at line 28 of file include/xrpl/resource/detail/Logic.h.

Constructor & Destructor Documentation

◆ TestLogic()

ripple::Resource::ResourceManager_test::TestLogic::TestLogic ( beast::Journal  journal)
explicit

Definition at line 28 of file Logic_test.cpp.

Member Function Documentation

◆ advance()

void ripple::Resource::ResourceManager_test::TestLogic::advance ( )

Definition at line 34 of file Logic_test.cpp.

◆ clock()

TestStopwatch & ripple::Resource::ResourceManager_test::TestLogic::clock ( )

Definition at line 40 of file Logic_test.cpp.

◆ newInboundEndpoint()

Consumer ripple::Resource::Logic::newInboundEndpoint ( beast::IP::Endpoint const &  address)
inherited

Definition at line 92 of file include/xrpl/resource/detail/Logic.h.

◆ newOutboundEndpoint()

Consumer ripple::Resource::Logic::newOutboundEndpoint ( beast::IP::Endpoint const &  address)
inherited

Definition at line 122 of file include/xrpl/resource/detail/Logic.h.

◆ newUnlimitedEndpoint()

Consumer ripple::Resource::Logic::newUnlimitedEndpoint ( beast::IP::Endpoint const &  address)
inherited

Create endpoint that should not have resource limits applied.

Other restrictions, such as permission to perform certain RPC calls, may be enabled.

Definition at line 155 of file include/xrpl/resource/detail/Logic.h.

◆ getJson() [1/2]

Json::Value ripple::Resource::Logic::getJson ( )
inherited

Definition at line 183 of file include/xrpl/resource/detail/Logic.h.

◆ getJson() [2/2]

Json::Value ripple::Resource::Logic::getJson ( int  threshold)
inherited

Returns a Json::objectValue.

Definition at line 190 of file include/xrpl/resource/detail/Logic.h.

◆ exportConsumers()

Gossip ripple::Resource::Logic::exportConsumers ( )
inherited

Definition at line 238 of file include/xrpl/resource/detail/Logic.h.

◆ importConsumers()

void ripple::Resource::Logic::importConsumers ( std::string const &  origin,
Gossip const &  gossip 
)
inherited

Definition at line 264 of file include/xrpl/resource/detail/Logic.h.

◆ periodicActivity()

void ripple::Resource::Logic::periodicActivity ( )
inherited

Definition at line 324 of file include/xrpl/resource/detail/Logic.h.

◆ disposition()

static Disposition ripple::Resource::Logic::disposition ( int  balance)
staticinherited

Definition at line 370 of file include/xrpl/resource/detail/Logic.h.

◆ erase()

void ripple::Resource::Logic::erase ( Table::iterator  iter)
inherited

Definition at line 382 of file include/xrpl/resource/detail/Logic.h.

◆ acquire()

void ripple::Resource::Logic::acquire ( Entry entry)
inherited

Definition at line 394 of file include/xrpl/resource/detail/Logic.h.

◆ release()

void ripple::Resource::Logic::release ( Entry entry)
inherited

Definition at line 401 of file include/xrpl/resource/detail/Logic.h.

◆ charge()

Disposition ripple::Resource::Logic::charge ( Entry entry,
Charge const &  fee,
std::string  context = {} 
)
inherited

Definition at line 433 of file include/xrpl/resource/detail/Logic.h.

◆ warn()

bool ripple::Resource::Logic::warn ( Entry entry)
inherited

Definition at line 465 of file include/xrpl/resource/detail/Logic.h.

◆ disconnect()

bool ripple::Resource::Logic::disconnect ( Entry entry)
inherited

Definition at line 489 of file include/xrpl/resource/detail/Logic.h.

◆ balance()

int ripple::Resource::Logic::balance ( Entry entry)
inherited

Definition at line 515 of file include/xrpl/resource/detail/Logic.h.

◆ writeList()

void ripple::Resource::Logic::writeList ( clock_type::time_point const  now,
beast::PropertyStream::Set items,
EntryIntrusiveList list 
)
inherited

Definition at line 524 of file include/xrpl/resource/detail/Logic.h.

◆ onWrite()

void ripple::Resource::Logic::onWrite ( beast::PropertyStream::Map map)
inherited

Definition at line 542 of file include/xrpl/resource/detail/Logic.h.

Member Data Documentation

◆ m_stats

Stats ripple::Resource::Logic::m_stats
privateinherited

Definition at line 42 of file include/xrpl/resource/detail/Logic.h.

◆ m_clock

Stopwatch& ripple::Resource::Logic::m_clock
privateinherited

Definition at line 43 of file include/xrpl/resource/detail/Logic.h.

◆ m_journal

beast::Journal ripple::Resource::Logic::m_journal
privateinherited

Definition at line 44 of file include/xrpl/resource/detail/Logic.h.

◆ lock_

std::recursive_mutex ripple::Resource::Logic::lock_
privateinherited

Definition at line 46 of file include/xrpl/resource/detail/Logic.h.

◆ table_

Table ripple::Resource::Logic::table_
privateinherited

Definition at line 49 of file include/xrpl/resource/detail/Logic.h.

◆ inbound_

EntryIntrusiveList ripple::Resource::Logic::inbound_
privateinherited

Definition at line 56 of file include/xrpl/resource/detail/Logic.h.

◆ outbound_

EntryIntrusiveList ripple::Resource::Logic::outbound_
privateinherited

Definition at line 59 of file include/xrpl/resource/detail/Logic.h.

◆ admin_

EntryIntrusiveList ripple::Resource::Logic::admin_
privateinherited

Definition at line 62 of file include/xrpl/resource/detail/Logic.h.

◆ inactive_

EntryIntrusiveList ripple::Resource::Logic::inactive_
privateinherited

Definition at line 65 of file include/xrpl/resource/detail/Logic.h.

◆ importTable_

Imports ripple::Resource::Logic::importTable_
privateinherited

Definition at line 68 of file include/xrpl/resource/detail/Logic.h.