ewmscp
..
|
This class holds info aboput a file that is "in work" in some way. More...
#include <fileInWork.h>
Classes | |
class | eraser |
class to get copyRequest out of the fileInWork list. More... | |
class | inserter |
create a new fileInWork instance in the map. More... | |
class | lockuser |
this class handles the mutex protection of the filesInWork map More... | |
class | typeChanger |
Public Types | |
enum | slotTypes { slotTypes::none, slotTypes::copy, slotTypes::move, slotTypes::unlink, slotTypes::nTypes } |
Public Member Functions | |
slotTypes | getLatestRequestType () const |
fileInWork (clock_type::time_point earliest) | |
~fileInWork () | |
void | setWaitTime (clock_type::duration aWaitTime) |
void | updateExecTime (clock_type::time_point start) |
clock_type::time_point | getEarliestprocessTime () const |
Static Public Member Functions | |
static void | waitForAllInstancesGone () |
Static Public Attributes | |
static std::map< std::string, fileInWork > | filesInWork |
maps file names to filesInWork objects More... | |
static std::mutex | filesInWorkMutex |
protects the filesInWork map More... | |
static std::condition_variable | cv |
needed for signaling that no file is in work anymore More... | |
Private Attributes | |
clock_type::time_point | earliestProcessTime |
process at earliest at this time More... | |
clock_type::duration | waitTime |
delay that gets added to now() to calculate earliestProcessTime More... | |
slotTypes | queuedRequestType |
This class holds info aboput a file that is "in work" in some way.
It inherits from std::list and the list part holds the copyRequests that will be processed some time in the future, after the current request (which is not held by this class) is done.
Definition at line 21 of file fileInWork.h.
|
strong |
|
inline |
|
inline |
|
inline |
Definition at line 69 of file fileInWork.h.
References earliestProcessTime.
fileInWork::slotTypes copyRequest::fileInWork::getLatestRequestType | ( | ) | const |
Definition at line 41 of file fileInWork.cpp.
References queuedRequestType.
Referenced by followRequestProvider::enqueueOrAppend().
|
inline |
Definition at line 63 of file fileInWork.h.
References waitTime.
Referenced by followRequestProvider::enqueueOrAppend().
|
inline |
Definition at line 66 of file fileInWork.h.
References earliestProcessTime, throttle::start, and waitTime.
|
static |
|
static |
needed for signaling that no file is in work anymore
Definition at line 32 of file fileInWork.h.
Referenced by ~fileInWork().
|
private |
process at earliest at this time
Definition at line 26 of file fileInWork.h.
Referenced by getEarliestprocessTime(), and updateExecTime().
|
static |
maps file names to filesInWork objects
Definition at line 30 of file fileInWork.h.
Referenced by copyRequest::base::adviseDelay(), copyRequest::fileInWork::eraser::getNext(), and copyRequest::fileInWork::inserter::inserter().
|
static |
protects the filesInWork map
Definition at line 31 of file fileInWork.h.
|
private |
Definition at line 28 of file fileInWork.h.
Referenced by getLatestRequestType().
|
private |
delay that gets added to now() to calculate earliestProcessTime
Definition at line 27 of file fileInWork.h.
Referenced by setWaitTime(), and updateExecTime().