< prev index next >

src/java.base/share/classes/java/nio/channels/SelectableChannel.java

Print this page
rev 48757 : [mq]: nio-cleanup


 104      *
 105      * @return  The provider that created this channel
 106      */
 107     public abstract SelectorProvider provider();
 108 
 109     /**
 110      * Returns an <a href="SelectionKey.html#opsets">operation set</a>
 111      * identifying this channel's supported operations.  The bits that are set
 112      * in this integer value denote exactly the operations that are valid for
 113      * this channel.  This method always returns the same value for a given
 114      * concrete channel class.
 115      *
 116      * @return  The valid-operation set
 117      */
 118     public abstract int validOps();
 119 
 120     // Internal state:
 121     //   keySet, may be empty but is never null, typ. a tiny array
 122     //   boolean isRegistered, protected by key set
 123     //   regLock, lock object to prevent duplicate registrations
 124     //   boolean isBlocking, protected by regLock
 125 
 126     /**
 127      * Tells whether or not this channel is currently registered with any
 128      * selectors.  A newly-created channel is not registered.
 129      *
 130      * <p> Due to the inherent delay between key cancellation and channel
 131      * deregistration, a channel may remain registered for some time after all
 132      * of its keys have been cancelled.  A channel may also remain registered
 133      * for some time after it is closed.  </p>
 134      *
 135      * @return {@code true} if, and only if, this channel is registered
 136      */
 137     public abstract boolean isRegistered();
 138     //
 139     // sync(keySet) { return isRegistered; }
 140 
 141     /**
 142      * Retrieves the key representing the channel's registration with the given
 143      * selector.
 144      *




 104      *
 105      * @return  The provider that created this channel
 106      */
 107     public abstract SelectorProvider provider();
 108 
 109     /**
 110      * Returns an <a href="SelectionKey.html#opsets">operation set</a>
 111      * identifying this channel's supported operations.  The bits that are set
 112      * in this integer value denote exactly the operations that are valid for
 113      * this channel.  This method always returns the same value for a given
 114      * concrete channel class.
 115      *
 116      * @return  The valid-operation set
 117      */
 118     public abstract int validOps();
 119 
 120     // Internal state:
 121     //   keySet, may be empty but is never null, typ. a tiny array
 122     //   boolean isRegistered, protected by key set
 123     //   regLock, lock object to prevent duplicate registrations
 124     //   blocking mode, protected by regLock
 125 
 126     /**
 127      * Tells whether or not this channel is currently registered with any
 128      * selectors.  A newly-created channel is not registered.
 129      *
 130      * <p> Due to the inherent delay between key cancellation and channel
 131      * deregistration, a channel may remain registered for some time after all
 132      * of its keys have been cancelled.  A channel may also remain registered
 133      * for some time after it is closed.  </p>
 134      *
 135      * @return {@code true} if, and only if, this channel is registered
 136      */
 137     public abstract boolean isRegistered();
 138     //
 139     // sync(keySet) { return isRegistered; }
 140 
 141     /**
 142      * Retrieves the key representing the channel's registration with the given
 143      * selector.
 144      *


< prev index next >