public ClusterInfo getClusterInfoOrNull ( ) { String clusterName = getProperty ( InternalConfigurationOptions . INTERNAL_ES_CLUSTER_NAME ) ; if ( clusterName == null ) { return null ; } String clusterUUID = getProperty ( InternalConfigurationOptions . INTERNAL_ES_CLUSTER_UUID ) ; EsMajorVersion version = getInternalVersionOrThrow ( ) ; return new ClusterInfo ( new ClusterName ( clusterName , clusterUUID ) , version ) ; }
Get the internal cluster name and version or null if not present in the settings