#include <Storage.h>
Public Types | |
enum | Relative { SET, CURRENT, END } |
Public Member Functions | |
virtual void | close (void) |
virtual bool | eof (void) const |
virtual void | flush (void) |
virtual IOOffset | position (void) const |
virtual IOOffset | position (IOOffset offset, Relative whence=SET)=0 |
virtual bool | prefetch (const IOPosBuffer *what, IOSize n) |
virtual IOSize | read (void *into, IOSize n, IOOffset pos) |
IOSize | read (IOBuffer into, IOOffset pos) |
virtual IOSize | readv (IOPosBuffer *into, IOSize buffers) |
virtual void | resize (IOOffset size)=0 |
virtual void | rewind (void) |
virtual IOOffset | size (void) const |
Storage (void) | |
IOSize | write (IOBuffer from, IOOffset pos) |
virtual IOSize | write (const void *from, IOSize n, IOOffset pos) |
virtual IOSize | writev (const IOPosBuffer *from, IOSize buffers) |
virtual | ~Storage (void) |
Private Member Functions | |
Storage & | operator= (const Storage &) |
Storage (const Storage &) |
enum Storage::Relative |
Storage::Storage | ( | void | ) |
Definition at line 5 of file Storage.cc.
{}
Storage::~Storage | ( | void | ) | [virtual] |
Definition at line 8 of file Storage.cc.
{}
Storage::Storage | ( | const Storage & | ) | [private] |
void Storage::close | ( | void | ) | [virtual] |
Reimplemented in DCacheFile, LStoreFile, RFIOFile, File, LocalCacheFile, RemoteFile, StorageAccountProxy, and XrdFile.
Definition at line 128 of file Storage.cc.
Referenced by LocalCacheFile::cache(), StorageAccountProxy::close(), LocalCacheFile::close(), TStorageFactoryFile::SysClose(), and TStorageFactoryFile::SysOpen().
{}
bool Storage::eof | ( | void | ) | const [virtual] |
Definition at line 133 of file Storage.cc.
References position(), and size().
void Storage::flush | ( | void | ) | [virtual] |
Reimplemented in File, LocalCacheFile, and StorageAccountProxy.
Definition at line 124 of file Storage.cc.
Referenced by StorageAccountProxy::flush(), and TStorageFactoryFile::SysSync().
{}
IOOffset Storage::position | ( | void | ) | const [virtual] |
Definition at line 95 of file Storage.cc.
References CURRENT, and position().
Referenced by eof(), StorageAccountProxy::position(), position(), read(), readv(), RFIOFile::reopen(), rewind(), size(), TStorageFactoryFile::SysSeek(), and write().
Implemented in DCacheFile, LStoreFile, RFIOFile, File, LocalCacheFile, StorageAccountProxy, and XrdFile.
bool Storage::prefetch | ( | const IOPosBuffer * | what, |
IOSize | n | ||
) | [virtual] |
Reimplemented in File, LocalCacheFile, StorageAccountProxy, and XrdFile.
Definition at line 119 of file Storage.cc.
Referenced by StorageAccountProxy::prefetch(), TStorageFactoryFile::ReadBufferAsync(), TStorageFactoryFile::ReadBuffers(), and RFIOFile::readv().
{ return false; }
Reimplemented in File, LocalCacheFile, StorageAccountProxy, and XrdFile.
Definition at line 17 of file Storage.cc.
References n, position(), and IOInput::read().
Referenced by LocalCacheFile::cache(), PixelSLinkDataInputSource::PixelSLinkDataInputSource(), StorageAccountProxy::read(), and PixelSLinkDataInputSource::setRunAndEventInfo().
{ // FIXME: this is not thread safe! split into separate interface // that a particular storage can choose to support or not? make // sure that throw semantics are correct here! // FIXME: use saveposition object in case exceptions are thrown? IOOffset here = position (); position (pos); n = read (into, n); position (here); return n; }
Definition at line 13 of file Storage.cc.
References IOBuffer::data(), pos, IOInput::read(), and IOBuffer::size().
IOSize Storage::readv | ( | IOPosBuffer * | into, |
IOSize | buffers | ||
) | [virtual] |
Reimplemented in DCacheFile, RFIOFile, LocalCacheFile, StorageAccountProxy, and XrdFile.
Definition at line 31 of file Storage.cc.
References data, i, n, evf::evtn::offset(), position(), IOInput::read(), size(), and pileupDistInMC::total.
Referenced by TStorageFactoryFile::ReadBuffersSync(), LocalCacheFile::readv(), and StorageAccountProxy::readv().
virtual void Storage::resize | ( | IOOffset | size | ) | [pure virtual] |
Implemented in DCacheFile, LStoreFile, RFIOFile, File, LocalCacheFile, StorageAccountProxy, and XrdFile.
Referenced by StorageAccountProxy::resize().
void Storage::rewind | ( | void | ) | [virtual] |
IOOffset Storage::size | ( | void | ) | const [virtual] |
Reimplemented in File.
Definition at line 102 of file Storage.cc.
References END, and position().
Referenced by eof(), TStorageFactoryFile::Initialize(), XrdFile::prefetch(), StorageAccountProxy::prefetch(), LocalCacheFile::readv(), XrdFile::readv(), readv(), TStorageFactoryFile::SysStat(), and writev().
Reimplemented in File, LocalCacheFile, StorageAccountProxy, and XrdFile.
Definition at line 59 of file Storage.cc.
References n, and position().
Referenced by write(), StorageAccountProxy::write(), and writev().
{ // FIXME: this is not thread safe! split into separate interface // that a particular storage can choose to support or not? make // sure that throw semantics are correct here! // FIXME: use saveposition object in case exceptions are thrown? IOOffset here = position (); position (pos); n = write (from, n); position (here); return n; }
Definition at line 55 of file Storage.cc.
References IOBuffer::data(), pos, IOBuffer::size(), and write().
IOSize Storage::writev | ( | const IOPosBuffer * | from, |
IOSize | buffers | ||
) | [virtual] |
Reimplemented in LocalCacheFile, and StorageAccountProxy.
Definition at line 74 of file Storage.cc.
References data, i, n, evf::evtn::offset(), size(), pileupDistInMC::total, and write().
Referenced by StorageAccountProxy::writev().