Code example for AtomicBoolean

Methods: getAndSet

0
  } 
 
  @Override 
  public Map<String, String> convert(Properties properties)
  { 
    if (!ran.getAndSet(true)) {
      String tablePrefix = properties.getProperty("druid.database.segmentTable");
 
      if (tablePrefix == null) {
        tablePrefix = "druid";
      } 
      else { 
        tablePrefix = tablePrefix.split("_")[0];
      } 
 
      Map<String, String> retVal = Maps.newLinkedHashMap();
 
      retVal.put("druid.db.tables.base", tablePrefix);
 
      addIfNotDefault(properties, tablePrefix, retVal, "druid.database.segmentTable", "segments");
Stop searching for code, let great code find you!  Add Codota to your java IDE