public String[] listHeldLocks() {
    Map<Object, DLockToken> tokenMap = lockService.snapshotService();
    Iterator<Object> it = tokenMap.keySet().iterator();
    List<String> listOfLocks = new ArrayList<>();
    int j = 0;
    while (it.hasNext()) {
      Object lockObject = it.next();
      DLockToken token = tokenMap.get(lockObject);
      if (token.getUsageCount() > 0) {
        // As lock objects are of Object type, this is the best
        // info we can give
        listOfLocks.add(lockObject.toString());
      }
    }
    if (listOfLocks.size() > 0) {
      String[] retStr = new String[listOfLocks.size()];
      listOfLocks.toArray(retStr);
      return retStr;
    }

    return ManagementConstants.NO_DATA_STRING;
  }
@return currently held lock by this lock Service
geode-core/src/main/java/org/apache/geode/management/internal/beans/LockServiceMBeanBridge.java