19 #ifndef INCLUDE_RCF_FILEIOTHREADPOOL_HPP 20 #define INCLUDE_RCF_FILEIOTHREADPOOL_HPP 25 #include <RCF/ByteBuffer.hpp> 26 #include <RCF/Exception.hpp> 27 #include <RCF/Export.hpp> 28 #include <RCF/ThreadLibrary.hpp> 29 #include <RCF/ThreadPool.hpp> 34 typedef std::shared_ptr<FileIoRequest> FileIoRequestPtr;
37 typedef std::shared_ptr<FileHandle> FileHandlePtr;
39 class RCF_EXPORT FileIoThreadPool
46 void registerOp(FileIoRequestPtr opPtr);
47 void unregisterOp(FileIoRequestPtr opPtr);
49 void setSerializeFileIo(
bool serializeFileIo);
53 friend class FileIoRequest;
58 bool mSerializeFileIo;
61 RCF::Condition mOpsCondition;
62 std::deque< FileIoRequestPtr > mOpsQueued;
63 std::deque< FileIoRequestPtr > mOpsInProgress;
67 RCF::Mutex mCompletionMutex;
68 RCF::Condition mCompletionCondition;
71 class RCF_EXPORT FileIoRequest :
72 public std::enable_shared_from_this<FileIoRequest>
84 std::uint64_t getBytesTransferred();
88 friend class FileIoThreadPool;
92 FileIoThreadPool & mFts;
94 FileHandlePtr mFinPtr;
95 FileHandlePtr mFoutPtr;
98 std::uint64_t mBytesTransferred;
104 RCF_EXPORT FileIoThreadPool & getFileIoThreadPool();
109 #endif // ! INCLUDE_RCF_FILEIOTHREADPOOL_HPP Base class for all RCF exceptions.
Definition: Exception.hpp:64
Represents a server-side thread pool.
Definition: ThreadPool.hpp:79
Definition: ByteBuffer.hpp:40
Definition: AmiIoHandler.hpp:24