xrootd
|
A poller implementation using the build-in XRootD poller. More...
#include <XrdClPollerBuiltIn.hh>
Public Member Functions | |
PollerBuiltIn () | |
Constructor. | |
~PollerBuiltIn () | |
virtual bool | Initialize () |
Initialize the poller. | |
virtual bool | Finalize () |
Finalize the poller. | |
virtual bool | Start () |
Start polling. | |
virtual bool | Stop () |
Stop polling. | |
virtual bool | AddSocket (Socket *socket, SocketHandler *handler) |
virtual bool | RemoveSocket (Socket *socket) |
Remove the socket. | |
virtual bool | EnableReadNotification (Socket *socket, bool notify, uint16_t timeout=60) |
virtual bool | EnableWriteNotification (Socket *socket, bool notify, uint16_t timeout=60) |
virtual bool | IsRegistered (Socket *socket) |
Check whether the socket is registered with the poller. | |
virtual bool | IsRunning () const |
Is the event loop running? | |
Public Member Functions inherited from XrdCl::Poller | |
virtual | ~Poller () |
Destructor. | |
Private Types | |
typedef std::map< const AnyObject *, std::pair< XrdSys::IOEvents::Poller *, size_t > > | PollerMap |
typedef std::map< Socket *, void * > | SocketMap |
typedef std::vector< XrdSys::IOEvents::Poller * > | PollerPool |
Private Member Functions | |
XrdSys::IOEvents::Poller * | GetNextPoller () |
Goes over poller threads in round robin fashion. | |
XrdSys::IOEvents::Poller * | RegisterAndGetPoller (const Socket *socket) |
Registers given socket as a poller user and returns the poller object. | |
void | UnregisterFromPoller (const Socket *socket) |
Unregisters given socket from poller object. | |
XrdSys::IOEvents::Poller * | GetPoller (const Socket *socket) |
Returns the poller object associated with the given socket. | |
Static Private Member Functions | |
static int | GetNbPollerInit () |
Gets the initial value for 'pNbPoller'. | |
Private Attributes | |
SocketMap | pSocketMap |
PollerMap | pPollerMap |
PollerPool | pPollerPool |
PollerPool::iterator | pNext |
const int | pNbPoller |
XrdSysMutex | pMutex |
A poller implementation using the build-in XRootD poller.
|
private |
|
private |
|
private |
|
inline |
Constructor.
|
inline |
|
virtual |
Add socket to the polling loop
socket | the socket |
handler | object handling the events |
Implements XrdCl::Poller.
|
virtual |
Notify the handler about read events
socket | the socket |
notify | specify if the handler should be notified |
timeout | if no read event occurred after this time a timeout event will be generated |
Implements XrdCl::Poller.
|
virtual |
Notify the handler about write events
socket | the socket |
notify | specify if the handler should be notified |
timeout | if no write event occurred after this time a timeout event will be generated |
Implements XrdCl::Poller.
|
virtual |
Finalize the poller.
Implements XrdCl::Poller.
|
staticprivate |
Gets the initial value for 'pNbPoller'.
|
private |
Goes over poller threads in round robin fashion.
|
private |
Returns the poller object associated with the given socket.
|
virtual |
Initialize the poller.
Implements XrdCl::Poller.
|
virtual |
Check whether the socket is registered with the poller.
Implements XrdCl::Poller.
|
inlinevirtual |
|
private |
Registers given socket as a poller user and returns the poller object.
|
virtual |
Remove the socket.
Implements XrdCl::Poller.
|
virtual |
Start polling.
Implements XrdCl::Poller.
|
virtual |
Stop polling.
Implements XrdCl::Poller.
|
private |
Unregisters given socket from poller object.
|
private |
|
private |
|
private |
|
private |
|
private |
Referenced by IsRunning().
|
private |