CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
6 # include <string>
7 #include <memory>
8 
18 {
19 public:
20  StorageAccountProxy (const std::string &storageClass, std::unique_ptr<Storage> baseStorage);
21  ~StorageAccountProxy (void);
22 
23  using Storage::read;
24  using Storage::write;
25 
26  virtual bool prefetch (const IOPosBuffer *what, IOSize n);
27  virtual IOSize read (void *into, IOSize n);
28  virtual IOSize read (void *into, IOSize n, IOOffset pos);
29  virtual IOSize readv (IOBuffer *into, IOSize n);
30  virtual IOSize readv (IOPosBuffer *into, IOSize n);
31  virtual IOSize write (const void *from, IOSize n);
32  virtual IOSize write (const void *from, IOSize n, IOOffset pos);
33  virtual IOSize writev (const IOBuffer *from, IOSize n);
34  virtual IOSize writev (const IOPosBuffer *from, IOSize n);
35 
36  virtual IOOffset position (IOOffset offset, Relative whence = SET);
37  virtual void resize (IOOffset size);
38  virtual void flush (void);
39  virtual void close (void);
40 
41 protected:
42  std::unique_ptr<Storage> m_baseStorage;
43 
51 };
52 
53 #endif // STORAGE_FACTORY_STORAGE_ACCOUNT_PROXY_H
virtual IOSize writev(const IOBuffer *from, IOSize n)
virtual bool prefetch(const IOPosBuffer *what, IOSize n)
StorageAccount::Counter & m_statsWrite
StorageAccount::Counter & m_statsPosition
virtual void close(void)
std::unique_ptr< Storage > m_baseStorage
Relative
Definition: Storage.h:23
StorageAccount::Counter & m_statsRead
StorageAccount::StorageClassToken m_token
virtual IOSize write(const void *from, IOSize n, IOOffset pos)
Definition: Storage.cc:59
virtual IOSize readv(IOBuffer *into, IOSize n)
StorageAccount::Counter & m_statsWriteV
StorageAccount::Counter & m_statsPrefetch
virtual IOOffset position(void) const
Definition: Storage.cc:95
virtual IOSize write(const void *from, IOSize n)
int read(void)
Definition: IOInput.cc:54
virtual void resize(IOOffset size)
virtual void flush(void)
virtual IOOffset size(void) const
Definition: Storage.cc:102
int64_t IOOffset
Definition: IOTypes.h:19
size_t IOSize
Definition: IOTypes.h:14
StorageAccount::Counter & m_statsReadV
StorageAccountProxy(const std::string &storageClass, std::unique_ptr< Storage > baseStorage)