boolean preventReentry(DistributedMemberLock lock) {
      switch (this) {
        case ALLOW:
          return false; // allow
        case THROW_ERROR:
          throw new IllegalStateException("Attempted to reenter held lock " + lock);
        case PREVENT_SILENTLY:
          return true; // reject
      }
      throw new AssertionError("Unknown LockReentryPolicy: " + this);
    }
Returns true if lock reentry should be rejected.

@param lock the lock that reentry is being attempted on
@return true if lock reentry should be rejected
@throws IllegalStateException if reentry policy is NONREENTRANT_ERROR
geode-core/src/main/java/org/apache/geode/distributed/internal/locks/DistributedMemberLock.java