DiskDriver Class

Definition

Line 119 of cmsxk/DiskDriver.cm

Constructors & Destructor

static DiskDriver()
private DiskDriver()
public ~DiskDriver()

Member Functions

public void AddFile(HostFile* hostFile)
public void Exit()
public HostFile* GetOrInsertHostFile(const String<char>& hostFilePath, bool randomAccess)
public static nothrow DiskDriver& Instance()
public void InterruptService()
public void ProcessRequests()
public long Read(Block* block)
public void RemoveHostFile(const String<char>& hostFilePath)
public void Run()
public void SendAddFileRequest(HostFile* hostFile)
public void Start()
public void Stop()
public long Write(Block* block)

Member Variables

private void* completionPort
private Queue<IOCompletion> completionQueue
private void* ddRequestProcessedEvent
private Queue<UniquePtr<DDRequest>> ddRequestQueue
private List<void*> eventHandles
private bool exit
private List<UniquePtr<HostFile>> hostFiles
private static UniquePtr<DiskDriver> instance
private HashMap<ulong, HostFile*, Hasher<ulong>, EqualTo<ulong>> keyHostFileMap
private Mutex mtx
private ulong nextHostFileKey
private int nextRequestNumber
private HashMap<String<char>, HostFile*, Hasher<String<char>>, EqualTo<String<char>>> pathHostFileMap
private HashMap<void*, IORequest*, Hasher<void*>, EqualTo<void*>> requestMap
private Thread thread

Constructor& Destructor Details

DiskDriver Static Constructor

static DiskDriver()

Definition
Line 121 of cmsxk/DiskDriver.cm


DiskDriver Constructor

private DiskDriver()

Definition
Line 128 of cmsxk/DiskDriver.cm


~DiskDriver Destructor

public ~DiskDriver()

Definition
Line 141 of cmsxk/DiskDriver.cm


Member Function Details

AddFile Member Function

public void AddFile(HostFile* hostFile)

Definition
Line 197 of cmsxk/DiskDriver.cm


Exit Member Function

public void Exit()

Definition
Line 270 of cmsxk/DiskDriver.cm


GetOrInsertHostFile Member Function

public HostFile* GetOrInsertHostFile(const String<char>& hostFilePath, bool randomAccess)

Definition
Line 146 of cmsxk/DiskDriver.cm


Instance Static Member Function

public static nothrow DiskDriver& Instance()

Definition
Line 124 of cmsxk/DiskDriver.cm


InterruptService Member Function

public void InterruptService()

Definition
Line 633 of cmsxk/DiskDriver.cm


ProcessRequests Member Function

public void ProcessRequests()

Definition
Line 615 of cmsxk/DiskDriver.cm


Read Member Function

public long Read(Block* block)

Definition
Line 285 of cmsxk/DiskDriver.cm


RemoveHostFile Member Function

public void RemoveHostFile(const String<char>& hostFilePath)

Definition
Line 218 of cmsxk/DiskDriver.cm


Run Member Function

public void Run()

Definition
Line 476 of cmsxk/DiskDriver.cm


SendAddFileRequest Member Function

public void SendAddFileRequest(HostFile* hostFile)

Definition
Line 179 of cmsxk/DiskDriver.cm


Start Member Function

public void Start()

Definition
Line 260 of cmsxk/DiskDriver.cm


Stop Member Function

public void Stop()

Definition
Line 265 of cmsxk/DiskDriver.cm


Write Member Function

public long Write(Block* block)

Definition
Line 373 of cmsxk/DiskDriver.cm