@Override
  public boolean lockGII() {
    ImageState imageState = getImageState();
    if (imageState.isReplicate() && !isInitialized()) {
      imageState.lockGII();
      // recheck initialized while holding lock
      if (isInitialized()) {
        // we didn't need to lock after all so clear and return false
        imageState.unlockGII();
      } else {
        return true;
      }
    }
    return false;
  }
Callers of this method should always follow the call with: if (lockGII()) { try { } finally {
unlockGII(); } }

@return true if lock obtained and unlock needs to be called
geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java