/* */ #include "FileAllocationDispatcherCommand.h" #include "FileAllocationCommand.h" bool FileAllocationDispatcherCommand::execute() { if(_e->_requestGroupMan->downloadFinished()) { return true; } if(!_e->_fileAllocationMan->isFileAllocationBeingExecuted() && _e->_fileAllocationMan->nextFileAllocationEntryExists()) { FileAllocationEntryHandle entry = _e->_fileAllocationMan->popNextFileAllocationEntry(); logger->info("Dispatching FileAllocationCommand for CUID#%d.", entry->getCUID()); FileAllocationCommand* command = new FileAllocationCommand(entry->getCUID(), entry->getCurrentRequest(), entry->getRequestGroup(), _e, _e->_fileAllocationMan->getCurrentFileAllocationEntry()); _e->commands.push_back(command); _e->noWait = true; } _e->commands.push_back(this); return false; }