Package alluxio
Interface Client
-
- All Superinterfaces:
java.lang.AutoCloseable
,java.io.Closeable
- All Known Implementing Classes:
AbstractClient
,AbstractJobMasterClient
,AbstractMasterClient
public interface Client extends java.io.Closeable
Interface for a client in the Alluxio system.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
connect()
Connects with the remote.void
disconnect()
Closes the connection with the Alluxio remote and does the necessary cleanup.java.net.InetSocketAddress
getConfAddress()
java.lang.String
getRemoteHostName()
java.net.SocketAddress
getRemoteSockAddress()
boolean
isClosed()
boolean
isConnected()
Returns the connected status of the client.
-
-
-
Method Detail
-
connect
void connect() throws java.io.IOException
Connects with the remote.- Throws:
java.io.IOException
-
disconnect
void disconnect()
Closes the connection with the Alluxio remote and does the necessary cleanup. It should be used if the client has not connected with the remote for a while, for example.
-
getRemoteSockAddress
java.net.SocketAddress getRemoteSockAddress() throws UnavailableException
- Returns:
- the
SocketAddress
of the remote - Throws:
UnavailableException
- if the primary address cannot be determined
-
getRemoteHostName
java.lang.String getRemoteHostName() throws UnavailableException
- Returns:
- the host name of the remote
- Throws:
UnavailableException
- if the primary address cannot be determined
-
getConfAddress
java.net.InetSocketAddress getConfAddress() throws UnavailableException
- Returns:
- the
InetSocketAddress
of the configuration remote - Throws:
UnavailableException
- if the primary address cannot be determined
-
isConnected
boolean isConnected()
Returns the connected status of the client.- Returns:
- true if this client is connected to the remote
-
isClosed
boolean isClosed()
- Returns:
- whether the client is closed
-
-