class SshConnect implements CacheCloseable {
    private final ClientSession clientSession;

    public SshConnect(ClientSession clientSession) {
        this.clientSession = clientSession;
    }

    @Override
    public void close() {<FILL_FUNCTION_BODY>}

    public ClientSession getConnection() {
        return clientSession;
    }
}

        try {
            if (clientSession != null) {
                clientSession.close();
            }
        } catch (Exception e) {
            log.error("[connection common cache] close ssh connect error: {}", e.getMessage());
        }
    
<no_super_class>