18 #ifndef INCLUDE_RCF_FILEIOTHREADPOOL_HPP 19 #define INCLUDE_RCF_FILEIOTHREADPOOL_HPP 24 #include <RCF/ByteBuffer.hpp> 25 #include <RCF/Exception.hpp> 26 #include <RCF/Export.hpp> 27 #include <RCF/ThreadLibrary.hpp> 28 #include <RCF/ThreadPool.hpp> 33 typedef std::shared_ptr<FileIoRequest> FileIoRequestPtr;
36 typedef std::shared_ptr<FileHandle> FileHandlePtr;
38 class RCF_EXPORT FileIoThreadPool
45 void registerOp(FileIoRequestPtr opPtr);
46 void unregisterOp(FileIoRequestPtr opPtr);
48 void setSerializeFileIo(
bool serializeFileIo);
52 friend class FileIoRequest;
57 bool mSerializeFileIo;
60 RCF::Condition mOpsCondition;
61 std::deque< FileIoRequestPtr > mOpsQueued;
62 std::deque< FileIoRequestPtr > mOpsInProgress;
66 RCF::Mutex mCompletionMutex;
67 RCF::Condition mCompletionCondition;
70 class RCF_EXPORT FileIoRequest :
71 public std::enable_shared_from_this<FileIoRequest>
83 std::uint64_t getBytesTransferred();
87 friend class FileIoThreadPool;
91 FileIoThreadPool & mFts;
93 FileHandlePtr mFinPtr;
94 FileHandlePtr mFoutPtr;
97 std::uint64_t mBytesTransferred;
103 RCF_EXPORT FileIoThreadPool & getFileIoThreadPool();
108 #endif // ! INCLUDE_RCF_FILEIOTHREADPOOL_HPP Base class for all RCF exceptions.
Definition: Exception.hpp:67
Represents a server-side thread pool.
Definition: ThreadPool.hpp:78
Definition: ByteBuffer.hpp:39
Definition: AmiIoHandler.hpp:23