|
rippled
|
#include <TransactionAcquire.h>


Public Types | |
| using | pointer = std::shared_ptr< TransactionAcquire > |
Public Member Functions | |
| TransactionAcquire (Application &app, uint256 const &hash, std::unique_ptr< PeerSet > peerSet) | |
| ~TransactionAcquire ()=default | |
| SHAMapAddNode | takeNodes (std::vector< std::pair< SHAMapNodeID, Slice > > const &data, std::shared_ptr< Peer > const &) |
| void | init (int startPeers) |
| void | stillNeed () |
| virtual void | cancel () |
| Cancel the task by marking it as failed if the task is not done. | |
| T | shared_from_this (T... args) |
| T | weak_from_this (T... args) |
Protected Types | |
| using | ScopedLockType = std::unique_lock< std::recursive_mutex > |
Protected Member Functions | |
| void | setTimer (ScopedLockType &) |
| Schedule a call to queueJob() after mTimerInterval. | |
| void | queueJob (ScopedLockType &) |
| Queue a job to call invokeOnTimer(). | |
| bool | isDone () const |
Protected Attributes | |
| Application & | app_ |
| beast::Journal | journal_ |
| std::recursive_mutex | mtx_ |
| uint256 const | hash_ |
| The hash of the object (in practice, always a ledger) we are trying to fetch. | |
| int | timeouts_ |
| bool | complete_ |
| bool | failed_ |
| bool | progress_ |
| Whether forward progress has been made. | |
| std::chrono::milliseconds | timerInterval_ |
| The minimum time to wait between calls to execute(). | |
| QueueJobParameter | queueJobParameter_ |
Private Member Functions | |
| void | onTimer (bool progress, ScopedLockType &peerSetLock) override |
| Hook called from invokeOnTimer(). | |
| void | done () |
| void | addPeers (std::size_t limit) |
| void | trigger (std::shared_ptr< Peer > const &) |
| std::weak_ptr< TimeoutCounter > | pmDowncast () override |
| Return a weak pointer to this. | |
| void | invokeOnTimer () |
| Calls onTimer() if in the right state. | |
Static Private Member Functions | |
| static auto & | getCounter () noexcept |
Private Attributes | |
| std::shared_ptr< SHAMap > | mMap |
| bool | mHaveRoot |
| std::unique_ptr< PeerSet > | mPeerSet |
| boost::asio::basic_waitable_timer< std::chrono::steady_clock > | timer_ |
Definition at line 12 of file TransactionAcquire.h.
Definition at line 18 of file TransactionAcquire.h.
|
protectedinherited |
Definition at line 64 of file TimeoutCounter.h.
| ripple::TransactionAcquire::TransactionAcquire | ( | Application & | app, |
| uint256 const & | hash, | ||
| std::unique_ptr< PeerSet > | peerSet | ||
| ) |
Definition at line 22 of file TransactionAcquire.cpp.
|
default |
| SHAMapAddNode ripple::TransactionAcquire::takeNodes | ( | std::vector< std::pair< SHAMapNodeID, Slice > > const & | data, |
| std::shared_ptr< Peer > const & | peer | ||
| ) |
Definition at line 157 of file TransactionAcquire.cpp.
| void ripple::TransactionAcquire::init | ( | int | startPeers | ) |
Definition at line 228 of file TransactionAcquire.cpp.
| void ripple::TransactionAcquire::stillNeed | ( | ) |
Definition at line 238 of file TransactionAcquire.cpp.
|
overrideprivatevirtual |
Hook called from invokeOnTimer().
Implements ripple::TimeoutCounter.
Definition at line 70 of file TransactionAcquire.cpp.
|
private |
Definition at line 41 of file TransactionAcquire.cpp.
|
private |
Definition at line 219 of file TransactionAcquire.cpp.
|
private |
Definition at line 92 of file TransactionAcquire.cpp.
|
overrideprivatevirtual |
Return a weak pointer to this.
Implements ripple::TimeoutCounter.
Definition at line 86 of file TransactionAcquire.cpp.
|
virtualinherited |
Cancel the task by marking it as failed if the task is not done.
Definition at line 99 of file TimeoutCounter.cpp.
|
protectedinherited |
Schedule a call to queueJob() after mTimerInterval.
Definition at line 31 of file TimeoutCounter.cpp.
|
protectedinherited |
Queue a job to call invokeOnTimer().
Definition at line 50 of file TimeoutCounter.cpp.
|
protectedinherited |
Definition at line 99 of file TimeoutCounter.h.
|
privateinherited |
Calls onTimer() if in the right state.
Only called by queueJob().
Definition at line 74 of file TimeoutCounter.cpp.
|
staticprivatenoexceptinherited |
Definition at line 110 of file CountedObject.h.
|
private |
Definition at line 38 of file TransactionAcquire.h.
|
private |
Definition at line 39 of file TransactionAcquire.h.
|
private |
Definition at line 40 of file TransactionAcquire.h.
|
protectedinherited |
Definition at line 106 of file TimeoutCounter.h.
|
protectedinherited |
Definition at line 107 of file TimeoutCounter.h.
|
mutableprotectedinherited |
Definition at line 108 of file TimeoutCounter.h.
|
protectedinherited |
The hash of the object (in practice, always a ledger) we are trying to fetch.
Definition at line 112 of file TimeoutCounter.h.
|
protectedinherited |
Definition at line 113 of file TimeoutCounter.h.
|
protectedinherited |
Definition at line 114 of file TimeoutCounter.h.
|
protectedinherited |
Definition at line 115 of file TimeoutCounter.h.
|
protectedinherited |
Whether forward progress has been made.
Definition at line 117 of file TimeoutCounter.h.
|
protectedinherited |
The minimum time to wait between calls to execute().
Definition at line 119 of file TimeoutCounter.h.
|
protectedinherited |
Definition at line 121 of file TimeoutCounter.h.
|
privateinherited |
Definition at line 130 of file TimeoutCounter.h.