rippled
|
A leaf node for a transaction. More...
Public Member Functions | |
SHAMapTxLeafNode (boost::intrusive_ptr< SHAMapItem const > item, std::uint32_t cowid) | |
SHAMapTxLeafNode (boost::intrusive_ptr< SHAMapItem const > item, std::uint32_t cowid, SHAMapHash const &hash) | |
std::shared_ptr< SHAMapTreeNode > | clone (std::uint32_t cowid) const final override |
Make a copy of this node, setting the owner. More... | |
SHAMapNodeType | getType () const final override |
Determines the type of node. More... | |
void | updateHash () final override |
Recalculate the hash of this node. More... | |
void | serializeForWire (Serializer &s) const final override |
Serialize the node in a format appropriate for sending over the wire. More... | |
void | serializeWithPrefix (Serializer &s) const final override |
Serialize the node in a format appropriate for hashing. More... | |
bool | isLeaf () const final override |
Determines if this is a leaf node. More... | |
bool | isInner () const final override |
Determines if this is an inner node. More... | |
void | invariants (bool is_root=false) const final override |
boost::intrusive_ptr< SHAMapItem const > const & | peekItem () const |
bool | setItem (boost::intrusive_ptr< SHAMapItem const > i) |
Set the item that this node points to and update the node's hash. More... | |
std::string | getString (SHAMapNodeID const &) const final override |
std::uint32_t | cowid () const |
Returns the SHAMap that owns this node. More... | |
void | unshare () |
If this node is shared with another map, mark it as no longer shared. More... | |
SHAMapHash const & | getHash () const |
Return the hash of this node. More... | |
Static Public Member Functions | |
static std::shared_ptr< SHAMapTreeNode > | makeFromPrefix (Slice rawNode, SHAMapHash const &hash) |
static std::shared_ptr< SHAMapTreeNode > | makeFromWire (Slice rawNode) |
Protected Attributes | |
boost::intrusive_ptr< SHAMapItem const > | item_ |
SHAMapHash | hash_ |
std::uint32_t | cowid_ |
Determines the owning SHAMap, if any. More... | |
Static Private Member Functions | |
static std::shared_ptr< SHAMapTreeNode > | makeTransaction (Slice data, SHAMapHash const &hash, bool hashValid) |
static std::shared_ptr< SHAMapTreeNode > | makeAccountState (Slice data, SHAMapHash const &hash, bool hashValid) |
static std::shared_ptr< SHAMapTreeNode > | makeTransactionWithMeta (Slice data, SHAMapHash const &hash, bool hashValid) |
static auto & | getCounter () noexcept |
A leaf node for a transaction.
No metadata is included.
Definition at line 33 of file SHAMapTxLeafNode.h.
ripple::SHAMapTxLeafNode::SHAMapTxLeafNode | ( | boost::intrusive_ptr< SHAMapItem const > | item, |
std::uint32_t | cowid | ||
) |
Definition at line 37 of file SHAMapTxLeafNode.h.
ripple::SHAMapTxLeafNode::SHAMapTxLeafNode | ( | boost::intrusive_ptr< SHAMapItem const > | item, |
std::uint32_t | cowid, | ||
SHAMapHash const & | hash | ||
) |
Definition at line 45 of file SHAMapTxLeafNode.h.
|
finaloverridevirtual |
Make a copy of this node, setting the owner.
Implements ripple::SHAMapTreeNode.
Definition at line 54 of file SHAMapTxLeafNode.h.
|
finaloverridevirtual |
Determines the type of node.
Implements ripple::SHAMapTreeNode.
Definition at line 60 of file SHAMapTxLeafNode.h.
|
finaloverridevirtual |
Recalculate the hash of this node.
Implements ripple::SHAMapTreeNode.
Definition at line 66 of file SHAMapTxLeafNode.h.
|
finaloverridevirtual |
Serialize the node in a format appropriate for sending over the wire.
Implements ripple::SHAMapTreeNode.
Definition at line 73 of file SHAMapTxLeafNode.h.
|
finaloverridevirtual |
Serialize the node in a format appropriate for hashing.
Implements ripple::SHAMapTreeNode.
Definition at line 80 of file SHAMapTxLeafNode.h.
|
finaloverridevirtualinherited |
Determines if this is a leaf node.
Implements ripple::SHAMapTreeNode.
Definition at line 52 of file SHAMapLeafNode.h.
|
finaloverridevirtualinherited |
Determines if this is an inner node.
Implements ripple::SHAMapTreeNode.
Definition at line 58 of file SHAMapLeafNode.h.
|
finaloverridevirtualinherited |
Implements ripple::SHAMapTreeNode.
Definition at line 88 of file SHAMapLeafNode.cpp.
|
inherited |
Definition at line 44 of file SHAMapLeafNode.cpp.
|
inherited |
Set the item that this node points to and update the node's hash.
i | the new item |
Definition at line 50 of file SHAMapLeafNode.cpp.
|
finaloverridevirtualinherited |
Reimplemented from ripple::SHAMapTreeNode.
Definition at line 63 of file SHAMapLeafNode.cpp.
|
inherited |
Return the hash of this node.
Definition at line 143 of file SHAMapTreeNode.h.
|
staticinherited |
Definition at line 148 of file SHAMapTreeNode.cpp.
|
staticinherited |
Definition at line 116 of file SHAMapTreeNode.cpp.
|
staticprivateinherited |
Definition at line 40 of file SHAMapTreeNode.cpp.
|
staticprivateinherited |
Definition at line 84 of file SHAMapTreeNode.cpp.
|
staticprivateinherited |
Definition at line 55 of file SHAMapTreeNode.cpp.
|
staticprivatenoexceptinherited |
Definition at line 128 of file CountedObject.h.
|
protectedinherited |
Definition at line 35 of file SHAMapLeafNode.h.
|
protectedinherited |
Definition at line 56 of file SHAMapTreeNode.h.
|
protectedinherited |
Determines the owning SHAMap, if any.
Used for copy-on-write semantics.
If this value is 0, the node is not dirty and does not need to be flushed. It is eligible for sharing and may be included multiple SHAMap instances.
Definition at line 64 of file SHAMapTreeNode.h.