LogCabin
|
Exits an event loop when a file event occurs. More...
Public Member Functions | |
FileNotifier (Event::Loop &eventLoop, int fd, Ownership ownership) | |
void | handleFileEvent (uint32_t events) |
This method is overridden by a subclass and invoked when a file event occurs. | |
Public Attributes | |
Event::Loop & | eventLoop |
uint64_t | count |
Exits an event loop when a file event occurs.
Helper for ClientSession constructor.
Definition at line 39 of file ClientSession.cc.
LogCabin::RPC::anonymous_namespace{ClientSession.cc}::FileNotifier::FileNotifier | ( | Event::Loop & | eventLoop, |
int | fd, | ||
Ownership | ownership | ||
) | [inline] |
Definition at line 40 of file ClientSession.cc.
void LogCabin::RPC::anonymous_namespace{ClientSession.cc}::FileNotifier::handleFileEvent | ( | uint32_t | events | ) | [inline, virtual] |
This method is overridden by a subclass and invoked when a file event occurs.
This method will be invoked by the main event loop on whatever thread is running the Event::Loop.
If the event still exists when this method returns (e.g., the file is readable but the method did not read the data), then the method will be invoked again (unless flags such as EPOLLONESHOT or EPOLLET are used).
events | Indicates whether the file is readable or writable or both (OR'ed combination of EPOLL_EVENTS values). |
Implements LogCabin::Event::File.
Definition at line 46 of file ClientSession.cc.
Event::Loop& LogCabin::RPC::anonymous_namespace{ClientSession.cc}::FileNotifier::eventLoop |
Definition at line 50 of file ClientSession.cc.
uint64_t LogCabin::RPC::anonymous_namespace{ClientSession.cc}::FileNotifier::count |
Definition at line 51 of file ClientSession.cc.