Code example for AtomicBoolean

Methods: get

0
  private AtomicBoolean ran = new AtomicBoolean(false);
 
  @Override 
  public boolean canHandle(String property)
  { 
    return tableProperties.contains(property) && !ran.get();
  } 
 
  @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];
      }