pub type BTreeMapTransaction<'a, K, V> = BTreeMapTransactionInner<K, V, &'a mut BTreeMap<K, V>>;
Aliased Type§
struct BTreeMapTransaction<'a, K, V> {
tree_ref: &'a mut BTreeMap<K, V>,
staging: BTreeMap<K, BTreeMapOp<V>>,
}
Fields§
§tree_ref: &'a mut BTreeMap<K, V>
A reference to the original BTreeMap
. All access to this field should be immutable,
except when we commit the staging changes to the original map.
staging: BTreeMap<K, BTreeMapOp<V>>
Store all the staging changes that will be applied to the original map on commit
Implementations§
source§impl BTreeMapTransaction<'_, CompactionGroupId, CompactionGroup>
impl BTreeMapTransaction<'_, CompactionGroupId, CompactionGroup>
sourcepub fn try_create_compaction_groups(
&mut self,
compaction_group_ids: &[CompactionGroupId],
config: Arc<CompactionConfig>,
) -> bool
pub fn try_create_compaction_groups( &mut self, compaction_group_ids: &[CompactionGroupId], config: Arc<CompactionConfig>, ) -> bool
Inserts compaction group configs if they do not exist.
pub fn create_compaction_groups( &mut self, compaction_group_id: CompactionGroupId, config: Arc<CompactionConfig>, )
sourcepub(crate) fn try_get_compaction_group_config(
&self,
compaction_group_id: CompactionGroupId,
) -> Option<&CompactionGroup>
pub(crate) fn try_get_compaction_group_config( &self, compaction_group_id: CompactionGroupId, ) -> Option<&CompactionGroup>
Tries to get compaction group config for compaction_group_id
.
sourcepub fn purge(&mut self, existing_groups: HashSet<CompactionGroupId>)
pub fn purge(&mut self, existing_groups: HashSet<CompactionGroupId>)
Removes stale group configs.