|
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 30 of file TransactionAcquire.h.
Definition at line 36 of file TransactionAcquire.h.
|
protectedinherited |
Definition at line 83 of file TimeoutCounter.h.
| ripple::TransactionAcquire::TransactionAcquire | ( | Application & | app, |
| uint256 const & | hash, | ||
| std::unique_ptr< PeerSet > | peerSet | ||
| ) |
Definition at line 41 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 176 of file TransactionAcquire.cpp.
| void ripple::TransactionAcquire::init | ( | int | startPeers | ) |
Definition at line 247 of file TransactionAcquire.cpp.
| void ripple::TransactionAcquire::stillNeed | ( | ) |
Definition at line 257 of file TransactionAcquire.cpp.
|
overrideprivatevirtual |
Hook called from invokeOnTimer().
Implements ripple::TimeoutCounter.
Definition at line 89 of file TransactionAcquire.cpp.
|
private |
Definition at line 60 of file TransactionAcquire.cpp.
|
private |
Definition at line 238 of file TransactionAcquire.cpp.
|
private |
Definition at line 111 of file TransactionAcquire.cpp.
|
overrideprivatevirtual |
Return a weak pointer to this.
Implements ripple::TimeoutCounter.
Definition at line 105 of file TransactionAcquire.cpp.
|
virtualinherited |
Cancel the task by marking it as failed if the task is not done.
Definition at line 118 of file TimeoutCounter.cpp.
|
protectedinherited |
Schedule a call to queueJob() after mTimerInterval.
Definition at line 50 of file TimeoutCounter.cpp.
|
protectedinherited |
Queue a job to call invokeOnTimer().
Definition at line 69 of file TimeoutCounter.cpp.
|
protectedinherited |
Definition at line 118 of file TimeoutCounter.h.
|
privateinherited |
Calls onTimer() if in the right state.
Only called by queueJob().
Definition at line 93 of file TimeoutCounter.cpp.
|
staticprivatenoexceptinherited |
Definition at line 129 of file CountedObject.h.
|
private |
Definition at line 56 of file TransactionAcquire.h.
|
private |
Definition at line 57 of file TransactionAcquire.h.
|
private |
Definition at line 58 of file TransactionAcquire.h.
|
protectedinherited |
Definition at line 125 of file TimeoutCounter.h.
|
protectedinherited |
Definition at line 126 of file TimeoutCounter.h.
|
mutableprotectedinherited |
Definition at line 127 of file TimeoutCounter.h.
|
protectedinherited |
The hash of the object (in practice, always a ledger) we are trying to fetch.
Definition at line 131 of file TimeoutCounter.h.
|
protectedinherited |
Definition at line 132 of file TimeoutCounter.h.
|
protectedinherited |
Definition at line 133 of file TimeoutCounter.h.
|
protectedinherited |
Definition at line 134 of file TimeoutCounter.h.
|
protectedinherited |
Whether forward progress has been made.
Definition at line 136 of file TimeoutCounter.h.
|
protectedinherited |
The minimum time to wait between calls to execute().
Definition at line 138 of file TimeoutCounter.h.
|
protectedinherited |
Definition at line 140 of file TimeoutCounter.h.
|
privateinherited |
Definition at line 149 of file TimeoutCounter.h.