xrootd
Public Member Functions | Private Types | Private Attributes
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]

List of all members.

Public Member Functions

 PollerBuiltIn ()
 Constructor.
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?

Private Types

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

Private Attributes

SocketMap pSocketMap
XrdSys::IOEvents::Poller * pPoller
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

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.

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 [inline, virtual]

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

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


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