[−][src]Trait grin_chain::linked_list::PruneableListIndex
A pruneable list index supports pruning of old data from the index lists. This allows us to efficiently maintain an index of "recent" kernel data. We can maintain a window of 2 weeks of recent data, discarding anything older than this.
Required methods
pub fn clear(&self, batch: &Batch<'_>) -> Result<(), Error>
[src]
Clear all data from the index. Used when rebuilding the index.
pub fn prune(
&self,
batch: &Batch<'_>,
commit: Commitment,
cutoff_pos: u64
) -> Result<(), Error>
[src]
&self,
batch: &Batch<'_>,
commit: Commitment,
cutoff_pos: u64
) -> Result<(), Error>
Prune old data.
pub fn pop_pos_back(
&self,
batch: &Batch<'_>,
commit: Commitment
) -> Result<Option<<Self::Entry as ListIndexEntry>::Pos>, Error>
[src]
&self,
batch: &Batch<'_>,
commit: Commitment
) -> Result<Option<<Self::Entry as ListIndexEntry>::Pos>, Error>
Pop a pos off the back of the list (used for pruning old data).
Implementors
impl<T: PosEntry> PruneableListIndex for MultiIndex<T>
[src]
pub fn clear(&self, batch: &Batch<'_>) -> Result<(), Error>
[src]
pub fn prune(
&self,
_batch: &Batch<'_>,
_commit: Commitment,
_cutoff_pos: u64
) -> Result<(), Error>
[src]
&self,
_batch: &Batch<'_>,
_commit: Commitment,
_cutoff_pos: u64
) -> Result<(), Error>
Pruning will be more performant than full rebuild but not yet necessary.
pub fn pop_pos_back(
&self,
batch: &Batch<'_>,
commit: Commitment
) -> Result<Option<T>, Error>
[src]
&self,
batch: &Batch<'_>,
commit: Commitment
) -> Result<Option<T>, Error>
Pop off the back/tail of the linked list. Used when pruning old data.