public boolean existsKeyspace ( String keyspace , boolean showLog ) { this . metadata = cluster . getMetadata ( ) ; if ( ! ( this . metadata . getKeyspaces ( ) . isEmpty ( ) ) ) { for ( KeyspaceMetadata k : metadata . getKeyspaces ( ) ) { if ( k . getName ( ) . equals ( keyspace ) ) { return true ; } } } return false ; }
Checks if a keyspace exists in Cassandra .