Struct object_tracker::ObjectTracker
source · pub struct ObjectTracker {
pub(crate) object_id_generator: Mutex<StdRng>,
pub(crate) object_map: DashMap<ObjectId, Arc<Object>>,
pub(crate) version_manager: VersionManager,
}Fields§
§object_id_generator: Mutex<StdRng>§object_map: DashMap<ObjectId, Arc<Object>>§version_manager: VersionManagerImplementations§
source§impl ObjectTracker
impl ObjectTracker
pub fn new(client_id: u16) -> Option<Self>
sourcepub(crate) fn generate_safe_object_id(&self) -> Option<ObjectId>
pub(crate) fn generate_safe_object_id(&self) -> Option<ObjectId>
Generates an object ID for an application object. We currently reserve the lower 32 bits of the global address space for system-level objects and for objects that need to be “well-known” even before a subocomponent’s first initialization (like the KVS root object).
pub fn allocate( &self, size: usize, object_id: Option<ObjectId> ) -> Result<Arc<Object>, ObjectOperationError>
pub fn copy_underlying_object( &self, object: &Object, into_object: Option<ObjectId> ) -> Option<ObjectId>
pub fn open( &self, object_id: ObjectId ) -> Result<Arc<Object>, ObjectOperationError>
pub fn close(&self, object_id: ObjectId) -> Result<(), AccessError>
pub fn reload(&self, object_id: ObjectId) -> Result<(), ObjectOperationError>
pub fn get(&self, object_id: ObjectId) -> Option<Arc<Object>>
pub fn get_as_bytes(&self, object_id: ObjectId) -> Result<Vec<u8>, AccessError>
pub fn flush(&self, object_id: ObjectId) -> Result<(), AccessError>
pub fn get_backing_storage_path( &self, object_id: ObjectId ) -> Result<PathBuf, AccessError>
pub fn get_keys(&self) -> Vec<ObjectId>
pub fn object_is_local(&self, object_id: &ObjectId) -> bool
pub fn shutdown(&self)
pub fn drop_object(&self, object_id: ObjectId)
pub fn delete_object(&self, object_id: ObjectId)
pub fn push_initial_version( &self, object_id: ObjectId, object: MaterializedObjectVersion )
pub fn push_initial_version_by_id(&self, object_id: ObjectId)
pub fn create_materialized_ro_version(&self, object_id: ObjectId)
pub fn get_latest_committed( &self, object_id: ObjectId ) -> Option<Arc<MaterializedObjectVersion>>
pub fn get_at( &self, object_id: ObjectId, target_version: ObjectVersion ) -> Option<Arc<MaterializedObjectVersion>>
pub fn push_versions<F>( &self, log_entry: &TransactionLogEntry, should_ignore: Option<F> )where F: Fn(ObjectId) -> bool,
pub fn reset_object_directory(&self)
pub fn read_object_directory(&self)
Auto Trait Implementations§
impl !RefUnwindSafe for ObjectTracker
impl Send for ObjectTracker
impl Sync for ObjectTracker
impl Unpin for ObjectTracker
impl !UnwindSafe for ObjectTracker
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more