CMS 3D CMS Logo

StorageAccountProxy.h
Go to the documentation of this file.
1 #ifndef STORAGE_FACTORY_STORAGE_ACCOUNT_PROXY_H
2 #define STORAGE_FACTORY_STORAGE_ACCOUNT_PROXY_H
3 
7 #include <string>
8 #include <memory>
9 
18 namespace edm::storage {
19  class StorageAccountProxy : public Storage {
20  public:
21  StorageAccountProxy(const std::string &storageClass, std::unique_ptr<Storage> baseStorage);
22  ~StorageAccountProxy(void) override;
23 
24  using Storage::read;
25  using Storage::write;
26 
27  bool prefetch(const IOPosBuffer *what, IOSize n) override;
28  IOSize read(void *into, IOSize n) override;
29  IOSize read(void *into, IOSize n, IOOffset pos) override;
30  IOSize readv(IOBuffer *into, IOSize n) override;
31  IOSize readv(IOPosBuffer *into, IOSize n) override;
32  IOSize write(const void *from, IOSize n) override;
33  IOSize write(const void *from, IOSize n, IOOffset pos) override;
34  IOSize writev(const IOBuffer *from, IOSize n) override;
35  IOSize writev(const IOPosBuffer *from, IOSize n) override;
36 
37  IOOffset position(IOOffset offset, Relative whence = SET) override;
38  void resize(IOOffset size) override;
39  void flush(void) override;
40  void close(void) override;
41 
42  protected:
44 
46 
54  };
55 } // namespace edm::storage
56 #endif // STORAGE_FACTORY_STORAGE_ACCOUNT_PROXY_H
int64_t IOOffset
Definition: IOTypes.h:20
StorageAccountProxy(const std::string &storageClass, std::unique_ptr< Storage > baseStorage)
bool prefetch(const IOPosBuffer *what, IOSize n) override
StorageAccount::Counter & m_statsPrefetch
IOSize write(const void *from, IOSize n) override
constexpr std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
StorageAccount::Counter & m_statsReadV
StorageAccount::StorageClassToken m_token
void resize(IOOffset size) override
virtual IOOffset size() const
Definition: Storage.cc:509
StorageAccount::Counter & m_statsWrite
IOSize readv(IOBuffer *into, IOSize n) override
StorageAccount::Counter & m_statsPosition
size_t IOSize
Definition: IOTypes.h:15
IOSize write(unsigned char byte)
Definition: Storage.cc:329
virtual IOOffset position() const
Definition: Storage.cc:504
IOSize writev(const IOBuffer *from, IOSize n) override
edm::propagate_const< std::unique_ptr< Storage > > m_baseStorage
StorageAccount::Counter & m_statsRead
StorageAccount::Counter & m_statsWriteV