docs: public void setOfflineState(boolean setToOffline) {
          // acquire write lock
          writeLock.lock();
          try {
              String currentState = ByteUtils.getString(get(SERVER_STATE_KEY, null).get(0).getValue(),
                                                        "UTF-8");
              if(setToOffline) {
                  // from NORMAL_SERVER to OFFLINE_SERVER
                  if(currentState.equals(VoldemortState.NORMAL_SERVER.toString())) {
                      put(SERVER_STATE_KEY, VoldemortState.OFFLINE_SERVER);
                      initCache(SERVER_STATE_KEY);
                      put(SLOP_STREAMING_ENABLED_KEY, false);
                      initCache(SLOP_STREAMING_ENABLED_KEY);
                      put(PARTITION_STREAMING_ENABLED_KEY, false);
                      initCache(PARTITION_STREAMING_ENABLED_KEY);
                      put(READONLY_FETCH_ENABLED_KEY, false);
                      initCache(READONLY_FETCH_ENABLED_KEY);
                  } else if(currentState.equals(VoldemortState.OFFLINE_SERVER.toString())) {
                      logger.warn("Already in OFFLINE_SERVER state.");
                      return;
                  } else {
                      logger.error("Cannot enter OFFLINE_SERVER state from " + currentState);
                      throw new VoldemortException("Cannot enter OFFLINE_SERVER state from "
                                                   + currentState);
                  }
              } else {
                  // from OFFLINE_SERVER to NORMAL_SERVER
                  if(currentState.equals(VoldemortState.NORMAL_SERVER.toString())) {
                      logger.warn("Already in NORMAL_SERVER state.");
                      return;
                  } else if(currentState.equals(VoldemortState.OFFLINE_SERVER.toString())) {
                      put(SERVER_STATE_KEY, VoldemortState.NORMAL_SERVER);
                      initCache(SERVER_STATE_KEY);
                      put(SLOP_STREAMING_ENABLED_KEY, true);
                      initCache(SLOP_STREAMING_ENABLED_KEY);
                      put(PARTITION_STREAMING_ENABLED_KEY, true);
                      initCache(PARTITION_STREAMING_ENABLED_KEY);
                      put(READONLY_FETCH_ENABLED_KEY, true);
                      initCache(READONLY_FETCH_ENABLED_KEY);
                      init();
                      initNodeId(getNodeIdNoLock());
                  } else {
                      logger.error("Cannot enter NORMAL_SERVER state from " + currentState);
                      throw new VoldemortException("Cannot enter NORMAL_SERVER state from "
                                                   + currentState);
                  }
              }
          } finally {
              writeLock.unlock();
          }
      }