@Override
    public boolean equals(Object obj) {
      if (obj == this) {
        return true;
      }
      if (!(obj instanceof BucketLock)) {
        return false;
      }

      BucketLock other = (BucketLock) obj;
      if (!lockName.equals(other.lockName)) {
        return false;
      }

      DLockService ls1 = lockService;
      DLockService ls2 = other.lockService;
      if (ls1 == null || ls2 == null) {
        // If both are null, return true, if only one is null, return false
        return ls1 == ls2;
      }
      return ls1.equals(ls2);
    }
Ask the grantor who has the lock

@return the ID of the member holding the lock
geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java