public synchronized boolean set(boolean on) throws IOException {
    byte[] state = toByteArray(on);
    setState(state);
    boolean prevOn = this.on;
    this.on = on;
    return prevOn;
  }
Set the flag on/off.
@param on true if the flag should be on, false otherwise
@throws IOException if the operation fails
@return returns the previous state
hbase-server/src/main/java/org/apache/hadoop/hbase/master/BooleanStateStore.java