#include <followRequestProvider.h>
|
virtual void | followStream (std::istream &stream)=0 |
|
template<typename ... Types> |
void | enqueueOrAppend (const std::string &srcPath, copyRequest::fileInWork::slotTypes type, copyRequest::clock_type::time_point timestamp, Types ... args) |
|
virtual void | handleMove (const std::string &srcPath, const std::string &dstPath, const std::string &fromPath, const std::string &origPath, const singleMap &mapEntry, copyRequest::clock_type::time_point timestamp) |
|
virtual void | handleOther (const std::string &srcPath, const std::string &dstPath, const singleMap &mapEntry, copyRequest::clock_type::time_point timestamp, bool requestForRemoval) |
|
| followRequestProvider (decltype(requests) aRequests, decltype(delayedRequests) aDelayedRequests, decltype(parents) aParents, decltype(InputHandler) aInputHandler, decltype(OutputHandler) aOutputHandler) |
|
virtual const singleMap & | getDstPath (const std::string &source, std::string &destination, bool baseNameOnly=false) |
| get detstination papth for a given source path More...
|
|
Definition at line 17 of file followRequestProvider.h.
◆ followRequestProvider()
◆ ~followRequestProvider()
followRequestProvider::~followRequestProvider |
( |
| ) |
|
|
overridedefault |
◆ enqueueOrAppend()
template<typename ... Types>
void followRequestProvider::enqueueOrAppend |
( |
const std::string & |
srcPath, |
|
|
copyRequest::fileInWork::slotTypes |
type, |
|
|
copyRequest::clock_type::time_point |
timestamp, |
|
|
Types ... |
args |
|
) |
| |
|
inlineprotected |
Definition at line 25 of file followRequestProvider.h.
30 auto now = copyRequest::clock_type::now();
31 if (timestamp > now) {
32 if (timestamp - now > std::chrono::milliseconds(10)) {
34 srcPath,
"createRequest",
35 "fixing future timestamp ",
36 std::chrono::duration_cast<std::chrono::duration<double>>(timestamp - now).count(),
"s");
42 if (inserter.getFileInWork().getLatestRequestType() == type) {
45 auto& fileInWork = inserter.getFileInWork();
47 fileInWork.updateExecTime(timestamp);
51 inserter.markForQueueing(request);
52 auto advisedDelay = request->getAdvisedDelay();
54 && advisedDelay != copyRequest::clock_type::duration::zero()) {
55 inserter.getFileInWork().setWaitTime(advisedDelay);
61 inserter.enRegister(request);
References copyRequest::base::adviseDelay(), errMsg::debug, requestProvider::delayedRequests, errMsg::emit(), waitQueues::simple< T >::enqueue(), waitQueues::timed< T, clock_type >::enqueue(), copyRequest::fileInWork::inserter::enRegister(), copyRequest::base::getAdvisedDelay(), copyRequest::fileInWork::inserter::getFileInWork(), copyRequest::fileInWork::getLatestRequestType(), copyRequest::base::getSlotType(), copyRequest::base::getSuffix(), requestProvider::InputHandler, copyRequest::fileInWork::inserter::markForQueueing(), copyRequest::fileInWork::none, requestProvider::requests, copyRequest::fileInWork::setWaitTime(), timerInst, and copyRequest::fileInWork::unlink.
Referenced by handleMove(), and handleOther().
◆ followStream()
virtual void followRequestProvider::followStream |
( |
std::istream & |
stream | ) |
|
|
protectedpure virtual |
◆ handleMove()
void followRequestProvider::handleMove |
( |
const std::string & |
srcPath, |
|
|
const std::string & |
dstPath, |
|
|
const std::string & |
fromPath, |
|
|
const std::string & |
origPath, |
|
|
const singleMap & |
mapEntry, |
|
|
copyRequest::clock_type::time_point |
timestamp |
|
) |
| |
|
protectedvirtual |
◆ handleOther()
void followRequestProvider::handleOther |
( |
const std::string & |
srcPath, |
|
|
const std::string & |
dstPath, |
|
|
const singleMap & |
mapEntry, |
|
|
copyRequest::clock_type::time_point |
timestamp, |
|
|
bool |
requestForRemoval |
|
) |
| |
|
protectedvirtual |
◆ isFollowMode()
bool followRequestProvider::isFollowMode |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ processSources()
void followRequestProvider::processSources |
( |
const std::vector< std::string > & |
sources | ) |
|
|
overridevirtual |
◆ mayDelete
◆ nullDelimiter
The documentation for this class was generated from the following files:
void emit(level aLogLevel, const location &loc, const std::string &aObject, const std::string &aAction, const Args &... args)
function to create and enqueue a message, this is the only way that messages should be created!
requestProvider(decltype(requests) aRequests, decltype(delayedRequests) aDelayedRequests, decltype(parents) aParents, decltype(InputHandler) aInputHandler, decltype(OutputHandler) aOutputHandler)
! use only the file name part in the destination