docs: public boolean tryLock() {
          boolean success = false;
          try {
              if (channel != null && channel.isOpen()) {
                  return false;
              }
              channel = randomAccessFile.getChannel();
              lock = channel.tryLock();
              if (lock != null) {
                  success = true;
                  return true;
              }
          } catch (Exception e) {
              return false;
          } finally {
              if (!success) {
                  if (channel != null) {
                      try {
                          channel.close();
                      } catch (IOException ignored) {
                      }
                  }
              }
          }
          return false;
      }