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 
19 {
20 public:
21  StorageAccountProxy (const std::string &storageClass, std::unique_ptr<Storage> baseStorage);
22  ~StorageAccountProxy (void);
23 
24  using Storage::read;
25  using Storage::write;
26 
27  virtual bool prefetch (const IOPosBuffer *what, IOSize n);
28  virtual IOSize read (void *into, IOSize n);
29  virtual IOSize read (void *into, IOSize n, IOOffset pos);
30  virtual IOSize readv (IOBuffer *into, IOSize n);
31  virtual IOSize readv (IOPosBuffer *into, IOSize n);
32  virtual IOSize write (const void *from, IOSize n);
33  virtual IOSize write (const void *from, IOSize n, IOOffset pos);
34  virtual IOSize writev (const IOBuffer *from, IOSize n);
35  virtual IOSize writev (const IOPosBuffer *from, IOSize n);
36 
37  virtual IOOffset position (IOOffset offset, Relative whence = SET);
38  virtual void resize (IOOffset size);
39  virtual void flush (void);
40  virtual void close (void);
41 
42 protected:
44 
46 
54 };
55 
56 #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)
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)
std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
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
edm::propagate_const< std::unique_ptr< Storage > > m_baseStorage
size_t IOSize
Definition: IOTypes.h:14
StorageAccount::Counter & m_statsReadV
StorageAccountProxy(const std::string &storageClass, std::unique_ptr< Storage > baseStorage)