C# 클래스 GSF.IO.FileStructure.Media.PageReplacementAlgorithm

A page replacement algorithm that utilizes a quasi LRU algorithm. This class is thread safe.
This class is used by BufferedFile to decide which pages should be replaced.
상속: IDisposable
파일 보기 프로젝트 열기: GridProtectionAlliance/openHistorian 1 사용 예제들

공개 메소드들

메소드 설명
Dispose ( ) : void

Releases all the resources used by the PageReplacementAlgorithm object.

DoCollection ( CollectionEventArgs e ) : int

Executes a collection cycle of the pages that are unused.

PageReplacementAlgorithm ( MemoryPool pool ) : System

Creates a new instance of PageReplacementAlgorithm.

TryAddPage ( long position, IntPtr locationOfPage, int memoryPoolIndex ) : bool

Attempts to add the page to this PageReplacementAlgorithm. Fails if the page already exists.

메소드 상세

Dispose() 공개 메소드

Releases all the resources used by the PageReplacementAlgorithm object.
public Dispose ( ) : void
리턴 void

DoCollection() 공개 메소드

Executes a collection cycle of the pages that are unused.
public DoCollection ( CollectionEventArgs e ) : int
e GSF.IO.Unmanaged.CollectionEventArgs
리턴 int

PageReplacementAlgorithm() 공개 메소드

Creates a new instance of PageReplacementAlgorithm.
public PageReplacementAlgorithm ( MemoryPool pool ) : System
pool MemoryPool The memory pool that blocks will be allocated from.
리턴 System

TryAddPage() 공개 메소드

Attempts to add the page to this PageReplacementAlgorithm. Fails if the page already exists.
public TryAddPage ( long position, IntPtr locationOfPage, int memoryPoolIndex ) : bool
position long the absolute position that the page references
locationOfPage IntPtr the pointer to the page
memoryPoolIndex int the index value of the memory pool page so it can be released back to the memory pool
리턴 bool