Package org.apache.hadoop.hdfs.net
Class DomainPeerServer
java.lang.Object
org.apache.hadoop.hdfs.net.DomainPeerServer
- All Implemented Interfaces:
Closeable,AutoCloseable,PeerServer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.hdfs.net.Peeraccept()Listens for a connection to be made to this server and accepts it.voidclose()Free the resources associated with this peer server.intGet the receive buffer size of the PeerServer.voidsetReceiveBufferSize(int size) Set the receive buffer size of the PeerServer.toString()
-
Constructor Details
-
DomainPeerServer
- Throws:
IOException
-
-
Method Details
-
getBindPath
-
setReceiveBufferSize
Description copied from interface:PeerServerSet the receive buffer size of the PeerServer.- Specified by:
setReceiveBufferSizein interfacePeerServer- Parameters:
size- The receive buffer size.- Throws:
IOException
-
getReceiveBufferSize
Description copied from interface:PeerServerGet the receive buffer size of the PeerServer.- Specified by:
getReceiveBufferSizein interfacePeerServer- Returns:
- The receive buffer size.
- Throws:
IOException
-
accept
Description copied from interface:PeerServerListens for a connection to be made to this server and accepts it. The method blocks until a connection is made.- Specified by:
acceptin interfacePeerServer- Throws:
IOException- if an I/O error occurs when waiting for a connection.SocketTimeoutException- if a timeout was previously set and the timeout has been reached.
-
getListeningString
- Specified by:
getListeningStringin interfacePeerServer- Returns:
- A string representation of the address we're listening on.
-
close
Description copied from interface:PeerServerFree the resources associated with this peer server. This normally includes sockets, etc.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfacePeerServer- Throws:
IOException- If there is an error closing the PeerServer
-
toString
-