Difference between revisions of "TNTFSDiskIndex"

From Ultibo.org
Jump to: navigation, search
(Created page with "Return to Unit NTFSClass __TOC__ === Description === ---- ''To be documented'' === Class definitions === ---- <div class="toccolours mw-collapsible m...")
 
 
Line 194: Line 194:
 
|-
 
|-
 
|colspan="2"|&nbsp;
 
|colspan="2"|&nbsp;
|-
 
| <code>function GetDropTest(AEntry:TBtreeObject; var ALeft:Boolean):TBtreeObject;</code>
 
| &nbsp;
 
 
|-
 
|-
 
| <code>function GetDrop(AEntry:TBtreeObject; var ALeft:Boolean):TBtreeObject; override;</code>
 
| <code>function GetDrop(AEntry:TBtreeObject; var ALeft:Boolean):TBtreeObject; override;</code>
Line 219: Line 216:
 
|-
 
|-
 
| <code>function DropNode(AEntry,ADrop,ATarget:TBtreeObject; ALeft:Boolean):Boolean; override;</code>
 
| <code>function DropNode(AEntry,ADrop,ATarget:TBtreeObject; ALeft:Boolean):Boolean; override;</code>
| &nbsp;
 
|-
 
| <code>function DropNodeOld(AEntry,ADrop:TBtreeObject; ALeft:Boolean):Boolean; override;</code>
 
 
| &nbsp;
 
| &nbsp;
 
|-
 
|-
Line 734: Line 728:
 
| Does not include the blank key
 
| Does not include the blank key
 
The minimum key count is 3 including the blank
 
The minimum key count is 3 including the blank
|-
 
|}
 
</div></div>
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">function TNTFSDiskIndex.GetDropTest(AEntry:TBtreeObject; var ALeft:Boolean):TBtreeObject;</pre>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the neighbour with appropriate number of keys to drop</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
! Note
 
| Always drop with the Righthand neighbour if available
 
If both lefthand and righthand nodes are nil then GetDrop will return the entry itself to indicate success, the node should then be dropped without demoting the parent.
 
No account is made of whether the lefthand or righthand nodes have room for the demoted parent, the caller must check for require push or split on the neighbour after drop.
 
 
|-
 
|-
 
|}
 
|}
Line 835: Line 815:
 
! Note
 
! Note
 
| None documented
 
| None documented
|-
 
|}
 
</div></div>
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">function TNTFSDiskIndex.DropNodeOld(AEntry,ADrop:TBtreeObject; ALeft:Boolean):Boolean;</pre>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Called before a node is dropped following removal of an entry</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
! Note
 
| Changed to account for Target
 
 
|-
 
|-
 
|}
 
|}

Latest revision as of 05:04, 21 June 2023

Return to Unit NTFSClass


Description


To be documented

Class definitions



[Expand]

TNTFSDiskIndex = class(TLinkedObjBtree)


Function declarations



[Expand]
constructor TNTFSDiskIndex.Create(AKeyLocal:TMutexHandle; ALock:TSynchronizerHandle; AVolumeVersion,ASectorSize:Word; AIndexType,ACollateRule:LongWord; AAttribute:TNTFSDiskAttribute);
Description: To be documented


[Expand]
destructor TNTFSDiskIndex.Destroy;
Description: To be documented


[Expand]
function TNTFSDiskIndex.GetNodesLock:TSynchronizerHandle;
Description: To be documented


[Expand]
function TNTFSDiskIndex.GetKeyLocal:TMutexHandle;
Description: To be documented


[Expand]
function TNTFSDiskIndex.GetNodeLocal:TMutexHandle;
Description: To be documented


[Expand]
function TNTFSDiskIndex.GetLoaded:Boolean;
Description: To be documented


[Expand]
procedure TNTFSDiskIndex.SetLoaded(AValue:Boolean);
Description: To be documented


[Expand]
function TNTFSDiskIndex.GetChanged:Boolean;
Description: To be documented


[Expand]
function TNTFSDiskIndex.GetUpCase:PNTFSUpCaseData;
Description: To be documented


[Expand]
function TNTFSDiskIndex.GetRootNode:TNTFSDiskNode;
Description: To be documented


[Expand]
function TNTFSDiskIndex.CreateNodes(ANew:Boolean):TNTFSDiskNodes;
Description: To be documented


[Expand]
function TNTFSDiskIndex.CompareKey(AEntry1,AEntry2:Pointer; ASize1,ASize2:Word):Integer;
Description: To be documented


[Expand]
function TNTFSDiskIndex.CompareBinary(AEntry1,AEntry2:Pointer; ASize1,ASize2:Word):Integer;
Description: To be documented


[Expand]
function TNTFSDiskIndex.CompareFileName(AEntry1,AEntry2:PWideChar; ASize1,ASize2:Word):Integer;
Description: To be documented


[Expand]
function TNTFSDiskIndex.CompareUnicode(AEntry1,AEntry2:PWideChar; ASize1,ASize2:Word):Integer;
Description: To be documented


[Expand]
function TNTFSDiskIndex.CompareLongWord(AEntry1,AEntry2:LongWord; ASize1,ASize2:Word):Integer;
Description: To be documented


[Expand]
function TNTFSDiskIndex.CompareSID(AEntry1,AEntry2:PSID; ASize1,ASize2:Word):Integer;
Description: To be documented


[Expand]
function TNTFSDiskIndex.CompareSecurityHash(AEntry1,AEntry2:PNTFSSecurityHashKeyData; ASize1,ASize2:Word):Integer;
Description: To be documented


[Expand]
function TNTFSDiskIndex.CompareGUID(AEntry1,AEntry2:PGUID; ASize1,ASize2:Word):Integer;
Description: To be documented


[Expand]
function TNTFSDiskIndex.GetEnd(AEntry:TBtreeObject):TBtreeObject;
Description: To be documented


[Expand]
function TNTFSDiskIndex.GetStart(AEntry:TBtreeObject):TBtreeObject;
Description: To be documented


[Expand]
function TNTFSDiskIndex.GetBlank(AEntry:TBtreeObject):TBtreeObject;
Description: To be documented


[Expand]
function TNTFSDiskIndex.GetMedian(AEntry:TBtreeObject):TBtreeObject;
Description: Get the median entry in the node of the supplied entry


[Expand]
function TNTFSDiskIndex.GetDrop(AEntry:TBtreeObject; var ALeft:Boolean):TBtreeObject;
Description: Get the neighbour with appropriate number of keys to drop


[Expand]
function TNTFSDiskIndex.GetMerge(AEntry:TBtreeObject):TBtreeObject;
Description: Get the neighbour with appropriate number of keys to merge


[Expand]
function TNTFSDiskIndex.GetBorrow(AEntry:TBtreeObject):TBtreeObject;
Description: Get the neighbour with sufficient keys to borrow one


[Expand]
function TNTFSDiskIndex.GetTarget(ADrop:TBtreeObject; ALeft:Boolean):TBtreeObject;
Description: Get the actual target within the neighbour that is appropriate to drop


[Expand]
function TNTFSDiskIndex.PushNode(AEntry:TBtreeObject):Boolean;
Description: Called before a node is pushed following insert of an entry


[Expand]
function TNTFSDiskIndex.SplitNode(AEntry:TBtreeObject):Boolean;
Description: Called before a node is split following insert of an entry


[Expand]
function TNTFSDiskIndex.DropNode(AEntry,ADrop,ATarget:TBtreeObject; ALeft:Boolean):Boolean;
Description: Called before a node is dropped following removal of an entry


[Expand]
function TNTFSDiskIndex.MergeNode(AEntry,AMerge:TBtreeObject):Boolean;
Description: Called before a node is merged following removal of an entry


[Expand]
function TNTFSDiskIndex.BorrowEntry(AEntry,ABorrow:TBtreeObject):Boolean;
Description: Called before an entry is borrowed following removal of an entry


[Expand]
function TNTFSDiskIndex.SwapEntry(AEntry,ASwap:TBtreeObject; ALeft:Boolean):Boolean;
Description: Called before an entry is swapped during a remove or borrow


[Expand]
function TNTFSDiskIndex.SetParentEntry(AEntry,AParent:TBtreeObject):Boolean;
Description: Called after an entry is reparented during a push, split, drop, merge, borrow or swap


[Expand]
function TNTFSDiskIndex.DeleteBlank(ABlank:TBtreeObject):Boolean;
Description: Delete a blank key when a node is removed (Merge/Drop)


[Expand]
function TNTFSDiskIndex.AttachBlank(ABlank:TBtreeObject):Boolean;
Description: Occurs immediately after a new Blank is Created and Attached


[Expand]
function TNTFSDiskIndex.DetachBlank(ABlank:TBtreeObject):Boolean;
Description: Occurs immediately before a Blank is Detached and Deleted


[Expand]
function TNTFSDiskIndex.AttachEntry(AEntry:TBtreeObject):Boolean;
Description: Occurs immediately after an Entry is Attached


[Expand]
function TNTFSDiskIndex.DetachEntry(AEntry:TBtreeObject):Boolean;
Description: Occurs immediately before an Entry is Detached


[Expand]
function TNTFSDiskIndex.RequirePush(AEntry:TBtreeObject):Boolean;
Description: Called after an entry is inserted to determine if a push is required


[Expand]
function TNTFSDiskIndex.RequireSplit(AEntry:TBtreeObject):Boolean;
Description: Called after an entry is inserted to determine if a split is required


[Expand]
function TNTFSDiskIndex.RequireDrop(AEntry:TBtreeObject):Boolean;
Description: Called after an entry is removed to determine if a drop is required


[Expand]
function TNTFSDiskIndex.RequireMerge(AEntry:TBtreeObject):Boolean;
Description: Called after an entry is removed to determine if a merge is required


[Expand]
function TNTFSDiskIndex.RequireBorrow(AEntry:TBtreeObject):Boolean;
Description: Called after an entry is removed to determine if a borrow is required


[Expand]
function TNTFSDiskIndex.NodeCount:Integer;
Description: To be documented


[Expand]
function TNTFSDiskIndex.CreateKey(ANode:TNTFSDiskNode; ABlank:Boolean):TNTFSDiskKey;
Description: Create a key in the supplied node do not insert in index or mark as added


[Expand]
function TNTFSDiskIndex.DestroyKey(AKey:TNTFSDiskKey):Boolean;
Description: Free the key, do not remove from the index


[Expand]
function TNTFSDiskIndex.NewKey(AKey,AData:Pointer; AKeySize,ADataSize:Word):TNTFSDiskKey;
Description: Create a key with the supplied data do not insert in index or mark as added


[Expand]
function TNTFSDiskIndex.NewKeyEx(AKey,AData,APadding:Pointer; AKeySize,ADataSize,APaddingSize:Word):TNTFSDiskKey;
Description: Create a key with the supplied data do not insert in index or mark as added


[Expand]
function TNTFSDiskIndex.AddKey(AParent,AKey:TNTFSDiskKey):Boolean;
Description: Add the key to the index (Blank allowed)


[Expand]
function TNTFSDiskIndex.InsertKey(AKey:TNTFSDiskKey):Boolean;
Description: Insert the key in the index (Blank not allowed)


[Expand]
function TNTFSDiskIndex.RemoveKey(AKey:TNTFSDiskKey):Boolean;
Description: Remove the key from the index and free (Blank not allowed)


[Expand]
function TNTFSDiskIndex.CreateNode(ANew:Boolean):TNTFSDiskNode;
Description: Create a node, add to list do not mark as added


[Expand]
function TNTFSDiskIndex.DestroyNode(ANode:TNTFSDiskNode):Boolean;
Description: Remove the node from the list and free


[Expand]
function TNTFSDiskIndex.NewNode(const ARecordNumber:Int64):TNTFSDiskNode;
Description: Create a node, add to list and mark as added


[Expand]
function TNTFSDiskIndex.GetNode(const ARecordNumber:Int64):TNTFSDiskNode;
Description: To be documented


[Expand]
function TNTFSDiskIndex.DeleteNode(ANode:TNTFSDiskNode):Boolean;
Description: Mark the node as deleted but do not free or remove


[Expand]
function TNTFSDiskIndex.RemoveNode(ANode:TNTFSDiskNode):Boolean;
Description: Remove the node from the list and free


[Expand]
function TNTFSDiskIndex.UpdateNodes(AVersion:Word):Boolean;
Description: To be documented


[Expand]
function TNTFSDiskIndex.FindKey(AValue:Pointer; ASize:Word):TNTFSDiskKey;
Description: To be documented


[Expand]
function TNTFSDiskIndex.ReadRoot(ABuffer:Pointer; var AOffset,ASize:LongWord; AVersion:Word):Boolean;
Description: Read the resident index header and entries from the supplied buffer at the supplied offset


[Expand]
function TNTFSDiskIndex.WriteRoot(ABuffer:Pointer; var AOffset,ASize:LongWord; AVersion:Word):Boolean;
Description: Write the resident index header and entries to the supplied buffer at the supplied offset


[Expand]
function TNTFSDiskIndex.ReadKeys(AParent:TNTFSDiskKey; ANode:TNTFSDiskNode; ABuffer:Pointer; var AOffset,ASize:LongWord; AVersion:Word):Boolean;
Description: Read the index entries from the supplied buffer at the supplied offset


[Expand]
function TNTFSDiskIndex.WriteKeys(AParent:TNTFSDiskKey; ANode:TNTFSDiskNode; ABuffer:Pointer; var AOffset,ASize:LongWord; AVersion:Word):Boolean;
Description: Write the index entries to the supplied buffer at the supplied offset


[Expand]
function TNTFSDiskIndex.ReaderLock:Boolean;
Description: To be documented


[Expand]
function TNTFSDiskIndex.ReaderUnlock:Boolean;
Description: To be documented


[Expand]
function TNTFSDiskIndex.WriterLock:Boolean;
Description: To be documented


[Expand]
function TNTFSDiskIndex.WriterUnlock:Boolean;
Description: To be documented


Return to Unit Reference