public boolean get(ProcessResult processResult, long timeout, TimeUnit unit) {
        try {
            if (latch.await(timeout, unit)) {
                if (error != null) {
                    return processResult.setFailResult(ErrorCode.SEND_ON_EXCEPTION, error.getMessage());
                }
                return processResult.setFailResult(result);
            } else {
                return processResult.setFailResult(ErrorCode.SEND_WAIT_TIMEOUT);
            }
        } catch (Throwable ex) {
            if (ex instanceof InterruptedException) {
                return processResult.setFailResult(ErrorCode.SEND_WAIT_INTERRUPT);
            } else {
                return processResult.setFailResult(ErrorCode.UNKNOWN_ERROR, ex.getMessage());
            }
        }
    }
TCP Call Future class

a future implementation for tcp RPCs.
inlong-sdk/dataproxy-sdk/src/main/java/org/apache/inlong/sdk/dataproxy/network/tcp/TcpCallFuture.java