Definition at line 25 of file cache_stream.cc.
anonymous_namespace{cache_stream.cc}::StreamingSink::StreamingSink |
( |
void * |
buf, |
|
|
uint64_t |
size, |
|
|
uint64_t |
offset, |
|
|
unsigned char * |
object |
|
) |
| |
|
inline |
virtual anonymous_namespace{cache_stream.cc}::StreamingSink::~StreamingSink |
( |
| ) |
|
|
inlinevirtual |
virtual std::string anonymous_namespace{cache_stream.cc}::StreamingSink::Describe |
( |
| ) |
|
|
inlinevirtual |
Return a string representation describing the type of sink and its status
Implements cvmfs::Sink.
Definition at line 81 of file cache_stream.cc.
virtual int anonymous_namespace{cache_stream.cc}::StreamingSink::Flush |
( |
| ) |
|
|
inlinevirtual |
int64_t anonymous_namespace{cache_stream.cc}::StreamingSink::GetNBytesStreamed |
( |
| ) |
const |
|
inline |
virtual bool anonymous_namespace{cache_stream.cc}::StreamingSink::IsValid |
( |
| ) |
|
|
inlinevirtual |
virtual int anonymous_namespace{cache_stream.cc}::StreamingSink::Purge |
( |
| ) |
|
|
inlinevirtual |
Purges all resources leaving the sink in an invalid state. More aggressive version of Reset(). For some sinks and depending on owner status it might do the same as Reset().
- Returns
- Success = 0 Failure = -errno
Implements cvmfs::Sink.
Definition at line 74 of file cache_stream.cc.
virtual bool anonymous_namespace{cache_stream.cc}::StreamingSink::RequiresReserve |
( |
| ) |
|
|
inlinevirtual |
Returns if the specific sink type needs reservation of (data) space
- Returns
- true - reservation is needed false - no reservation is needed
Implements cvmfs::Sink.
Definition at line 80 of file cache_stream.cc.
virtual bool anonymous_namespace{cache_stream.cc}::StreamingSink::Reserve |
( |
size_t |
size | ) |
|
|
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.
- Note
- If successful, always resets the current position to 0.
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_)
- Returns
- success = true failure = false
Implements cvmfs::Sink.
Definition at line 79 of file cache_stream.cc.
virtual int anonymous_namespace{cache_stream.cc}::StreamingSink::Reset |
( |
| ) |
|
|
inlinevirtual |
Truncate all written data and start over at position zero.
- Returns
- Success = 0 Failure = -errno
Implements cvmfs::Sink.
Definition at line 69 of file cache_stream.cc.
virtual int64_t anonymous_namespace{cache_stream.cc}::StreamingSink::Write |
( |
const void * |
buf, |
|
|
uint64_t |
sz |
|
) |
| |
|
inlinevirtual |
Appends data to the sink
- Returns
- on success: number of bytes written (can be less than requested) on failure: -errno.
Implements cvmfs::Sink.
Definition at line 39 of file cache_stream.cc.
unsigned char* anonymous_namespace{cache_stream.cc}::StreamingSink::object_ |
|
private |
uint64_t anonymous_namespace{cache_stream.cc}::StreamingSink::pos_ |
|
private |
void* anonymous_namespace{cache_stream.cc}::StreamingSink::window_buf_ |
|
private |
uint64_t anonymous_namespace{cache_stream.cc}::StreamingSink::window_offset_ |
|
private |
uint64_t anonymous_namespace{cache_stream.cc}::StreamingSink::window_size_ |
|
private |
The documentation for this class was generated from the following file:
- /home/sftnight/jenkins/workspace/CvmfsDoxygen/label/docker-x86_64/cvmfs/cvmfs/cache_stream.cc