Code example for AtomicReference

Methods: getAndSet

0
  public static MetricsSystem setInstance(MetricsSystem ms) {
    return INSTANCE.setImpl(ms);
  } 
 
  MetricsSystem setImpl(MetricsSystem ms) {
    return impl.getAndSet(ms);
  } 
 
  MetricsSystem getImpl() { return impl.get(); }
 
  @InterfaceAudience.Private 
  public static void setMiniClusterMode(boolean choice) {
    INSTANCE.miniClusterMode = choice;
  } 
 
  @InterfaceAudience.Private 
  public static boolean inMiniClusterMode() { 
    return INSTANCE.miniClusterMode;
  } 
 
Stop searching for code, let great code find you!  Add Codota to your java IDE