![]() |
CernVM-FS
2.13.0
|
#include <fetch.h>
Public Member Functions | |
TransactionSink (CacheManager *cache_mgr, void *open_txn) | |
virtual | ~TransactionSink () |
virtual int64_t | Write (const void *buf, uint64_t sz) |
virtual int | Reset () |
virtual int | Purge () |
virtual bool | IsValid () |
virtual int | Flush () |
virtual bool | Reserve (size_t) |
virtual bool | RequiresReserve () |
virtual std::string | Describe () |
![]() | |
virtual | ~Sink () |
void | Release () |
Private Attributes | |
CacheManager * | cache_mgr_ |
void * | open_txn_ |
Additional Inherited Members | |
![]() | |
Sink (bool is_owner) | |
![]() | |
bool | is_owner_ |
TransacionSink uses an open transaction in a cache manager as a sink. It allows the download manager to write data without knowing about the cache manager.
|
inline |
|
inlinevirtual |
|
inlinevirtual |
Return a string representation describing the type of sink and its status
Implements cvmfs::Sink.
Definition at line 86 of file fetch.h.
|
inlinevirtual |
|
inlinevirtual |
Implements cvmfs::Sink.
Definition at line 75 of file fetch.h.
Referenced by Describe().
|
inlinevirtual |
Purges all resources leaving the sink in an invalid state. More aggressive version of Reset(). For some sinks it might do the same as Reset().
Implements cvmfs::Sink.
Definition at line 69 of file fetch.h.
|
inlinevirtual |
Returns if the specific sink type needs reservation of (data) space
Implements cvmfs::Sink.
|
inlinevirtual |
Reserves new space in sinks that require reservation (see RequiresReserve)
Successful if the requested size is smaller than already space reserved, or if the sink is the owner of the data and can allocate enough new space.
Fails if 1) sink is not the owner of the data and more than the current size is requested 2) more space is requested than allowed (max_size_)
Implements cvmfs::Sink.
|
inlinevirtual |
Truncate all written data and start over at position zero.
Implements cvmfs::Sink.
Definition at line 57 of file fetch.h.
Referenced by Purge().
|
inlinevirtual |
Appends data to the sink
Implements cvmfs::Sink.
Definition at line 47 of file fetch.h.
|
private |
|
private |