C# Class GSF.IO.FileStructure.Media.PageList

Contains a list of page meta data. Provides a simplified way to interact with this list. This class is not thread safe.
Inheritance: IDisposable
Mostrar archivo Open project: GridProtectionAlliance/openHistorian

Public Methods

Method Description
AddNewPage ( int positionIndex, IntPtr locationOfPage, int memoryPoolIndex ) : int

Finds the next unused cache page index. Marks it as used. Assigns the page information that comes from the memory pool.

Dispose ( ) : void

Releases all the resources used by the PageList object.

DoCollection ( int shiftLevel, HashSet excludedList, CollectionEventArgs e ) : int

Executes a collection cycle on the pages in this list.

If the collection mode is Emergency or Critical, it will only release the required number of pages and no more

GetPointerToPage ( int pageIndex, int incrementReferencedCount ) : IntPtr

Returns the pointer for the provided page index.

PageList ( MemoryPool memoryPool ) : System

Creates a new PageMetaDataList.

TryGetPageIndex ( int positionIndex, int &pageIndex ) : bool

Converts a number from its position index into a page index.

Method Details

AddNewPage() public method

Finds the next unused cache page index. Marks it as used. Assigns the page information that comes from the memory pool.
public AddNewPage ( int positionIndex, IntPtr locationOfPage, int memoryPoolIndex ) : int
positionIndex int
locationOfPage System.IntPtr
memoryPoolIndex int
return int

Dispose() public method

Releases all the resources used by the PageList object.
public Dispose ( ) : void
return void

DoCollection() public method

Executes a collection cycle on the pages in this list.
If the collection mode is Emergency or Critical, it will only release the required number of pages and no more
public DoCollection ( int shiftLevel, HashSet excludedList, CollectionEventArgs e ) : int
shiftLevel int the number of bits to shift the referenced counter by. /// Value may be zero but cannot be negative
excludedList HashSet A set of values to exclude from the collection process
e GSF.IO.Unmanaged.CollectionEventArgs Arguments for the collection.
return int

GetPointerToPage() public method

Returns the pointer for the provided page index.
public GetPointerToPage ( int pageIndex, int incrementReferencedCount ) : IntPtr
pageIndex int the index of the page that has been looked up for the position.
incrementReferencedCount int the value to increment the referenced count.
return System.IntPtr

PageList() public method

Creates a new PageMetaDataList.
public PageList ( MemoryPool memoryPool ) : System
memoryPool GSF.IO.Unmanaged.MemoryPool The buffer pool to utilize if any unmanaged memory needs to be created.
return System

TryGetPageIndex() public method

Converts a number from its position index into a page index.
public TryGetPageIndex ( int positionIndex, int &pageIndex ) : bool
positionIndex int the position divided by the page size.
pageIndex int the page index
return bool