Class for allocating space on a disk
![]() | Allocator::AllocSpace (TID tID, Size fileSize) Allocates space |
![]() | Allocator::AllocTableFind (const TID tID, const Int shouldClose, Size *fileSize, Char **fileName) Searches allocTable |
![]() | Allocator::AllocTableInsert (const TID tID, const Size fileSize, const Char *fileName) Insert into allocTable |
![]() | Allocator::AllocValid (TID tID, Size fileSize) Is allocation valid? |
![]() | Allocator::Allocator (Eso *anEso, LogFile *allocLogFile) Constructor |
![]() | Allocator::CreateAllocFile (const Size fileSize, Char **anAllocFileName) Creates allocation file |
![]() | Allocator::CreateDefinition () Creates definition of allocTable |
![]() | Allocator::FreeSpace (TID tID) Frees space |
![]() | Allocator::Rollback (TID tID) Rolls back a transaction |
![]() | Allocator::Test () Allocator test |
![]() | Allocator::~Allocator () Destructor |
![]() | methods
|
![]() | attributes
| ||||||||
![]() | methods
|
methods
attributes
Class for allocating space on a disk. This class is responsible for allocating space on the disk, when request to store a file arrives to Eso. It stores all information about allocations in a table with this structure:
(TID: ID, FileSize: Size, FileName: String).
Err CreateAllocFile(const Size fileSize, Char **allocFileName)
Err AllocTableInsert(const TID tID, const Size fileSize, const Char *fileName)
Err AllocTableFind(const TID tID, const Int shouldClose = 1, Size *fileSize = NULL, Char **allocFileName = NULL)
~Allocator()
Err AllocSpace(TID tID, Size fileSize)
Err AllocValid(TID tID, Size fileSize)
Err FreeSpace(TID tID)
virtual Err Rollback(TID tID)
Err Allocator::AllocTableFind(const TID tID, const Int shouldClose, Size *fileSize, Char **fileName)
shouldClose - tells if the table should be closed after a successfull search
fileSize - size of found file
fileName - name of found file
Err Allocator::AllocTableInsert(const TID tID, const Size fileSize, const Char *fileName)
fileSize - size of allocated file
fileName - name of allocated file
Err Allocator::AllocValid(TID tID, Size fileSize)
fileSize - checked size of file
Allocator::Allocator(Eso *anEso, LogFile *allocLogFile)
allocLogFile - pointer to log file where Allocator should log its work
Err Allocator::CreateAllocFile(const Size fileSize, Char **anAllocFileName)
anAllocFileName - out parameter that tells the name of newly created allocation file
TableFieldQueue* Allocator::CreateDefinition()
Err Allocator::FreeSpace(TID tID)
Err Allocator::Rollback(TID tID)
void Allocator::Test()
Allocator::~Allocator()
alphabetic index hierarchy of classes
generated by doc++