public Metadata metadata()

in adapters/base/src/main/java/org/apache/cassandra/sidecar/adapters/base/CassandraAdapter.java [62:84]


    public Metadata metadata()
    {
        Session activeSession = session.localCql();
        if (activeSession == null)
        {
            LOGGER.warn("There is no active session to Cassandra");
            return null;
        }

        if (activeSession.getCluster() == null)
        {
            LOGGER.warn("There is no available cluster for session={}", activeSession);
            return null;
        }

        if (activeSession.getCluster().getMetadata() == null)
        {
            LOGGER.warn("There is no available metadata for session={}, cluster={}",
                        activeSession, activeSession.getCluster());
        }

        return activeSession.getCluster().getMetadata();
    }