rippled
|
Public Member Functions | |
SHAMapLeafNode (const SHAMapLeafNode &)=delete | |
SHAMapLeafNode & | operator= (const SHAMapLeafNode &)=delete |
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... | |
virtual std::shared_ptr< SHAMapTreeNode > | clone (std::uint32_t cowid) const =0 |
Make a copy of this node, setting the owner. More... | |
virtual void | updateHash ()=0 |
Recalculate the hash of this node. More... | |
SHAMapHash const & | getHash () const |
Return the hash of this node. More... | |
virtual SHAMapNodeType | getType () const =0 |
Determines the type of node. More... | |
virtual void | serializeForWire (Serializer &) const =0 |
Serialize the node in a format appropriate for sending over the wire. More... | |
virtual void | serializeWithPrefix (Serializer &) const =0 |
Serialize the node in a format appropriate for hashing. 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 Member Functions | |
SHAMapLeafNode (boost::intrusive_ptr< SHAMapItem const > item, std::uint32_t cowid) | |
SHAMapLeafNode (boost::intrusive_ptr< SHAMapItem const > item, std::uint32_t cowid, SHAMapHash const &hash) | |
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) |
Definition at line 32 of file SHAMapLeafNode.h.
|
protected |
Definition at line 26 of file SHAMapLeafNode.cpp.
|
protected |
Definition at line 34 of file SHAMapLeafNode.cpp.
|
delete |
|
delete |
|
finaloverridevirtual |
Determines if this is a leaf node.
Implements ripple::SHAMapTreeNode.
Definition at line 52 of file SHAMapLeafNode.h.
|
finaloverridevirtual |
Determines if this is an inner node.
Implements ripple::SHAMapTreeNode.
Definition at line 58 of file SHAMapLeafNode.h.
|
finaloverridevirtual |
Implements ripple::SHAMapTreeNode.
Definition at line 88 of file SHAMapLeafNode.cpp.
boost::intrusive_ptr< SHAMapItem const > const & ripple::SHAMapLeafNode::peekItem | ( | ) | const |
Definition at line 44 of file SHAMapLeafNode.cpp.
bool ripple::SHAMapLeafNode::setItem | ( | boost::intrusive_ptr< SHAMapItem const > | i | ) |
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.
|
finaloverridevirtual |
Reimplemented from ripple::SHAMapTreeNode.
Definition at line 63 of file SHAMapLeafNode.cpp.
|
pure virtualinherited |
Recalculate the hash of this node.
Implemented in ripple::SHAMapInnerNode, ripple::SHAMapAccountStateLeafNode, ripple::SHAMapTxPlusMetaLeafNode, and ripple::SHAMapTxLeafNode.
|
inherited |
Return the hash of this node.
Definition at line 143 of file SHAMapTreeNode.h.
|
pure virtualinherited |
Determines the type of node.
Implemented in ripple::SHAMapInnerNode, ripple::SHAMapTxPlusMetaLeafNode, ripple::SHAMapAccountStateLeafNode, and ripple::SHAMapTxLeafNode.
|
pure virtualinherited |
Serialize the node in a format appropriate for sending over the wire.
Implemented in ripple::SHAMapAccountStateLeafNode, ripple::SHAMapTxPlusMetaLeafNode, ripple::SHAMapTxLeafNode, and ripple::SHAMapInnerNode.
|
pure virtualinherited |
Serialize the node in a format appropriate for hashing.
Implemented in ripple::SHAMapAccountStateLeafNode, ripple::SHAMapTxPlusMetaLeafNode, ripple::SHAMapTxLeafNode, and ripple::SHAMapInnerNode.
|
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.
|
protected |
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.