|
XRootD
|
A hub for dispatching and receiving messages. More...
#include <XrdClPostMaster.hh>
Collaboration diagram for XrdCl::PostMaster:Public Member Functions | |
| PostMaster () | |
| Constructor. | |
| virtual | ~PostMaster () |
| Destructor. | |
| void | CollapseRedirect (const URL &oldurl, const URL &newURL) |
| Collapse channel URL - replace the URL of the channel. | |
| void | DecFileInstCnt (const URL &url) |
| Decrement file object instance count bound to this channel. | |
| bool | Finalize () |
| Finalizer. | |
| Status | ForceDisconnect (const URL &url) |
| Shut down a channel. | |
| Status | ForceDisconnect (const URL &url, bool hush) |
| Shut down a channel. | |
| Status | ForceReconnect (const URL &url) |
| Reconnect the channel. | |
| JobManager * | GetJobManager () |
| Get the job manager object user by the post master. | |
| TaskManager * | GetTaskManager () |
| Get the task manager object user by the post master. | |
| bool | Initialize () |
| Initializer. | |
| bool | IsRunning () |
| uint16_t | NbConnectedStrm (const URL &url) |
| Get the number of connected data streams. | |
| void | NotifyConnectHandler (const URL &url) |
| Notify the global on-connect handler. | |
| void | NotifyConnErrHandler (const URL &url, const XRootDStatus &status) |
| Notify the global error connection handler. | |
| Status | QueryTransport (const URL &url, uint16_t query, AnyObject &result) |
| Status | Redirect (const URL &url, Message *msg, MsgHandler *handler) |
| Status | RegisterEventHandler (const URL &url, ChannelEventHandler *handler) |
| Register channel event handler. | |
| bool | Reinitialize () |
| Reinitialize after fork. | |
| Status | RemoveEventHandler (const URL &url, ChannelEventHandler *handler) |
| Remove a channel event handler. | |
| XRootDStatus | Send (const URL &url, Message *msg, MsgHandler *handler, bool stateful, time_t expires) |
| void | SetConnectionErrorHandler (std::function< void(const URL &, const XRootDStatus &)> handler) |
| Set the global on-error on-connect handler for control streams. | |
| void | SetOnConnectHandler (std::unique_ptr< Job > onConnJob) |
| Set the global connection error handler. | |
| void | SetOnDataConnectHandler (const URL &url, std::shared_ptr< Job > onConnJob) |
| Set the on-connect handler for data streams. | |
| bool | Start () |
| Start the post master. | |
| bool | Stop () |
| Stop the postmaster. | |
A hub for dispatching and receiving messages.
Definition at line 47 of file XrdClPostMaster.hh.
| XrdCl::PostMaster::PostMaster | ( | ) |
Constructor.
Definition at line 106 of file XrdClPostMaster.cc.
|
virtual |
Collapse channel URL - replace the URL of the channel.
Definition at line 447 of file XrdClPostMaster.cc.
References XrdCl::Channel::CanCollapse(), XrdCl::Log::Error(), XrdCl::URL::GetChannelId(), XrdCl::TransportManager::GetHandler(), XrdCl::URL::GetHostId(), XrdCl::DefaultEnv::GetLog(), XrdCl::URL::GetProtocol(), XrdCl::DefaultEnv::GetTransportManager(), XrdCl::Channel::GetURL(), XrdCl::Log::Info(), and XrdCl::PostMasterMsg.
Here is the call graph for this function:| void XrdCl::PostMaster::DecFileInstCnt | ( | const URL & | url | ) |
Decrement file object instance count bound to this channel.
Definition at line 501 of file XrdClPostMaster.cc.
References XrdCl::Channel::DecFileInstCnt().
Referenced by XrdCl::FileStateHandler::~FileStateHandler().
Here is the call graph for this function:
Here is the caller graph for this function:| bool XrdCl::PostMaster::Finalize | ( | ) |
Finalizer.
Definition at line 147 of file XrdClPostMaster.cc.
Referenced by XrdCl::DefaultEnv::GetPostMaster().
Here is the caller graph for this function:Shut down a channel.
Definition at line 324 of file XrdClPostMaster.cc.
References ForceDisconnect().
Referenced by ForceDisconnect(), and XrdCl::Stream::OnReadTimeout().
Here is the call graph for this function:
Here is the caller graph for this function:Shut down a channel.
Definition at line 332 of file XrdClPostMaster.cc.
References XrdCl::errInvalidOp, XrdCl::Channel::ForceDisconnect(), XrdCl::URL::GetChannelId(), and XrdCl::stError.
Here is the call graph for this function:Reconnect the channel.
Definition at line 364 of file XrdClPostMaster.cc.
References XrdCl::errInvalidOp, XrdCl::URL::GetChannelId(), and XrdCl::stError.
Here is the call graph for this function:| JobManager * XrdCl::PostMaster::GetJobManager | ( | ) |
Get the job manager object user by the post master.
Definition at line 316 of file XrdClPostMaster.cc.
Referenced by XrdCl::FileStateHandler::Close(), XrdCl::Operation< HasHndl >::Run(), XrdEc::ScheduleHandler(), XrdEc::ScheduleHandler(), and XrdCl::FileStateHandler::TimeOutRequests().
Here is the caller graph for this function:| TaskManager * XrdCl::PostMaster::GetTaskManager | ( | ) |
Get the task manager object user by the post master.
Definition at line 308 of file XrdClPostMaster.cc.
Referenced by XrdCl::DefaultEnv::GetPostMaster().
Here is the caller graph for this function:| bool XrdCl::PostMaster::Initialize | ( | ) |
Initializer.
Definition at line 120 of file XrdClPostMaster.cc.
References XrdCl::PollerFactory::CreatePoller(), XrdCl::DefaultPollerPreference, XrdCl::DefaultEnv::GetEnv(), and XrdCl::Env::GetString().
Referenced by XrdCl::DefaultEnv::GetPostMaster().
Here is the call graph for this function:
Here is the caller graph for this function:| bool XrdCl::PostMaster::IsRunning | ( | ) |
Definition at line 514 of file XrdClPostMaster.cc.
| uint16_t XrdCl::PostMaster::NbConnectedStrm | ( | const URL & | url | ) |
Get the number of connected data streams.
Definition at line 380 of file XrdClPostMaster.cc.
References XrdCl::Channel::NbConnectedStrm().
Here is the call graph for this function:| void XrdCl::PostMaster::NotifyConnectHandler | ( | const URL & | url | ) |
Notify the global on-connect handler.
Definition at line 421 of file XrdClPostMaster.cc.
Referenced by XrdCl::Stream::OnConnect().
Here is the caller graph for this function:| void XrdCl::PostMaster::NotifyConnErrHandler | ( | const URL & | url, |
| const XRootDStatus & | status ) |
Notify the global error connection handler.
Definition at line 434 of file XrdClPostMaster.cc.
Referenced by XrdCl::Stream::OnConnectError().
Here is the caller graph for this function:Query the transport handler for a given URL
| url | the channel to be queried |
| query | the query as defined in the TransportQuery struct or others that may be recognized by the protocol transport |
| result | the result of the query |
Definition at line 252 of file XrdClPostMaster.cc.
References XrdCl::errInvalidOp, XrdCl::errNotSupported, XrdCl::URL::GetChannelId(), XrdCl::Channel::QueryTransport(), and XrdCl::stError.
Referenced by XrdCl::FileSystem::DirList(), and XrdCl::FileStateHandler::PgRead().
Here is the call graph for this function:
Here is the caller graph for this function:| Status XrdCl::PostMaster::Redirect | ( | const URL & | url, |
| Message * | msg, | ||
| MsgHandler * | handler ) |
Definition at line 238 of file XrdClPostMaster.cc.
References XrdCl::errInvalidOp, XrdCl::RedirectorRegistry::Get(), XrdCl::VirtualRedirector::HandleRequest(), XrdCl::RedirectorRegistry::Instance(), and XrdCl::stError.
Referenced by XrdCl::MessageUtils::RedirectMessage().
Here is the call graph for this function:
Here is the caller graph for this function:| Status XrdCl::PostMaster::RegisterEventHandler | ( | const URL & | url, |
| ChannelEventHandler * | handler ) |
Register channel event handler.
Definition at line 276 of file XrdClPostMaster.cc.
References XrdCl::errNotSupported, XrdCl::Channel::RegisterEventHandler(), and XrdCl::stError.
Here is the call graph for this function:| bool XrdCl::PostMaster::Reinitialize | ( | ) |
Reinitialize after fork.
Definition at line 215 of file XrdClPostMaster.cc.
| Status XrdCl::PostMaster::RemoveEventHandler | ( | const URL & | url, |
| ChannelEventHandler * | handler ) |
Remove a channel event handler.
Definition at line 292 of file XrdClPostMaster.cc.
References XrdCl::errNotSupported, XrdCl::Channel::RemoveEventHandler(), and XrdCl::stError.
Here is the call graph for this function:| XRootDStatus XrdCl::PostMaster::Send | ( | const URL & | url, |
| Message * | msg, | ||
| MsgHandler * | handler, | ||
| bool | stateful, | ||
| time_t | expires ) |
Send the message asynchronously - the message is inserted into the send queue and a listener is called when the message is succesfsully pushed through the wire or when the timeout elapses
DEADLOCK WARNING: no lock should be taken while calling this method that are used in the callback as well.
| url | recipient of the message |
| msg | message to be sent |
| expires | unix timestamp after which a failure is reported to the handler |
| handler | handler will be notified about the status |
| stateful | physical stream disconnection causes an error |
Definition at line 223 of file XrdClPostMaster.cc.
References XrdCl::errNotSupported, XrdCl::Channel::Send(), and XrdCl::stError.
Referenced by XrdCl::MessageUtils::SendMessage().
Here is the call graph for this function:
Here is the caller graph for this function:| void XrdCl::PostMaster::SetConnectionErrorHandler | ( | std::function< void(const URL &, const XRootDStatus &)> | handler | ) |
Set the global on-error on-connect handler for control streams.
Definition at line 412 of file XrdClPostMaster.cc.
| void XrdCl::PostMaster::SetOnConnectHandler | ( | std::unique_ptr< Job > | onConnJob | ) |
Set the global connection error handler.
Set the global on-connect handler for control streams.
Definition at line 403 of file XrdClPostMaster.cc.
Referenced by XrdPosixConfig::conTracker().
Here is the caller graph for this function:| void XrdCl::PostMaster::SetOnDataConnectHandler | ( | const URL & | url, |
| std::shared_ptr< Job > | onConnJob ) |
Set the on-connect handler for data streams.
Definition at line 391 of file XrdClPostMaster.cc.
References XrdCl::Channel::SetOnDataConnectHandler().
Here is the call graph for this function:| bool XrdCl::PostMaster::Start | ( | ) |
Start the post master.
Definition at line 169 of file XrdClPostMaster.cc.
Referenced by XrdCl::DefaultEnv::GetPostMaster().
Here is the caller graph for this function:| bool XrdCl::PostMaster::Stop | ( | ) |
Stop the postmaster.
Definition at line 197 of file XrdClPostMaster.cc.
Referenced by main().
Here is the caller graph for this function: