CernVM-FS
2.12.0
|
#include <payload_processor.h>
Public Types | |
enum | Result { kSuccess, kPathViolation, kUploaderError, kOtherError } |
Public Member Functions | |
PayloadProcessor () | |
virtual | ~PayloadProcessor () |
Result | Process (int fdin, const std::string &header_digest, const std::string &path, uint64_t header_size) |
virtual void | ConsumerEventCallback (const ObjectPackBuild::Event &event) |
virtual void | OnUploadJobComplete (const upload::UploaderResults &results, void *buffer) |
int | GetNumErrors () const |
void | SetStatistics (perf::Statistics *st) |
Protected Member Functions | |
virtual Result | Initialize () |
virtual Result | Finalize () |
Private Types | |
typedef std::map< shash::Any, FileInfo >::iterator | FileIterator |
Private Attributes | |
std::map< shash::Any, FileInfo > | pending_files_ |
std::string | current_repo_ |
UniquePtr < upload::AbstractUploader > | uploader_ |
UniquePtr< RaiiTempDir > | temp_dir_ |
int | num_errors_ |
UniquePtr < perf::StatisticsTemplate > | statistics_ |
This class is used in the cvmfs_receiver
tool, on repository gateway machines. The receiver::Reactor class, implementing the event loop of the cvmfs_receiver
tool, dispatches the handling of the kSubmitPayload events to this class.
Its responsibility is reading the payload - containing a serialized ObjectPack - from a file descriptor, and unpacking it into the repository.
Definition at line 41 of file payload_processor.h.
|
private |
Definition at line 67 of file payload_processor.h.
Enumerator | |
---|---|
kSuccess | |
kPathViolation | |
kUploaderError | |
kOtherError |
Definition at line 43 of file payload_processor.h.
receiver::PayloadProcessor::PayloadProcessor | ( | ) |
Definition at line 64 of file payload_processor.cc.
|
virtual |
Definition at line 72 of file payload_processor.cc.
|
virtual |
Definition at line 122 of file payload_processor.cc.
Referenced by Process().
|
protectedvirtual |
Definition at line 239 of file payload_processor.cc.
Referenced by Process().
|
inline |
Definition at line 56 of file payload_processor.h.
Referenced by Finalize().
|
protectedvirtual |
Definition at line 199 of file payload_processor.cc.
Referenced by Process().
|
virtual |
Definition at line 188 of file payload_processor.cc.
Referenced by ConsumerEventCallback().
PayloadProcessor::Result receiver::PayloadProcessor::Process | ( | int | fdin, |
const std::string & | header_digest, | ||
const std::string & | path, | ||
uint64_t | header_size | ||
) |
Definition at line 74 of file payload_processor.cc.
Referenced by receiver::Reactor::HandleSubmitPayload().
void receiver::PayloadProcessor::SetStatistics | ( | perf::Statistics * | st | ) |
Definition at line 195 of file payload_processor.cc.
Referenced by receiver::Reactor::HandleSubmitPayload().
|
private |
Definition at line 69 of file payload_processor.h.
Referenced by Initialize(), and Process().
|
private |
Definition at line 72 of file payload_processor.h.
Referenced by ConsumerEventCallback(), and GetNumErrors().
|
private |
Definition at line 68 of file payload_processor.h.
Referenced by ConsumerEventCallback(), and Process().
|
private |
Definition at line 73 of file payload_processor.h.
Referenced by Initialize(), and SetStatistics().
|
private |
Definition at line 71 of file payload_processor.h.
Referenced by Finalize(), and Initialize().
|
private |
Definition at line 70 of file payload_processor.h.
Referenced by ConsumerEventCallback(), Finalize(), and Initialize().