FreePastry/docs/javadoc/rice/selector/SelectorManager.html

1578 lines
57 KiB
HTML
Raw Normal View History

2019-05-13 16:45:05 +04:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_07) on Fri Mar 13 20:01:09 CET 2009 -->
<TITLE>
SelectorManager (Rice Pastry - API Specifications)
</TITLE>
<META NAME="date" CONTENT="2009-03-13">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="SelectorManager (Rice Pastry - API Specifications)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/SelectorManager.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
Rice Pastry API</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../rice/selector/SelectionKeyHandler.html" title="class in rice.selector"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../rice/selector/Timer.html" title="interface in rice.selector"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../index.html?rice/selector/SelectorManager.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="SelectorManager.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;<A HREF="#nested_classes_inherited_from_class_java.lang.Thread">NESTED</A>&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
rice.selector</FONT>
<BR>
Class SelectorManager</H2>
<PRE>
java.lang.Object
<IMG SRC="../../resources/inherit.gif" ALT="extended by ">java.lang.Thread
<IMG SRC="../../resources/inherit.gif" ALT="extended by "><B>rice.selector.SelectorManager</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD>java.lang.Runnable, <A HREF="../../rice/Destructable.html" title="interface in rice">Destructable</A>, <A HREF="../../rice/selector/Timer.html" title="interface in rice.selector">Timer</A></DD>
</DL>
<DL>
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../rice/selector/ProfileSelector.html" title="class in rice.selector">ProfileSelector</A>, <A HREF="../../org/mpisws/p2p/transport/peerreview/replay/record/RecordSM.html" title="class in org.mpisws.p2p.transport.peerreview.replay.record">RecordSM</A>, <A HREF="../../org/mpisws/p2p/transport/peerreview/replay/playback/ReplaySM.html" title="class in org.mpisws.p2p.transport.peerreview.replay.playback">ReplaySM</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <B>SelectorManager</B><DT>extends java.lang.Thread<DT>implements <A HREF="../../rice/selector/Timer.html" title="interface in rice.selector">Timer</A>, <A HREF="../../rice/Destructable.html" title="interface in rice">Destructable</A></DL>
</PRE>
<P>
This class is the class which handles the selector, and listens for activity.
When activity occurs, it figures out who is interested in what has happened,
and hands off to that object.
<P>
<P>
<DL>
<DT><B>Version:</B></DT>
<DD>$Id: SelectorManager.java 4675 2009-03-11 15:54:34Z jeffh $</DD>
<DT><B>Author:</B></DT>
<DD>Alan Mislove</DD>
</DL>
<HR>
<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->
<A NAME="nested_class_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Nested Class Summary</B></FONT></TH>
</TR>
</TABLE>
&nbsp;<A NAME="nested_classes_inherited_from_class_java.lang.Thread"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Nested classes/interfaces inherited from class java.lang.Thread</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler</CODE></TD>
</TR>
</TABLE>
&nbsp;
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.util.HashSet&lt;java.nio.channels.SelectionKey&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#cancelledKeys">cancelledKeys</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../rice/environment/Environment.html" title="class in rice.environment">Environment</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#environment">environment</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#instance">instance</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.util.LinkedList&lt;java.lang.Runnable&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#invocations">invocations</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../rice/environment/logging/Logger.html" title="class in rice.environment.logging">Logger</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#logger">logger</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.util.HashSet&lt;java.nio.channels.SelectionKey&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#modifyKeys">modifyKeys</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../rice/environment/random/RandomSource.html" title="interface in rice.environment.random">RandomSource</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#random">random</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#running">running</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#select">select</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Can be disabled for the simulator to improve performance, only do this
if you know you don't need to select on anything</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.nio.channels.Selector</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#selector">selector</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#seqCtr">seqCtr</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#seqLock">seqLock</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Internal method which adds a task to the task tree, waking up the selector
if necessary to recalculate the sleep time</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#TIMEOUT">TIMEOUT</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.util.Queue&lt;<A HREF="../../rice/selector/TimerTask.html" title="class in rice.selector">TimerTask</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#timerQueue">timerQueue</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../rice/environment/time/TimeSource.html" title="interface in rice.environment.time">TimeSource</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#timeSource">timeSource</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#useLoopListeners">useLoopListeners</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;LoopListeners is used in case you are worried that your process may not get scheduled for a while
such as on an overloaded planetlab node, or if you hibernate your laptop, this is not needed
for the simulator</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#wakeupTime">wakeupTime</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;<A NAME="fields_inherited_from_class_java.lang.Thread"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Fields inherited from class java.lang.Thread</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY</CODE></TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#SelectorManager(java.lang.String, rice.environment.time.TimeSource, rice.environment.logging.LogManager)">SelectorManager</A></B>(java.lang.String&nbsp;instance,
<A HREF="../../rice/environment/time/TimeSource.html" title="interface in rice.environment.time">TimeSource</A>&nbsp;timeSource,
<A HREF="../../rice/environment/logging/LogManager.html" title="interface in rice.environment.logging">LogManager</A>&nbsp;log)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#SelectorManager(java.lang.String, rice.environment.time.TimeSource, rice.environment.logging.LogManager, rice.environment.random.RandomSource)">SelectorManager</A></B>(java.lang.String&nbsp;instance,
<A HREF="../../rice/environment/time/TimeSource.html" title="interface in rice.environment.time">TimeSource</A>&nbsp;timeSource,
<A HREF="../../rice/environment/logging/LogManager.html" title="interface in rice.environment.logging">LogManager</A>&nbsp;log,
<A HREF="../../rice/environment/random/RandomSource.html" title="interface in rice.environment.random">RandomSource</A>&nbsp;random)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor, which is private since there is only one selector per JVM.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#addLoopObserver(rice.selector.LoopObserver)">addLoopObserver</A></B>(<A HREF="../../rice/selector/LoopObserver.html" title="interface in rice.selector">LoopObserver</A>&nbsp;lo)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#addTask(rice.selector.TimerTask)">addTask</A></B>(<A HREF="../../rice/selector/TimerTask.html" title="class in rice.selector">TimerTask</A>&nbsp;task)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#cancel(java.nio.channels.SelectionKey)">cancel</A></B>(java.nio.channels.SelectionKey&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Method which asks the Selector Manager to add the given key to the
cancelled set.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#destroy()">destroy</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#doInvocations()">doInvocations</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Method which invokes all pending invocations.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#doSelections()">doSelections</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#executeDueTasks()">executeDueTasks</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Internal method which finds all due tasks and executes them.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#executeTask(rice.selector.TimerTask)">executeTask</A></B>(<A HREF="../../rice/selector/TimerTask.html" title="class in rice.selector">TimerTask</A>&nbsp;next)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../rice/environment/Environment.html" title="class in rice.environment">Environment</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#getEnvironment()">getEnvironment</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.lang.Runnable</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#getInvocation()">getInvocation</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Method which synchroniously returns the first element off of the
invocations list.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.nio.channels.SelectionKey</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#getKey(java.nio.channels.SelectableChannel)">getKey</A></B>(java.nio.channels.SelectableChannel&nbsp;channel)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Utility method which returns the SelectionKey attached to the given
channel, if one exists</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.nio.channels.SelectionKey</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#getModifyKey()">getModifyKey</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Method which synchroniously returns on element off of the modifyKeys list</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#getNextTaskExecutionTime()">getNextTaskExecutionTime</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#getNumInvocations()">getNumInvocations</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Debug method which returns the number of pending invocations</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.nio.channels.Selector</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#getSelector()">getSelector</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../rice/selector/Timer.html" title="interface in rice.selector">Timer</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#getTimer()">getTimer</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the timer associated with this SelectorManager (in this case, it is
this).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#invoke(java.lang.Runnable)">invoke</A></B>(java.lang.Runnable&nbsp;d)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method schedules a runnable task to be done by the selector thread
during the next select() call.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#isSelectorThread()">isSelectorThread</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns whether or not this thread of execution is the selector thread</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#main(java.lang.String[])">main</A></B>(java.lang.String[]&nbsp;args)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#modifyKey(java.nio.channels.SelectionKey)">modifyKey</A></B>(java.nio.channels.SelectionKey&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a selectionkey handler into the list of handlers which wish to change
their keys.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#notifyLoopListeners()">notifyLoopListeners</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#onLoop()">onLoop</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method is to be implemented by a subclass to do some task each loop.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.nio.channels.SelectionKey</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#register(java.nio.channels.SelectableChannel, rice.selector.SelectionKeyHandler, int)">register</A></B>(java.nio.channels.SelectableChannel&nbsp;channel,
<A HREF="../../rice/selector/SelectionKeyHandler.html" title="class in rice.selector">SelectionKeyHandler</A>&nbsp;handler,
int&nbsp;ops)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Registers a new channel with the selector, and attaches the given
SelectionKeyHandler as the handler for the newly created key.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#removeLoopObserver(rice.selector.LoopObserver)">removeLoopObserver</A></B>(<A HREF="../../rice/selector/LoopObserver.html" title="interface in rice.selector">LoopObserver</A>&nbsp;lo)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#removeTask(rice.selector.TimerTask)">removeTask</A></B>(<A HREF="../../rice/selector/TimerTask.html" title="class in rice.selector">TimerTask</A>&nbsp;task)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#run()">run</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method starts the socket manager listening for events.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../rice/selector/TimerTask.html" title="class in rice.selector">TimerTask</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#schedule(rice.selector.TimerTask)">schedule</A></B>(<A HREF="../../rice/selector/TimerTask.html" title="class in rice.selector">TimerTask</A>&nbsp;task)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Method which schedules a task to run after a specified number of millis.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../rice/selector/TimerTask.html" title="class in rice.selector">TimerTask</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#schedule(rice.selector.TimerTask, long)">schedule</A></B>(<A HREF="../../rice/selector/TimerTask.html" title="class in rice.selector">TimerTask</A>&nbsp;task,
long&nbsp;delay)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../rice/selector/TimerTask.html" title="class in rice.selector">TimerTask</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#schedule(rice.selector.TimerTask, long, long)">schedule</A></B>(<A HREF="../../rice/selector/TimerTask.html" title="class in rice.selector">TimerTask</A>&nbsp;task,
long&nbsp;delay,
long&nbsp;period)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Method which schedules a task to run repeatedly after a specified delay and
period</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../rice/selector/TimerTask.html" title="class in rice.selector">TimerTask</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#scheduleAtFixedRate(rice.selector.TimerTask, long, long)">scheduleAtFixedRate</A></B>(<A HREF="../../rice/selector/TimerTask.html" title="class in rice.selector">TimerTask</A>&nbsp;task,
long&nbsp;delay,
long&nbsp;period)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Method which schedules a task to run repeatedly (at a fixed rate) after a
specified delay and period</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#select(int)">select</A></B>(int&nbsp;time)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Selects on the selector, and returns the result.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.nio.channels.SelectionKey[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#selectedKeys()">selectedKeys</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Selects all of the currently selected keys on the selector and returns the
result as an array of keys.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#setEnvironment(rice.environment.Environment)">setEnvironment</A></B>(<A HREF="../../rice/environment/Environment.html" title="class in rice.environment">Environment</A>&nbsp;env)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Can only be called once.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#setLogLevel(int)">setLogLevel</A></B>(int&nbsp;level)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#setSelect(boolean)">setSelect</A></B>(boolean&nbsp;b)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#useLoopListeners(boolean)">useLoopListeners</A></B>(boolean&nbsp;val)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set this to false when using the simulator, because you don't need to notify loop observers.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/selector/SelectorManager.html#wakeup()">wakeup</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Note, should hold the selector's (this) lock to call this.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Thread"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Thread</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>activeCount, checkAccess, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield</CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Field Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="TIMEOUT"><!-- --></A><H3>
TIMEOUT</H3>
<PRE>
public static int <B>TIMEOUT</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="selector"><!-- --></A><H3>
selector</H3>
<PRE>
protected java.nio.channels.Selector <B>selector</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="invocations"><!-- --></A><H3>
invocations</H3>
<PRE>
protected java.util.LinkedList&lt;java.lang.Runnable&gt; <B>invocations</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="modifyKeys"><!-- --></A><H3>
modifyKeys</H3>
<PRE>
protected java.util.HashSet&lt;java.nio.channels.SelectionKey&gt; <B>modifyKeys</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="cancelledKeys"><!-- --></A><H3>
cancelledKeys</H3>
<PRE>
protected java.util.HashSet&lt;java.nio.channels.SelectionKey&gt; <B>cancelledKeys</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="timerQueue"><!-- --></A><H3>
timerQueue</H3>
<PRE>
protected java.util.Queue&lt;<A HREF="../../rice/selector/TimerTask.html" title="class in rice.selector">TimerTask</A>&gt; <B>timerQueue</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="wakeupTime"><!-- --></A><H3>
wakeupTime</H3>
<PRE>
protected long <B>wakeupTime</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="timeSource"><!-- --></A><H3>
timeSource</H3>
<PRE>
protected <A HREF="../../rice/environment/time/TimeSource.html" title="interface in rice.environment.time">TimeSource</A> <B>timeSource</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="logger"><!-- --></A><H3>
logger</H3>
<PRE>
protected <A HREF="../../rice/environment/logging/Logger.html" title="class in rice.environment.logging">Logger</A> <B>logger</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="instance"><!-- --></A><H3>
instance</H3>
<PRE>
protected java.lang.String <B>instance</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="running"><!-- --></A><H3>
running</H3>
<PRE>
protected boolean <B>running</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="select"><!-- --></A><H3>
select</H3>
<PRE>
protected boolean <B>select</B></PRE>
<DL>
<DD>Can be disabled for the simulator to improve performance, only do this
if you know you don't need to select on anything
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="random"><!-- --></A><H3>
random</H3>
<PRE>
protected <A HREF="../../rice/environment/random/RandomSource.html" title="interface in rice.environment.random">RandomSource</A> <B>random</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="environment"><!-- --></A><H3>
environment</H3>
<PRE>
protected <A HREF="../../rice/environment/Environment.html" title="class in rice.environment">Environment</A> <B>environment</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="useLoopListeners"><!-- --></A><H3>
useLoopListeners</H3>
<PRE>
protected boolean <B>useLoopListeners</B></PRE>
<DL>
<DD>LoopListeners is used in case you are worried that your process may not get scheduled for a while
such as on an overloaded planetlab node, or if you hibernate your laptop, this is not needed
for the simulator
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="seqLock"><!-- --></A><H3>
seqLock</H3>
<PRE>
protected java.lang.Object <B>seqLock</B></PRE>
<DL>
<DD>Internal method which adds a task to the task tree, waking up the selector
if necessary to recalculate the sleep time
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="seqCtr"><!-- --></A><H3>
seqCtr</H3>
<PRE>
protected int <B>seqCtr</B></PRE>
<DL>
<DL>
</DL>
</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="SelectorManager(java.lang.String, rice.environment.time.TimeSource, rice.environment.logging.LogManager, rice.environment.random.RandomSource)"><!-- --></A><H3>
SelectorManager</H3>
<PRE>
public <B>SelectorManager</B>(java.lang.String&nbsp;instance,
<A HREF="../../rice/environment/time/TimeSource.html" title="interface in rice.environment.time">TimeSource</A>&nbsp;timeSource,
<A HREF="../../rice/environment/logging/LogManager.html" title="interface in rice.environment.logging">LogManager</A>&nbsp;log,
<A HREF="../../rice/environment/random/RandomSource.html" title="interface in rice.environment.random">RandomSource</A>&nbsp;random)</PRE>
<DL>
<DD>Constructor, which is private since there is only one selector per JVM.
<P>
</DL>
<HR>
<A NAME="SelectorManager(java.lang.String, rice.environment.time.TimeSource, rice.environment.logging.LogManager)"><!-- --></A><H3>
SelectorManager</H3>
<PRE>
public <B>SelectorManager</B>(java.lang.String&nbsp;instance,
<A HREF="../../rice/environment/time/TimeSource.html" title="interface in rice.environment.time">TimeSource</A>&nbsp;timeSource,
<A HREF="../../rice/environment/logging/LogManager.html" title="interface in rice.environment.logging">LogManager</A>&nbsp;log)</PRE>
<DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="setEnvironment(rice.environment.Environment)"><!-- --></A><H3>
setEnvironment</H3>
<PRE>
public void <B>setEnvironment</B>(<A HREF="../../rice/environment/Environment.html" title="class in rice.environment">Environment</A>&nbsp;env)</PRE>
<DL>
<DD>Can only be called once. The rest of the time the argument is rejected.
This is needed so that when the NodeFactory clones the Environment, it doesn't
get restarted/have multiple different environments etc...
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>env</CODE> - </DL>
</DD>
</DL>
<HR>
<A NAME="cancel(java.nio.channels.SelectionKey)"><!-- --></A><H3>
cancel</H3>
<PRE>
public void <B>cancel</B>(java.nio.channels.SelectionKey&nbsp;key)</PRE>
<DL>
<DD>Method which asks the Selector Manager to add the given key to the
cancelled set. If no one calls register on this key during the rest of this
select() operation, the key will be cancelled. Otherwise, it will be
returned as a result of the register operation.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - The key to cancel</DL>
</DD>
</DL>
<HR>
<A NAME="getKey(java.nio.channels.SelectableChannel)"><!-- --></A><H3>
getKey</H3>
<PRE>
public java.nio.channels.SelectionKey <B>getKey</B>(java.nio.channels.SelectableChannel&nbsp;channel)</PRE>
<DL>
<DD>Utility method which returns the SelectionKey attached to the given
channel, if one exists
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>channel</CODE> - The channel to return the key for
<DT><B>Returns:</B><DD>The key</DL>
</DD>
</DL>
<HR>
<A NAME="register(java.nio.channels.SelectableChannel, rice.selector.SelectionKeyHandler, int)"><!-- --></A><H3>
register</H3>
<PRE>
public java.nio.channels.SelectionKey <B>register</B>(java.nio.channels.SelectableChannel&nbsp;channel,
<A HREF="../../rice/selector/SelectionKeyHandler.html" title="class in rice.selector">SelectionKeyHandler</A>&nbsp;handler,
int&nbsp;ops)
throws java.io.IOException</PRE>
<DL>
<DD>Registers a new channel with the selector, and attaches the given
SelectionKeyHandler as the handler for the newly created key. Operations
which the hanlder is interested in will be called as available.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>channel</CODE> - The channel to regster with the selector<DD><CODE>handler</CODE> - The handler to use for the callbacks<DD><CODE>ops</CODE> - The initial interest operations
<DT><B>Returns:</B><DD>The SelectionKey which uniquely identifies this channel
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="invoke(java.lang.Runnable)"><!-- --></A><H3>
invoke</H3>
<PRE>
public void <B>invoke</B>(java.lang.Runnable&nbsp;d)</PRE>
<DL>
<DD>This method schedules a runnable task to be done by the selector thread
during the next select() call. All operations which modify the selector
should be done using this method, as they must be done in the selector
thread.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>d</CODE> - The runnable task to invoke</DL>
</DD>
</DL>
<HR>
<A NAME="getNumInvocations()"><!-- --></A><H3>
getNumInvocations</H3>
<PRE>
public int <B>getNumInvocations</B>()</PRE>
<DL>
<DD>Debug method which returns the number of pending invocations
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>The number of pending invocations</DL>
</DD>
</DL>
<HR>
<A NAME="modifyKey(java.nio.channels.SelectionKey)"><!-- --></A><H3>
modifyKey</H3>
<PRE>
public void <B>modifyKey</B>(java.nio.channels.SelectionKey&nbsp;key)</PRE>
<DL>
<DD>Adds a selectionkey handler into the list of handlers which wish to change
their keys. Thus, modifyKeys() will be called on the next selection
operation
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - The key which is to be changed</DL>
</DD>
</DL>
<HR>
<A NAME="onLoop()"><!-- --></A><H3>
onLoop</H3>
<PRE>
protected void <B>onLoop</B>()</PRE>
<DL>
<DD>This method is to be implemented by a subclass to do some task each loop.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="run()"><!-- --></A><H3>
run</H3>
<PRE>
public void <B>run</B>()</PRE>
<DL>
<DD>This method starts the socket manager listening for events. It is designed
to be started when this thread's start() method is invoked.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>run</CODE> in interface <CODE>java.lang.Runnable</CODE><DT><B>Overrides:</B><DD><CODE>run</CODE> in class <CODE>java.lang.Thread</CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="destroy()"><!-- --></A><H3>
destroy</H3>
<PRE>
public void <B>destroy</B>()</PRE>
<DL>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../rice/Destructable.html#destroy()">destroy</A></CODE> in interface <CODE><A HREF="../../rice/Destructable.html" title="interface in rice">Destructable</A></CODE><DT><B>Overrides:</B><DD><CODE>destroy</CODE> in class <CODE>java.lang.Thread</CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="useLoopListeners(boolean)"><!-- --></A><H3>
useLoopListeners</H3>
<PRE>
public void <B>useLoopListeners</B>(boolean&nbsp;val)</PRE>
<DL>
<DD>Set this to false when using the simulator, because you don't need to notify loop observers.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>val</CODE> - </DL>
</DD>
</DL>
<HR>
<A NAME="notifyLoopListeners()"><!-- --></A><H3>
notifyLoopListeners</H3>
<PRE>
protected void <B>notifyLoopListeners</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="addLoopObserver(rice.selector.LoopObserver)"><!-- --></A><H3>
addLoopObserver</H3>
<PRE>
public void <B>addLoopObserver</B>(<A HREF="../../rice/selector/LoopObserver.html" title="interface in rice.selector">LoopObserver</A>&nbsp;lo)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="removeLoopObserver(rice.selector.LoopObserver)"><!-- --></A><H3>
removeLoopObserver</H3>
<PRE>
public void <B>removeLoopObserver</B>(<A HREF="../../rice/selector/LoopObserver.html" title="interface in rice.selector">LoopObserver</A>&nbsp;lo)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="doSelections()"><!-- --></A><H3>
doSelections</H3>
<PRE>
protected void <B>doSelections</B>()
throws java.io.IOException</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="doInvocations()"><!-- --></A><H3>
doInvocations</H3>
<PRE>
protected void <B>doInvocations</B>()</PRE>
<DL>
<DD>Method which invokes all pending invocations. This method should *only* be
called by the selector thread.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getInvocation()"><!-- --></A><H3>
getInvocation</H3>
<PRE>
protected java.lang.Runnable <B>getInvocation</B>()</PRE>
<DL>
<DD>Method which synchroniously returns the first element off of the
invocations list.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>An item from the invocations list</DL>
</DD>
</DL>
<HR>
<A NAME="getModifyKey()"><!-- --></A><H3>
getModifyKey</H3>
<PRE>
protected java.nio.channels.SelectionKey <B>getModifyKey</B>()</PRE>
<DL>
<DD>Method which synchroniously returns on element off of the modifyKeys list
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>An item from the invocations list</DL>
</DD>
</DL>
<HR>
<A NAME="select(int)"><!-- --></A><H3>
select</H3>
<PRE>
protected int <B>select</B>(int&nbsp;time)
throws java.io.IOException</PRE>
<DL>
<DD>Selects on the selector, and returns the result. Also properly synchronizes
around the selector
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>DESCRIBE THE RETURN VALUE
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - DESCRIBE THE EXCEPTION</DL>
</DD>
</DL>
<HR>
<A NAME="selectedKeys()"><!-- --></A><H3>
selectedKeys</H3>
<PRE>
protected java.nio.channels.SelectionKey[] <B>selectedKeys</B>()
throws java.io.IOException</PRE>
<DL>
<DD>Selects all of the currently selected keys on the selector and returns the
result as an array of keys.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>The array of keys
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - DESCRIBE THE EXCEPTION</DL>
</DD>
</DL>
<HR>
<A NAME="isSelectorThread()"><!-- --></A><H3>
isSelectorThread</H3>
<PRE>
public boolean <B>isSelectorThread</B>()</PRE>
<DL>
<DD>Returns whether or not this thread of execution is the selector thread
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>Whether or not this is the selector thread</DL>
</DD>
</DL>
<HR>
<A NAME="schedule(rice.selector.TimerTask)"><!-- --></A><H3>
schedule</H3>
<PRE>
public <A HREF="../../rice/selector/TimerTask.html" title="class in rice.selector">TimerTask</A> <B>schedule</B>(<A HREF="../../rice/selector/TimerTask.html" title="class in rice.selector">TimerTask</A>&nbsp;task)</PRE>
<DL>
<DD>Method which schedules a task to run after a specified number of millis. The task must have a proper nextExecutionTime set
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../rice/selector/Timer.html#schedule(rice.selector.TimerTask)">schedule</A></CODE> in interface <CODE><A HREF="../../rice/selector/Timer.html" title="interface in rice.selector">Timer</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>task</CODE> - The task to run</DL>
</DD>
</DL>
<HR>
<A NAME="schedule(rice.selector.TimerTask, long)"><!-- --></A><H3>
schedule</H3>
<PRE>
public <A HREF="../../rice/selector/TimerTask.html" title="class in rice.selector">TimerTask</A> <B>schedule</B>(<A HREF="../../rice/selector/TimerTask.html" title="class in rice.selector">TimerTask</A>&nbsp;task,
long&nbsp;delay)</PRE>
<DL>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../rice/selector/Timer.html#schedule(rice.selector.TimerTask, long)">schedule</A></CODE> in interface <CODE><A HREF="../../rice/selector/Timer.html" title="interface in rice.selector">Timer</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="schedule(rice.selector.TimerTask, long, long)"><!-- --></A><H3>
schedule</H3>
<PRE>
public <A HREF="../../rice/selector/TimerTask.html" title="class in rice.selector">TimerTask</A> <B>schedule</B>(<A HREF="../../rice/selector/TimerTask.html" title="class in rice.selector">TimerTask</A>&nbsp;task,
long&nbsp;delay,
long&nbsp;period)</PRE>
<DL>
<DD>Method which schedules a task to run repeatedly after a specified delay and
period
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../rice/selector/Timer.html#schedule(rice.selector.TimerTask, long, long)">schedule</A></CODE> in interface <CODE><A HREF="../../rice/selector/Timer.html" title="interface in rice.selector">Timer</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>task</CODE> - The task to run<DD><CODE>delay</CODE> - The delay before first running, in milliseconds<DD><CODE>period</CODE> - The period with which to run in milliseconds</DL>
</DD>
</DL>
<HR>
<A NAME="scheduleAtFixedRate(rice.selector.TimerTask, long, long)"><!-- --></A><H3>
scheduleAtFixedRate</H3>
<PRE>
public <A HREF="../../rice/selector/TimerTask.html" title="class in rice.selector">TimerTask</A> <B>scheduleAtFixedRate</B>(<A HREF="../../rice/selector/TimerTask.html" title="class in rice.selector">TimerTask</A>&nbsp;task,
long&nbsp;delay,
long&nbsp;period)</PRE>
<DL>
<DD>Method which schedules a task to run repeatedly (at a fixed rate) after a
specified delay and period
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../rice/selector/Timer.html#scheduleAtFixedRate(rice.selector.TimerTask, long, long)">scheduleAtFixedRate</A></CODE> in interface <CODE><A HREF="../../rice/selector/Timer.html" title="interface in rice.selector">Timer</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>task</CODE> - The task to run<DD><CODE>delay</CODE> - The delay before first running in milliseconds<DD><CODE>period</CODE> - The period with which to run in milliseconds</DL>
</DD>
</DL>
<HR>
<A NAME="addTask(rice.selector.TimerTask)"><!-- --></A><H3>
addTask</H3>
<PRE>
protected void <B>addTask</B>(<A HREF="../../rice/selector/TimerTask.html" title="class in rice.selector">TimerTask</A>&nbsp;task)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="removeTask(rice.selector.TimerTask)"><!-- --></A><H3>
removeTask</H3>
<PRE>
public void <B>removeTask</B>(<A HREF="../../rice/selector/TimerTask.html" title="class in rice.selector">TimerTask</A>&nbsp;task)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="wakeup()"><!-- --></A><H3>
wakeup</H3>
<PRE>
public void <B>wakeup</B>()</PRE>
<DL>
<DD>Note, should hold the selector's (this) lock to call this.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getNextTaskExecutionTime()"><!-- --></A><H3>
getNextTaskExecutionTime</H3>
<PRE>
public long <B>getNextTaskExecutionTime</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="executeDueTasks()"><!-- --></A><H3>
executeDueTasks</H3>
<PRE>
protected void <B>executeDueTasks</B>()</PRE>
<DL>
<DD>Internal method which finds all due tasks and executes them.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="executeTask(rice.selector.TimerTask)"><!-- --></A><H3>
executeTask</H3>
<PRE>
protected boolean <B>executeTask</B>(<A HREF="../../rice/selector/TimerTask.html" title="class in rice.selector">TimerTask</A>&nbsp;next)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getTimer()"><!-- --></A><H3>
getTimer</H3>
<PRE>
public <A HREF="../../rice/selector/Timer.html" title="interface in rice.selector">Timer</A> <B>getTimer</B>()</PRE>
<DL>
<DD>Returns the timer associated with this SelectorManager (in this case, it is
this).
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>The associated timer</DL>
</DD>
</DL>
<HR>
<A NAME="getSelector()"><!-- --></A><H3>
getSelector</H3>
<PRE>
public java.nio.channels.Selector <B>getSelector</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setSelect(boolean)"><!-- --></A><H3>
setSelect</H3>
<PRE>
public void <B>setSelect</B>(boolean&nbsp;b)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getEnvironment()"><!-- --></A><H3>
getEnvironment</H3>
<PRE>
public <A HREF="../../rice/environment/Environment.html" title="class in rice.environment">Environment</A> <B>getEnvironment</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setLogLevel(int)"><!-- --></A><H3>
setLogLevel</H3>
<PRE>
public void <B>setLogLevel</B>(int&nbsp;level)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="main(java.lang.String[])"><!-- --></A><H3>
main</H3>
<PRE>
public static void <B>main</B>(java.lang.String[]&nbsp;args)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/SelectorManager.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
Rice Pastry API</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../rice/selector/SelectionKeyHandler.html" title="class in rice.selector"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../rice/selector/Timer.html" title="interface in rice.selector"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../index.html?rice/selector/SelectorManager.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="SelectorManager.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;<A HREF="#nested_classes_inherited_from_class_java.lang.Thread">NESTED</A>&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
<i>Copyright &#169; 2001-2005 - Rice Pastry.</i>
</BODY>
</HTML>