java.lang.Object
java.nio.channels.SelectionKey
- Direct Known Subclasses:
- AbstractSelectionKey
- See Also:
- Top Examples, Source Code,
attach
, validOps()
, interestOps(int)
, isValid
, cancel
,
Selector
public final Object attach(Object ob)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public final Object attachment()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public abstract void cancel()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public abstract SelectableChannel channel()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public abstract int interestOps()
- See Also:
- CancelledKeyException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public abstract SelectionKey interestOps(int ops)
- See Also:
- CancelledKeyException, IllegalArgumentException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public final boolean isAcceptable()
- See Also:
- CancelledKeyException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public final boolean isConnectable()
- See Also:
- CancelledKeyException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public final boolean isReadable()
- See Also:
- CancelledKeyException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public abstract boolean isValid()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public final boolean isWritable()
- See Also:
- CancelledKeyException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public static final int OP_ACCEPT
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public static final int OP_CONNECT
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public static final int OP_READ
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public static final int OP_WRITE
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
[1766]Use of OP_WRITE
By Anonymous on 2006/05/31 11:16:32 Rate
When building a scalable NIO server, you always have to handle three important NIO operation set bit:
* OP_ACCEPT: Operation-set bit for socket-accept operations
* OP_READ: Operation-set bit for read operations
* OP_WRITE: Operation-set bit for write operations
Handling OP_ACCEPT and OP_READ has been well documented in several NIO tutorial. Strangely, the OP_WRITE is sometimes not described at all. Not handling the OP_WRITE correctly can make your server performance pretty bad, and on win32, can produce disastrous performance problem, like freezing the OS by eating all the CPU.
public abstract int readyOps()
- See Also:
- CancelledKeyException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
protected SelectionKey()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public abstract Selector selector()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples