public boolean compareAndSet(final State expect, final State update) {
      return this.ref.compareAndSet(expect, update);
    }
Wrapper class around State enum to make its operations atomic.
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/MaterializationsRebuildLockHandler.java