CernVM-FS  2.12.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)
 

Static Private Member Functions

static void * UploadLoop (void *data)
 

Private Attributes

UniquePtr< Tube< UploadJob > > upload_jobs_
 
pthread_t worker_
 

Static Private Attributes

static UploadJob terminator_
 

Additional Inherited Members

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

Detailed Description

Definition at line 102 of file session_context.h.

Constructor & Destructor Documentation

upload::SessionContext::SessionContext ( )

Definition at line 258 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 290 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 308 of file session_context.cc.

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

Definition at line 317 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 275 of file session_context.cc.

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

Implements upload::SessionContextBase.

Definition at line 265 of file session_context.cc.

Here is the call graph for this function:

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

Definition at line 396 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 131 of file session_context.h.

Referenced by FinalizeDerived(), and UploadLoop().

UniquePtr<Tube<UploadJob> > upload::SessionContext::upload_jobs_
private
pthread_t upload::SessionContext::worker_
private

Definition at line 129 of file session_context.h.

Referenced by FinalizeDerived(), and InitializeDerived().


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