Struct solana_runtime::secondary_index::SecondaryIndex
source · pub struct SecondaryIndex<SecondaryIndexEntryType: SecondaryIndexEntry + Default + Sync + Send> {
pub index: DashMap<Pubkey, SecondaryIndexEntryType>,
pub reverse_index: DashMap<Pubkey, SecondaryReverseIndexEntry>,
/* private fields */
}
Fields§
§index: DashMap<Pubkey, SecondaryIndexEntryType>
§reverse_index: DashMap<Pubkey, SecondaryReverseIndexEntry>
Implementations§
source§impl<SecondaryIndexEntryType: SecondaryIndexEntry + Default + Sync + Send> SecondaryIndex<SecondaryIndexEntryType>
impl<SecondaryIndexEntryType: SecondaryIndexEntry + Default + Sync + Send> SecondaryIndex<SecondaryIndexEntryType>
pub fn new(metrics_name: &'static str) -> Self
pub fn insert(&self, key: &Pubkey, inner_key: &Pubkey)
pub fn remove_by_inner_key(&self, inner_key: &Pubkey)
pub fn get(&self, key: &Pubkey) -> Vec<Pubkey> ⓘ
sourcepub fn log_contents(&self)
pub fn log_contents(&self)
log top 20 (owner, # accounts) in descending order of # accounts
Trait Implementations§
source§impl<SecondaryIndexEntryType: Debug + SecondaryIndexEntry + Default + Sync + Send> Debug for SecondaryIndex<SecondaryIndexEntryType>
impl<SecondaryIndexEntryType: Debug + SecondaryIndexEntry + Default + Sync + Send> Debug for SecondaryIndex<SecondaryIndexEntryType>
source§impl<SecondaryIndexEntryType: Default + SecondaryIndexEntry + Default + Sync + Send> Default for SecondaryIndex<SecondaryIndexEntryType>
impl<SecondaryIndexEntryType: Default + SecondaryIndexEntry + Default + Sync + Send> Default for SecondaryIndex<SecondaryIndexEntryType>
source§fn default() -> SecondaryIndex<SecondaryIndexEntryType>
fn default() -> SecondaryIndex<SecondaryIndexEntryType>
Returns the “default value” for a type. Read more