CCF
|
#include <historical_queries.h>
Inherits ccf::historical::StateCacheImpl, and ccf::historical::AbstractStateCache.
|
inline |
|
inlineoverridevirtual |
Drop state for the given handle.
May be used to free up space once a historical query has been resolved, more aggressively than waiting for the states to expire.
Implements ccf::historical::AbstractStateCache.
|
inlineoverridevirtual |
Same as get_state_at
but uses default expiry value.
Implements ccf::historical::AbstractStateCache.
|
inlineoverridevirtual |
Retrieve a full state at a given seqno, including the Store, the TxID assigned by consensus, and an offline-verifiable receipt for the Tx.
Implements ccf::historical::AbstractStateCache.
|
inlineoverridevirtual |
Same as get_state_range
but uses default expiry value.
Implements ccf::historical::AbstractStateCache.
|
inlineoverridevirtual |
Retrieve a range of states at the given indices, including the Store, the TxID assigned by consensus, and an offline-verifiable receipt for the Tx.
Implements ccf::historical::AbstractStateCache.
|
inlineoverridevirtual |
Implements ccf::historical::AbstractStateCache.
|
inlineoverridevirtual |
Retrieve states for a set of given indices.
Implements ccf::historical::AbstractStateCache.
|
inlineoverridevirtual |
Same as get_store_at
but uses default expiry value.
Implements ccf::historical::AbstractStateCache.
|
inlineoverridevirtual |
Retrieve a Store containing the state written at the given seqno.
See get_store_range
for a description of the caching behaviour. This is equivalent to get_store_at(handle, seqno, seqno), but returns nullptr if the state is currently unavailable.
Implements ccf::historical::AbstractStateCache.
|
inlineoverridevirtual |
Same as get_store_range
but uses default expiry value.
Implements ccf::historical::AbstractStateCache.
|
inlineoverridevirtual |
Retrieve a range of Stores containing the state written at the given indices.
If this is not currently available, this function returns an empty vector and begins fetching the ledger entry asynchronously. This will generally be true for the first call for a given seqno, and it may take some time to completely fetch and validate. The call should be repeated later with the same arguments to retrieve the requested entries. This state is kept until it is deleted for one of the following reasons:
drop_cached_states
seconds_until_expiry
seconds elapse without calling this functionThe range is inclusive of both start_seqno and end_seqno. If a non-empty vector is returned, it will always contain the full requested range; the vector will be of length (end_seqno - start_seqno + 1) and will contain no nullptrs.
Implements ccf::historical::AbstractStateCache.
|
inlineoverridevirtual |
Implements ccf::historical::AbstractStateCache.
|
inlineoverridevirtual |
Retrieve stores for a set of given indices.
Implements ccf::historical::AbstractStateCache.
|
inlineprotected |
|
inlineoverridevirtual |
Set the default time after which a request's state will be deleted, and will not be accessible without retrieving it again from the ledger. Any call to get_store_XXX which doesn't pass an explicit seconds_until_expiry will reset the timer to this default duration.
Implements ccf::historical::AbstractStateCache.
|
inlineoverridevirtual |
Set the cache limit (in bytes) to evict least recently used requests from the cache after its size grows beyond this limit. The limit is not strict. It is estimated based on serialized states' sizes approximation and is checked once per tick, and so it can overflow for a short time.
Implements ccf::historical::AbstractStateCache.
|
inlineoverridevirtual |
EXPERIMENTAL: Set the tracking of deletes on missing keys for historical queries.
This is experimental but setting this to true ensures that the tx_diff
available in index handlers can observe deleted values.
Implements ccf::historical::AbstractStateCache.