java.lang.AutoCloseable, java.io.CloseableBasicInetPeer, DomainPeer, EncryptedPeer, NioInetPeer@Private
public interface Peer
extends java.io.Closeable
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
Close the peer.
|
org.apache.hadoop.net.unix.DomainSocket |
getDomainSocket() |
|
java.io.InputStream |
getInputStream() |
|
java.nio.channels.ReadableByteChannel |
getInputStreamChannel() |
|
java.lang.String |
getLocalAddressString() |
|
java.io.OutputStream |
getOutputStream() |
|
int |
getReceiveBufferSize() |
|
java.lang.String |
getRemoteAddressString() |
|
boolean |
getTcpNoDelay() |
|
boolean |
hasSecureChannel() |
Return true if the channel is secure.
|
boolean |
isClosed() |
|
boolean |
isLocal() |
|
void |
setReadTimeout(int timeoutMs) |
Set the read timeout on this peer.
|
void |
setWriteTimeout(int timeoutMs) |
Set the write timeout on this peer.
|
java.nio.channels.ReadableByteChannel getInputStreamChannel()
void setReadTimeout(int timeoutMs)
throws java.io.IOException
timeoutMs - The timeout in milliseconds.java.io.IOExceptionint getReceiveBufferSize()
throws java.io.IOException
java.io.IOExceptionboolean getTcpNoDelay()
throws java.io.IOException
java.io.IOExceptionvoid setWriteTimeout(int timeoutMs)
throws java.io.IOException
BasicInetPeer.setWriteTimeout(int) for details.timeoutMs - The timeout in milliseconds.java.io.IOExceptionboolean isClosed()
void close()
throws java.io.IOException
close in interface java.lang.AutoCloseableclose in interface java.io.Closeablejava.io.IOExceptionjava.lang.String getRemoteAddressString()
java.lang.String getLocalAddressString()
java.io.InputStream getInputStream()
throws java.io.IOException
java.io.IOExceptionjava.io.OutputStream getOutputStream()
throws java.io.IOException
java.io.IOExceptionboolean isLocal()
org.apache.hadoop.net.unix.DomainSocket getDomainSocket()
boolean hasSecureChannel()
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.