IOptimizedPersistable Properties |
The IOptimizedPersistable type exposes the following members.
Name | Description | |
---|---|---|
AllowOtherTypesOnSamePage |
By default true but override as returning false so that this type of objects isn't sharing pages with other type of objects.
| |
Cache |
By default, the an object cache is determined by a SessionBase constructor parameter but certain types of objects may be re opened more frequently than others, for such types override this to return a value.
Caching objects this way can cause out of date object references to stay active due to lacking code to invalidate a cached object when referenced objects are replaced.
We will add this automatic invalidation as soon as possible but for now use caution when caching objects. Caching objects that does not strongly reference other objects is OK to do.
| |
FieldsLoaded |
Gets the field members load state. By default, all members are loaded when a persistent object is opened but if an overrode of LazyLoadFields returns true then the object members are loaded by calling [!:OptimizedPersistable.LoadFields] | |
FlushIfPageFull |
By default we flush (write) any updated page we find when looking for an object placement page and the page is considered full (depends on how many objects we permit/page)
| |
Id |
Gets the id of this object. The id is structured as Oid | |
IsPersistent | ||
IsUpdated |
Gets the updated state of the object
| |
LazyLoadFields |
By default all fields are loaded when opening a persistent object but an option is provided to load members on demand (lazy loading).
| |
MaxNumberOfDatabases |
Possibly restrict instances of to a single Database. By default this property is UInt32.MaxValue but classes like BTreeSetOidShort, BTreeMapShortOid ... override this property to return 1 since short references are restricted to a single Database.
| |
ObjectsPerPage |
A default for number of objects per database page used when persisting objects without an explicit Placement object or if persisted using Persist(SessionBase, IOptimizedPersistable, Boolean, Boolean)
This happens when objects are persisted by reachability from a persistent object.
All objects reachable from a persistent object are automatically made persistent.
| |
PagesPerDatabase |
A default for number of objects per database page used when persisting objects without an explicit Placement object or if persisting using Persist(SessionBase, IOptimizedPersistable, Boolean, Boolean)
This happens when objects are persisted by reachability from a persistent object.
All objects reachable from a persistent object are automatically made persistent.
| |
PlacementDatabaseNumber |
Gets the Database Id number to use when placing (persisting) an instance of this class when no other placement directive has been given.
| |
RemovedFromIndices | true if call to [!:Update(bool)] or UpdateObject(IOptimizedPersistable, Boolean, Boolean) caused this object to be removed from possible indices
|