public void setReadsEnabled(boolean readsEnabled) {
    if (readsEnabled && !this.writestate.readsEnabled) {
      LOG.info("Enabling reads for {}", getRegionInfo().getEncodedName());
    }
    this.writestate.setReadsEnabled(readsEnabled);
  }
@throws IOException Throws exception if region is in read-only mode.
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java