CernVM-FS  2.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
upload::SessionContext Class Reference

#include <session_context.h>

Inheritance diagram for upload::SessionContext:
Collaboration diagram for upload::SessionContext:

Classes

struct  UploadJob
 

Public Member Functions

 SessionContext ()
 
- Public Member Functions inherited from upload::SessionContextBase
 SessionContextBase ()
 
virtual ~SessionContextBase ()
 
bool Initialize (const std::string &api_url, const std::string &session_token, const std::string &key_id, const std::string &secret, uint64_t max_pack_size=ObjectPack::kDefaultLimit, uint64_t max_queue_size=10)
 
bool Finalize (bool commit, const std::string &old_root_hash, const std::string &new_root_hash, const RepositoryTag &tag)
 
void WaitForUpload ()
 
ObjectPack::BucketHandle NewBucket ()
 
bool CommitBucket (const ObjectPack::BucketContentType type, const shash::Any &id, const ObjectPack::BucketHandle handle, const std::string &name="", const bool force_dispatch=false)
 

Protected Member Functions

virtual bool InitializeDerived (uint64_t max_queue_size)
 
virtual bool FinalizeDerived ()
 
virtual bool Commit (const std::string &old_root_hash, const std::string &new_root_hash, const RepositoryTag &tag)
 
virtual Future< bool > * DispatchObjectPack (ObjectPack *pack)
 
virtual bool DoUpload (const UploadJob *job)
 
- Protected Member Functions inherited from upload::SessionContextBase
int64_t NumJobsSubmitted () const
 

Static Private Member Functions

static void * UploadLoop (void *data)
 

Private Attributes

UniquePtr< FifoChannel
< UploadJob * > > 
upload_jobs_
 
pthread_t worker_
 

Static Private Attributes

static UploadJob terminator_
 

Additional Inherited Members

- Protected Attributes inherited from upload::SessionContextBase
FifoChannel< Future< bool > * > upload_results_
 
std::string api_url_
 
std::string session_token_
 
std::string key_id_
 
std::string secret_
 

Detailed Description

Definition at line 101 of file session_context.h.

Constructor & Destructor Documentation

upload::SessionContext::SessionContext ( )

Definition at line 268 of file session_context.cc.

Member Function Documentation

bool upload::SessionContext::Commit ( const std::string &  old_root_hash,
const std::string &  new_root_hash,
const RepositoryTag tag 
)
protectedvirtual

Implements upload::SessionContextBase.

Definition at line 301 of file session_context.cc.

Here is the call graph for this function:

Future< bool > * upload::SessionContext::DispatchObjectPack ( ObjectPack pack)
protectedvirtual

Implements upload::SessionContextBase.

Definition at line 316 of file session_context.cc.

bool upload::SessionContext::DoUpload ( const UploadJob job)
protectedvirtual

Definition at line 324 of file session_context.cc.

Referenced by UploadLoop().

Here is the call graph for this function:

Here is the caller graph for this function:

bool upload::SessionContext::FinalizeDerived ( )
protectedvirtual

Implements upload::SessionContextBase.

Definition at line 286 of file session_context.cc.

bool upload::SessionContext::InitializeDerived ( uint64_t  max_queue_size)
protectedvirtual

Implements upload::SessionContextBase.

Definition at line 275 of file session_context.cc.

Here is the call graph for this function:

void * upload::SessionContext::UploadLoop ( void *  data)
staticprivate

Definition at line 403 of file session_context.cc.

Referenced by InitializeDerived().

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

SessionContext::UploadJob upload::SessionContext::terminator_
staticprivate

Definition at line 130 of file session_context.h.

Referenced by FinalizeDerived(), and UploadLoop().

UniquePtr<FifoChannel<UploadJob*> > upload::SessionContext::upload_jobs_
private
pthread_t upload::SessionContext::worker_
private

Definition at line 128 of file session_context.h.

Referenced by FinalizeDerived(), and InitializeDerived().


The documentation for this class was generated from the following files: