CernVM-FS  2.12.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SessionCtx Class Reference

#include <channel.h>

Inheritance diagram for SessionCtx:
Collaboration diagram for SessionCtx:

Classes

struct  ThreadLocalStorage
 

Public Member Functions

 ~SessionCtx ()
 
void Set (uint64_t id, char *reponame, char *client_instance)
 
void Unset ()
 
void Get (uint64_t *id, char **reponame, char **client_instance)
 
bool IsSet ()
 

Static Public Member Functions

static SessionCtxGetInstance ()
 
static void CleanupInstance ()
 

Private Member Functions

 SessionCtx ()
 
- Private Member Functions inherited from SingleCopy
 SingleCopy ()
 

Static Private Member Functions

static void TlsDestructor (void *data)
 

Private Attributes

pthread_key_t thread_local_storage_
 
pthread_mutex_t * lock_tls_blocks_
 
std::vector< ThreadLocalStorage * > tls_blocks_
 

Static Private Attributes

static SessionCtxinstance_ = NULL
 

Detailed Description

This file is part of the CernVM File System. A SessionCtx stores the session information related to the current cache plugin callback in thread-local-storage. Singleton.

TODO(jblomer): merge code with ClientCtx

Definition at line 31 of file channel.h.

Constructor & Destructor Documentation

SessionCtx::~SessionCtx ( )

Definition at line 46 of file channel.cc.

Here is the call graph for this function:

SessionCtx::SessionCtx ( )
private

Definition at line 38 of file channel.cc.

Here is the call graph for this function:

Member Function Documentation

void SessionCtx::CleanupInstance ( )
static

Definition at line 32 of file channel.cc.

void SessionCtx::Get ( uint64_t *  id,
char **  reponame,
char **  client_instance 
)

Definition at line 71 of file channel.cc.

Referenced by cvmcache_get_session().

Here is the caller graph for this function:

SessionCtx * SessionCtx::GetInstance ( )
static

Definition at line 59 of file channel.cc.

Referenced by cvmcache_get_session(), CachePlugin::SessionCtxGuard::SessionCtxGuard(), and CachePlugin::SessionCtxGuard::~SessionCtxGuard().

Here is the call graph for this function:

Here is the caller graph for this function:

bool SessionCtx::IsSet ( )

Definition at line 86 of file channel.cc.

void SessionCtx::Set ( uint64_t  id,
char *  reponame,
char *  client_instance 
)

Definition at line 96 of file channel.cc.

Referenced by CachePlugin::SessionCtxGuard::SessionCtxGuard().

Here is the call graph for this function:

Here is the caller graph for this function:

void SessionCtx::TlsDestructor ( void *  data)
staticprivate

Definition at line 115 of file channel.cc.

Here is the call graph for this function:

void SessionCtx::Unset ( )

Definition at line 133 of file channel.cc.

Referenced by CachePlugin::SessionCtxGuard::~SessionCtxGuard().

Here is the caller graph for this function:

Member Data Documentation

SessionCtx * SessionCtx::instance_ = NULL
staticprivate

Definition at line 57 of file channel.h.

pthread_mutex_t* SessionCtx::lock_tls_blocks_
private

Definition at line 63 of file channel.h.

pthread_key_t SessionCtx::thread_local_storage_
private

Definition at line 62 of file channel.h.

std::vector<ThreadLocalStorage *> SessionCtx::tls_blocks_
private

Definition at line 64 of file channel.h.


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