|
xrootd
|
A hub for dispatching and receiving messages. More...
#include <XrdClPostMaster.hh>
Public Member Functions | |
| PostMaster () | |
| Constructor. More... | |
| virtual | ~PostMaster () |
| Destructor. More... | |
| bool | Initialize () |
| Initializer. More... | |
| bool | Finalize () |
| Finalizer. More... | |
| bool | Start () |
| Start the post master. More... | |
| bool | Stop () |
| Stop the postmaster. More... | |
| bool | Reinitialize () |
| Reinitialize after fork. More... | |
| XRootDStatus | Send (const URL &url, Message *msg, MsgHandler *handler, bool stateful, time_t expires) |
| Status | Redirect (const URL &url, Message *msg, MsgHandler *handler) |
| Status | QueryTransport (const URL &url, uint16_t query, AnyObject &result) |
| Status | RegisterEventHandler (const URL &url, ChannelEventHandler *handler) |
| Register channel event handler. More... | |
| Status | RemoveEventHandler (const URL &url, ChannelEventHandler *handler) |
| Remove a channel event handler. More... | |
| TaskManager * | GetTaskManager () |
| Get the task manager object user by the post master. More... | |
| JobManager * | GetJobManager () |
| Get the job manager object user by the post master. More... | |
| Status | ForceDisconnect (const URL &url) |
| Shut down a channel. More... | |
| Status | ForceReconnect (const URL &url) |
| Reconnect the channel. More... | |
| uint16_t | NbConnectedStrm (const URL &url) |
| Get the number of connected data streams. More... | |
| void | SetOnDataConnectHandler (const URL &url, std::shared_ptr< Job > onConnJob) |
| Set the on-connect handler for data streams. More... | |
| void | SetOnConnectHandler (std::unique_ptr< Job > onConnJob) |
| Set the global connection error handler. More... | |
| void | SetConnectionErrorHandler (std::function< void(const URL &, const XRootDStatus &)> handler) |
| Set the global on-error on-connect handler for control streams. More... | |
| void | NotifyConnectHandler (const URL &url) |
| Notify the global on-connect handler. More... | |
| void | NotifyConnErrHandler (const URL &url, const XRootDStatus &status) |
| Notify the global error connection handler. More... | |
| void | CollapseRedirect (const URL &oldurl, const URL &newURL) |
| Collapse channel URL - replace the URL of the channel. More... | |
| void | DecFileInstCnt (const URL &url) |
| Decrement file object instance count bound to this channel. More... | |
| bool | IsRunning () |
Private Member Functions | |
| Channel * | GetChannel (const URL &url) |
Private Attributes | |
| std::unique_ptr< PostMasterImpl > | pImpl |
A hub for dispatching and receiving messages.
| XrdCl::PostMaster::PostMaster | ( | ) |
Constructor.
|
virtual |
Destructor.
| void XrdCl::PostMaster::DecFileInstCnt | ( | const URL & | url | ) |
Decrement file object instance count bound to this channel.
| bool XrdCl::PostMaster::Finalize | ( | ) |
Finalizer.
| JobManager* XrdCl::PostMaster::GetJobManager | ( | ) |
Get the job manager object user by the post master.
Referenced by XrdCl::Operation< HasHndl >::Run(), XrdCl::EcHandler::Schedule(), XrdCl::ParallelOperation< HasHndl >::Schedule(), and XrdCl::ZipArchive::Schedule().
| TaskManager* XrdCl::PostMaster::GetTaskManager | ( | ) |
Get the task manager object user by the post master.
| bool XrdCl::PostMaster::Initialize | ( | ) |
Initializer.
| bool XrdCl::PostMaster::IsRunning | ( | ) |
| uint16_t XrdCl::PostMaster::NbConnectedStrm | ( | const URL & | url | ) |
Get the number of connected data streams.
| void XrdCl::PostMaster::NotifyConnectHandler | ( | const URL & | url | ) |
Notify the global on-connect handler.
| void XrdCl::PostMaster::NotifyConnErrHandler | ( | const URL & | url, |
| const XRootDStatus & | status | ||
| ) |
Notify the global error connection handler.
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 |
| Status XrdCl::PostMaster::Redirect | ( | const URL & | url, |
| Message * | msg, | ||
| MsgHandler * | handler | ||
| ) |
| Status XrdCl::PostMaster::RegisterEventHandler | ( | const URL & | url, |
| ChannelEventHandler * | handler | ||
| ) |
Register channel event handler.
| bool XrdCl::PostMaster::Reinitialize | ( | ) |
Reinitialize after fork.
| Status XrdCl::PostMaster::RemoveEventHandler | ( | const URL & | url, |
| ChannelEventHandler * | handler | ||
| ) |
Remove a channel event handler.
| 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 |
| void XrdCl::PostMaster::SetConnectionErrorHandler | ( | std::function< void(const URL &, const XRootDStatus &)> | handler | ) |
Set the global on-error on-connect handler for control streams.
| void XrdCl::PostMaster::SetOnConnectHandler | ( | std::unique_ptr< Job > | onConnJob | ) |
Set the global connection error handler.
| void XrdCl::PostMaster::SetOnDataConnectHandler | ( | const URL & | url, |
| std::shared_ptr< Job > | onConnJob | ||
| ) |
Set the on-connect handler for data streams.
| bool XrdCl::PostMaster::Start | ( | ) |
Start the post master.
| bool XrdCl::PostMaster::Stop | ( | ) |
Stop the postmaster.
|
private |
1.8.5