/** * 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. */ public synchronized void disconnect() { if (mConnected) { Preconditions.checkNotNull(mChannel, PreconditionMessage.CHANNEL_NULL_WHEN_CONNECTED); LOG.debug("Disconnecting from the {} @ {}", getServiceName(), mAddress); beforeDisconnect(); mChannel.shutdown(); mConnected = false; afterDisconnect(); } }
/** * 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. */ public synchronized void disconnect() { if (mConnected) { Preconditions.checkNotNull(mProtocol, PreconditionMessage.PROTOCOL_NULL_WHEN_CONNECTED); LOG.debug("Disconnecting from the {} @ {}", getServiceName(), mAddress); beforeDisconnect(); mProtocol.getTransport().close(); mConnected = false; afterDisconnect(); } }