XRootD
XrdCl::PluginUnloadHandler Struct Reference
+ Collaboration diagram for XrdCl::PluginUnloadHandler:

Public Member Functions

 PluginUnloadHandler ()
 
void Register (const std::string &protocol)
 

Static Public Member Functions

static void UnloadHandler ()
 
static void UnloadHandler (const std::string &trProt)
 

Public Attributes

XrdSysRWLock lock
 
std::set< std::string > protocols
 
bool unloaded
 

Detailed Description

Definition at line 68 of file XrdClXRootDTransport.cc.

Constructor & Destructor Documentation

◆ PluginUnloadHandler()

XrdCl::PluginUnloadHandler::PluginUnloadHandler ( )
inline

Definition at line 70 of file XrdClXRootDTransport.cc.

70 : unloaded( false ) { }

Member Function Documentation

◆ Register()

void XrdCl::PluginUnloadHandler::Register ( const std::string &  protocol)
inline

Definition at line 85 of file XrdClXRootDTransport.cc.

86  {
87  XrdSysRWLockHelper scope( lock, false ); // obtain write lock
88  std::pair< std::set<std::string>::iterator, bool > ret = protocols.insert( protocol );
89  // if that's the first time we are using the protocol, the sec lib
90  // was just loaded so now's the time to register the atexit handler
91  if( ret.second )
92  {
93  atexit( UnloadHandler );
94  }
95  }
std::set< std::string > protocols

References lock, protocols, and UnloadHandler().

+ Here is the call graph for this function:

◆ UnloadHandler() [1/2]

static void XrdCl::PluginUnloadHandler::UnloadHandler ( )
inlinestatic

Definition at line 72 of file XrdClXRootDTransport.cc.

73  {
74  UnloadHandler( "root" );
75  UnloadHandler( "xroot" );
76  }

Referenced by Register().

+ Here is the caller graph for this function:

◆ UnloadHandler() [2/2]

static void XrdCl::PluginUnloadHandler::UnloadHandler ( const std::string &  trProt)
inlinestatic

Definition at line 78 of file XrdClXRootDTransport.cc.

79  {
80  TransportManager *trManager = DefaultEnv::GetTransportManager();
81  TransportHandler *trHandler = trManager->GetHandler( trProt );
82  trHandler->WaitBeforeExit();
83  }
static TransportManager * GetTransportManager()
Get transport manager.

References XrdCl::TransportManager::GetHandler(), XrdCl::DefaultEnv::GetTransportManager(), and XrdCl::TransportHandler::WaitBeforeExit().

+ Here is the call graph for this function:

Member Data Documentation

◆ lock

XrdSysRWLock XrdCl::PluginUnloadHandler::lock

◆ protocols

std::set<std::string> XrdCl::PluginUnloadHandler::protocols

Definition at line 99 of file XrdClXRootDTransport.cc.

Referenced by Register().

◆ unloaded

bool XrdCl::PluginUnloadHandler::unloaded

The documentation for this struct was generated from the following file: