public class NamedChannelWithTimeout extends NamedChannel
channel| Constructor and Description |
|---|
NamedChannelWithTimeout(RepNode repNode,
java.nio.channels.SocketChannel channel,
int timeoutMs) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
boolean |
isActive(long timeMs)
Method invoked by the time thread to check on the channel on a periodic
basis.
|
int |
read(java.nio.ByteBuffer dst) |
void |
setTimeoutMs(int timeoutMs)
Used to modify the timeout associated with the channel.
|
getChannel, getNameIdPair, isOpen, setNameIdPair, toString, writepublic NamedChannelWithTimeout(RepNode repNode, java.nio.channels.SocketChannel channel, int timeoutMs)
public void setTimeoutMs(int timeoutMs)
timeoutMs - the new timeout valuepublic int read(java.nio.ByteBuffer dst)
throws java.io.IOException
read in interface java.nio.channels.ReadableByteChannelread in class NamedChanneljava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in interface java.nio.channels.Channelclose in class NamedChanneljava.io.IOExceptionpublic boolean isActive(long timeMs)
timeMs - the pseudo timeCopyright (c) 2004-2012 Oracle. All rights reserved.