<commit_before>package me.prettyprint.cassandra.service;

import java.util.HashMap;
import java.util.Map;

import me.prettyprint.cassandra.service.CassandraHostConfigurator;

public class ClusterFactory {

  private static Map<String, Cluster> clusters = new HashMap<String, Cluster>();
  
  public static Cluster get(String clusterName) {
    return clusters.get(clusterName);
  }
  /**
   * 
   * @param clusterName The cluster name. This is an identifying string for the cluster, e.g. 
   * "production" or "test" etc. Clusters will be created on demand per each unique clusterName key.
   * @param hostIp host:ip format string
   * @return
   */
  public static Cluster getOrCreate(String clusterName, String hostIp) {
    /*
     I would like to move off of string literals for hosts, perhaps
     providing them for convinience, and used specific types
      
     */
    return getOrCreate(clusterName, new CassandraHostConfigurator(hostIp));
  }<commit_msg>Make the clusters member final<commit_after>package me.prettyprint.cassandra.service;

import java.util.HashMap;
import java.util.Map;

import me.prettyprint.cassandra.service.CassandraHostConfigurator;

public class ClusterFactory {

  private static final Map<String, Cluster> clusters = new HashMap<String, Cluster>();
  
  public static Cluster get(String clusterName) {
    return clusters.get(clusterName);
  }
  /**
   * 
   * @param clusterName The cluster name. This is an identifying string for the cluster, e.g. 
   * "production" or "test" etc. Clusters will be created on demand per each unique clusterName key.
   * @param hostIp host:ip format string
   * @return
   */
  public static Cluster getOrCreate(String clusterName, String hostIp) {
    /*
     I would like to move off of string literals for hosts, perhaps
     providing them for convinience, and used specific types
      
     */
    return getOrCreate(clusterName, new CassandraHostConfigurator(hostIp));
  }
{'fraction_non_alphanumeric': 0.07987711213517665, 'fraction_numerical': 0.0, 'mean_word_length': 3.812807881773399, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6541330', 'n_tokens_mistral': 558, 'n_tokens_neox': 538, 'n_words': 189}