| 
    rippled
    
   | 
 
#include <CachedView.h>


Public Types | |
| using | digest_type = uint256 | 
| using | tx_type = std::pair< std::shared_ptr< STTx const >, std::shared_ptr< STObject const > > | 
| using | key_type = uint256 | 
| using | mapped_type = std::shared_ptr< SLE const > | 
Public Member Functions | |
| CachedViewImpl ()=delete | |
| CachedViewImpl (CachedViewImpl const &)=delete | |
| CachedViewImpl & | operator= (CachedViewImpl const &)=delete | 
| CachedViewImpl (DigestAwareReadView const *base, CachedSLEs &cache) | |
| bool | exists (Keylet const &k) const override | 
| Determine if a state item exists.   | |
| std::shared_ptr< SLE const > | read (Keylet const &k) const override | 
| Return the state item associated with a key.   | |
| bool | open () const override | 
| Returns true if this reflects an open ledger.   | |
| LedgerInfo const & | info () const override | 
| Returns information about the ledger.   | |
| Fees const & | fees () const override | 
| Returns the fees for the base ledger.   | |
| Rules const & | rules () const override | 
| Returns the tx processing rules.   | |
| std::optional< key_type > | succ (key_type const &key, std::optional< key_type > const &last=std::nullopt) const override | 
| Return the key of the next state item.   | |
| std::unique_ptr< sles_type::iter_base > | slesBegin () const override | 
| std::unique_ptr< sles_type::iter_base > | slesEnd () const override | 
| std::unique_ptr< sles_type::iter_base > | slesUpperBound (uint256 const &key) const override | 
| std::unique_ptr< txs_type::iter_base > | txsBegin () const override | 
| std::unique_ptr< txs_type::iter_base > | txsEnd () const override | 
| bool | txExists (key_type const &key) const override | 
Returns true if a tx exists in the tx map.   | |
| tx_type | txRead (key_type const &key) const override | 
| Read a transaction from the tx map.   | |
| std::optional< digest_type > | digest (key_type const &key) const override | 
| Return the digest associated with the key.   | |
| NetClock::time_point | parentCloseTime () const | 
| Returns the close time of the previous ledger.   | |
| LedgerIndex | seq () const | 
| Returns the sequence number of the base ledger.   | |
| virtual STAmount | balanceHook (AccountID const &account, AccountID const &issuer, STAmount const &amount) const | 
| virtual std::uint32_t | ownerCountHook (AccountID const &account, std::uint32_t count) const | 
| virtual std::unique_ptr< sles_type::iter_base > | slesUpperBound (key_type const &key) const =0 | 
Public Attributes | |
| sles_type | sles | 
| Iterable range of ledger state items.   | |
| txs_type | txs | 
Private Attributes | |
| DigestAwareReadView const & | base_ | 
| CachedSLEs & | cache_ | 
| std::mutex | mutex_ | 
| std::unordered_map< key_type, uint256, hardened_hash<> > | map_ | 
Definition at line 15 of file CachedView.h.
      
  | 
  inherited | 
Definition at line 238 of file ReadView.h.
      
  | 
  inherited | 
Definition at line 34 of file ReadView.h.
      
  | 
  inherited | 
Definition at line 37 of file ReadView.h.
      
  | 
  inherited | 
Definition at line 39 of file ReadView.h.
      
  | 
  delete | 
      
  | 
  delete | 
| ripple::detail::CachedViewImpl::CachedViewImpl | ( | DigestAwareReadView const * | base, | 
| CachedSLEs & | cache | ||
| ) | 
Definition at line 29 of file CachedView.h.
      
  | 
  delete | 
      
  | 
  overridevirtual | 
Determine if a state item exists.
true if a SLE is associated with the specified key. Implements ripple::ReadView.
Definition at line 8 of file CachedView.cpp.
      
  | 
  overridevirtual | 
Return the state item associated with a key.
Effects: If the key exists, gives the caller ownership of the non-modifiable corresponding SLE.
const from the perspective of the caller, it can be changed by other callers through raw operations.nullptr if the key is not present or if the type does not match. Implements ripple::ReadView.
Definition at line 14 of file CachedView.cpp.
      
  | 
  overridevirtual | 
Returns true if this reflects an open ledger.
Implements ripple::ReadView.
Definition at line 45 of file CachedView.h.
      
  | 
  overridevirtual | 
Returns information about the ledger.
Implements ripple::ReadView.
Definition at line 51 of file CachedView.h.
      
  | 
  overridevirtual | 
Returns the fees for the base ledger.
Implements ripple::ReadView.
Definition at line 57 of file CachedView.h.
      
  | 
  overridevirtual | 
Returns the tx processing rules.
Implements ripple::ReadView.
Definition at line 63 of file CachedView.h.
      
  | 
  overridevirtual | 
Return the key of the next state item.
This returns the key of the first state item whose key is greater than the specified key. If no such key is present, std::nullopt is returned.
If last is engaged, returns std::nullopt when the key returned would be outside the open interval (key, last). 
Implements ripple::ReadView.
Definition at line 69 of file CachedView.h.
      
  | 
  overridevirtual | 
Implements ripple::ReadView.
Definition at line 77 of file CachedView.h.
      
  | 
  overridevirtual | 
Implements ripple::ReadView.
Definition at line 83 of file CachedView.h.
      
  | 
  override | 
Definition at line 89 of file CachedView.h.
      
  | 
  overridevirtual | 
Implements ripple::ReadView.
Definition at line 95 of file CachedView.h.
      
  | 
  overridevirtual | 
Implements ripple::ReadView.
Definition at line 101 of file CachedView.h.
      
  | 
  overridevirtual | 
Returns true if a tx exists in the tx map. 
A tx exists in the map if it is part of the base ledger, or if it is a newly inserted tx.
Implements ripple::ReadView.
Definition at line 107 of file CachedView.h.
Read a transaction from the tx map.
If the view represents an open ledger, the metadata object will be empty.
Implements ripple::ReadView.
Definition at line 113 of file CachedView.h.
      
  | 
  overridevirtual | 
Return the digest associated with the key.
Implements ripple::DigestAwareReadView.
Definition at line 123 of file CachedView.h.
      
  | 
  inherited | 
Returns the close time of the previous ledger.
Definition at line 92 of file ReadView.h.
      
  | 
  inherited | 
Returns the sequence number of the base ledger.
Definition at line 99 of file ReadView.h.
      
  | 
  virtualinherited | 
Reimplemented in ripple::PaymentSandbox.
Definition at line 159 of file ReadView.h.
      
  | 
  virtualinherited | 
Reimplemented in ripple::PaymentSandbox.
Definition at line 173 of file ReadView.h.
      
  | 
  pure virtualinherited | 
      
  | 
  private | 
Definition at line 18 of file CachedView.h.
      
  | 
  private | 
Definition at line 19 of file CachedView.h.
      
  | 
  mutableprivate | 
Definition at line 20 of file CachedView.h.
      
  | 
  mutableprivate | 
Definition at line 21 of file CachedView.h.
      
  | 
  inherited | 
Iterable range of ledger state items.
Definition at line 226 of file ReadView.h.
      
  | 
  inherited | 
Definition at line 229 of file ReadView.h.