barchart-udt-core
2.3.0-SNAPSHOT / 2013-05-13T01:37:38.485-0500

com.barchart.udt
Class EpollUDT

java.lang.Object
  extended by com.barchart.udt.EpollUDT

public class EpollUDT
extends Object

UDT Epoll Manager

See Also:
Epoll, UDT Epoll

Nested Class Summary
static class EpollUDT.Opt
          poll interest option mask
 
Field Summary
protected  int id
           
protected  boolean isActive
           
protected static org.slf4j.Logger log
           
 
Constructor Summary
EpollUDT()
          allocate poll
 
Method Summary
 void add(SocketUDT socket, EpollUDT.Opt option)
          register socket into event processing poll
 void destroy()
          deallocate poll; called on finalize()
protected  void finalize()
          deallocate poll
 int id()
          poll descriptor id
 boolean isActive()
          poll becomes active after instance creation and inactive after destroy()
 void remove(SocketUDT socket)
          unregister socket from event processing poll
 void update(SocketUDT socket, EpollUDT.Opt option)
          update existing poll/socket registration with changed interest
 EpollUDT.Opt verify(SocketUDT socket)
          report current poll/socket readiness
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final org.slf4j.Logger log

id

protected final int id

isActive

protected volatile boolean isActive
Constructor Detail

EpollUDT

public EpollUDT()
         throws ExceptionUDT
allocate poll

Throws:
ExceptionUDT
Method Detail

destroy

public void destroy()
             throws ExceptionUDT
deallocate poll; called on finalize()

Throws:
ExceptionUDT

id

public int id()
poll descriptor id


isActive

public boolean isActive()
poll becomes active after instance creation and inactive after destroy()


finalize

protected void finalize()
deallocate poll

NOTE: catch all exceptions; else prevents GC

NOTE: do not leak "this" references; else prevents GC

Overrides:
finalize in class Object

add

public void add(SocketUDT socket,
                EpollUDT.Opt option)
         throws ExceptionUDT
register socket into event processing poll

Throws:
ExceptionUDT

remove

public void remove(SocketUDT socket)
            throws ExceptionUDT
unregister socket from event processing poll

Throws:
ExceptionUDT

update

public void update(SocketUDT socket,
                   EpollUDT.Opt option)
            throws ExceptionUDT
update existing poll/socket registration with changed interest

Throws:
ExceptionUDT

verify

public EpollUDT.Opt verify(SocketUDT socket)
                    throws ExceptionUDT
report current poll/socket readiness

Throws:
ExceptionUDT

barchart-udt-core
2.3.0-SNAPSHOT / 2013-05-13T01:37:38.485-0500

Copyright © 2009-2013 Barchart, Inc.. All Rights Reserved.