Relational NT
A relational database kernel shaped around NT-style object management.
Loading...
Searching...
No Matches
LifecycleManager.h
Go to the documentation of this file.
1#pragma once
2
3#include "Api.h"
4#include "IStorageBackend.h"
5#include "ObjectManager.h"
6
11
12namespace nt {
26 public:
38
47 void Monitor(ObjectManager::registry* object);
48
62
75 void Pin(ObjectManager::registry* object);
76
87 void Unpin(ObjectManager::registry* object);
88
96 bool IsEligibleForGC(ObjectManager::registry* object) const;
97
114 bool Collect(ObjectManager::registry* object);
115
137 const bool Contention(ObjectManager::registry* object);
138
139 private:
155 void TryCollect(ObjectManager::registry* object);
156
164 void CascadeMultigroup(ObjectManager::registry* multigroup);
165
175 void CascadeBranchTree(ObjectManager::registry* branch_tree);
176
187 void CascadeEphemeral(ObjectManager::registry* ephemeral);
188
189 ObjectManager& objects_;
190 IStorageBackend& storage_;
191 };
192} // namespace nt
Defines symbol visibility for the Relational NT public API.
Abstract KV storage backend consumed by CursorManager and Merkle.
Declares the registry responsible for runtime-managed database objects.
Contract between CursorManager / Merkle and a physical storage engine.
Definition IStorageBackend.h:31
void Monitor(ObjectManager::registry *object)
Starts monitoring an object's lifecycle.
Definition LifecycleManager.cpp:14
bool Collect(ObjectManager::registry *object)
Forces a GC attempt on an object without decrementing a counter.
Definition LifecycleManager.cpp:48
void Unmonitor(ObjectManager::registry *object)
Stops monitoring an object.
Definition LifecycleManager.cpp:19
void Unpin(ObjectManager::registry *object)
Decrements the structural dependency count on an object.
Definition LifecycleManager.cpp:31
const bool Contention(ObjectManager::registry *object)
Serializes contention for changes to mutable reference states.
Definition LifecycleManager.cpp:44
void Pin(ObjectManager::registry *object)
Increments the structural dependency count on an object.
Definition LifecycleManager.cpp:26
LifecycleManager(ObjectManager &objects, IStorageBackend &storage)
Constructs a LifecycleManager bound to a registry and store.
Definition LifecycleManager.cpp:10
bool IsEligibleForGC(ObjectManager::registry *object) const
Returns true when the object is GC-eligible right now.
Definition LifecycleManager.cpp:38
Owns the registry used to locate and reference database objects.
Definition ObjectManager.h:27
Contains the Relational NT runtime managers and API facade.
Node in the object registry.
Definition ObjectManager.h:285