xrootd
Public Member Functions | Private Types | Private Attributes | List of all members
XrdCl::PollerBuiltIn Class Reference

A poller implementation using the build-in XRootD poller. More...

#include <XrdClPollerBuiltIn.hh>

Inheritance diagram for XrdCl::PollerBuiltIn:
Inheritance graph
[legend]
Collaboration diagram for XrdCl::PollerBuiltIn:
Collaboration graph
[legend]

Public Member Functions

 PollerBuiltIn ()
 Constructor. More...
 
virtual bool Initialize ()
 Initialize the poller. More...
 
virtual bool Finalize ()
 Finalize the poller. More...
 
virtual bool Start ()
 Start polling. More...
 
virtual bool Stop ()
 Stop polling. More...
 
virtual bool AddSocket (Socket *socket, SocketHandler *handler)
 
virtual bool RemoveSocket (Socket *socket)
 Remove the socket. More...
 
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. More...
 
virtual bool IsRunning () const
 Is the event loop running? More...
 
- Public Member Functions inherited from XrdCl::Poller
virtual ~Poller ()
 Destructor. More...
 

Private Types

typedef std::map< Socket
*, void * > 
SocketMap
 

Private Attributes

SocketMap pSocketMap
 
XrdSys::IOEvents::PollerpPoller
 
XrdSysMutex pMutex
 

Detailed Description

A poller implementation using the build-in XRootD poller.

Member Typedef Documentation

typedef std::map<Socket *, void *> XrdCl::PollerBuiltIn::SocketMap
private

Constructor & Destructor Documentation

XrdCl::PollerBuiltIn::PollerBuiltIn ( )
inline

Constructor.

Member Function Documentation

bool XrdCl::PollerBuiltIn::AddSocket ( Socket socket,
SocketHandler handler 
)
virtual
bool XrdCl::PollerBuiltIn::EnableReadNotification ( Socket socket,
bool  notify,
uint16_t  timeout = 60 
)
virtual

Notify the handler about read events

Parameters
socketthe socket
notifyspecify if the handler should be notified
timeoutif no read event occurred after this time a timeout event will be generated

Implements XrdCl::Poller.

References XrdCl::DefaultEnv::GetLog(), XrdCl::Socket::GetName(), pMutex, XrdCl::PollerMsg, and pSocketMap.

bool XrdCl::PollerBuiltIn::EnableWriteNotification ( Socket socket,
bool  notify,
uint16_t  timeout = 60 
)
virtual

Notify the handler about write events

Parameters
socketthe socket
notifyspecify if the handler should be notified
timeoutif no write event occurred after this time a timeout event will be generated

Implements XrdCl::Poller.

References XrdCl::DefaultEnv::GetLog(), XrdCl::Socket::GetName(), pMutex, XrdCl::PollerMsg, and pSocketMap.

bool XrdCl::PollerBuiltIn::Finalize ( )
virtual

Finalize the poller.

Implements XrdCl::Poller.

References pSocketMap.

bool XrdCl::PollerBuiltIn::Initialize ( )
virtual

Initialize the poller.

Implements XrdCl::Poller.

bool XrdCl::PollerBuiltIn::IsRegistered ( Socket socket)
virtual

Check whether the socket is registered with the poller.

Implements XrdCl::Poller.

References pMutex, and pSocketMap.

virtual bool XrdCl::PollerBuiltIn::IsRunning ( ) const
inlinevirtual

Is the event loop running?

Implements XrdCl::Poller.

References pPoller.

bool XrdCl::PollerBuiltIn::RemoveSocket ( Socket socket)
virtual
bool XrdCl::PollerBuiltIn::Start ( )
virtual

Start polling.

Implements XrdCl::Poller.

References Create, XrdCl::DefaultEnv::GetLog(), XrdCl::PollerMsg, pPoller, and pSocketMap.

bool XrdCl::PollerBuiltIn::Stop ( )
virtual

Member Data Documentation

XrdSysMutex XrdCl::PollerBuiltIn::pMutex
private
XrdSys::IOEvents::Poller* XrdCl::PollerBuiltIn::pPoller
private

Referenced by AddSocket(), IsRunning(), Start(), and Stop().

SocketMap XrdCl::PollerBuiltIn::pSocketMap
private

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