|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SelectSourceIF
A SelectSource is an implementation of SourceIF which pulls events from the operating system via the NBIO SelectSet interface. This can be thought of as a 'shim' which turns a SelectSet into a SourceIF.
SelectSource can also "balances" the set of events returned on subsequent calls to dequeue, in order to avoid biasing the servicing of underlying O/S events to a particular order. This feature can be disabled by creating a SelectSource with the boolean flag 'do_balance'.
Method Summary | |
---|---|
void |
deregister(java.lang.Object sel)
Deregister a SelectItem with this SelectSource. |
int |
numActive()
Return the number of active SelectItems registered with the SelectSource. |
int |
numRegistered()
Return the number of SelectItems registered with the SelectSource. |
void |
register(java.lang.Object sel)
Register a SelectItem with the SelectSource. |
java.lang.Object |
register(java.lang.Object sc,
int ops)
|
int |
size()
Return the number of elements waiting in the queue (that is, which don't require a SelectSet poll operation to retrieve). |
void |
update()
Must be called if the 'events' mask of any SelectItem registered with this SelectSource changes. |
void |
update(java.lang.Object sel)
Must be called if the 'events' mask of this SelectItem (which must be registered with this SelectSource) changes. |
Methods inherited from interface seda.sandStorm.api.SourceIF |
---|
blocking_dequeue_all, blocking_dequeue, blocking_dequeue, dequeue_all, dequeue, dequeue |
Method Detail |
---|
void register(java.lang.Object sel)
The user is allowed to modify the event flags in the SelectItem directly (say, to cause the SelectSource ignore a given SelectItem for the purposes of future calls to one of the dequeue methods). However, modifying the event flags may not be synchronous with calls to dequeue - generally because SelectSource maintains a cache of recently-received events.
Selectable
java.lang.Object register(java.lang.Object sc, int ops)
void deregister(java.lang.Object sel)
void update()
void update(java.lang.Object sel)
int numRegistered()
int numActive()
int size()
size
in interface SourceIF
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |