src/main/java/com/github/mongobee/lock/LockRepository.java
LockEntry findByKey(String lockKey) {
    Document result = db.getCollection(lockCollectionName).find(new Document().append(KEY_FIELD, lockKey)).first();
    if (result != null) {
      return new LockEntry(
          result.getString(KEY_FIELD),
          result.getString(STATUS_FIELD),
          result.getString(OWNER_FIELD),
          result.getDate(EXPIRES_AT_FIELD)
      );
    }
    return null;
  }
/**
   * Retrieves a lock by key
   *
   * @param lockKey key
   * @return LockEntry
   */
Retrieves a lock by key
@param lockKey key
@return LockEntry
Retrieves a lock by key @param lockKey key @return LockEntry
LockEntry findByKey(String lockKey) {
    Document result = db.getCollection(lockCollectionName).find(new Document().append(KEY_FIELD, lockKey)).first();
    if (result != null) {
      return new LockEntry(
          result.getString(KEY_FIELD),
          result.getString(STATUS_FIELD),
          result.getString(OWNER_FIELD),
          result.getDate(EXPIRES_AT_FIELD)
      );
    }
    return null;
  }
LockEntry findByKey ( String lockKey ) { Document result = db . getCollection ( lockCollectionName ) . find ( new Document ( ) . append ( KEY_FIELD , lockKey ) ) . first ( ) ; if ( result != null ) { return new LockEntry ( result . getString ( KEY_FIELD ) , result . getString ( STATUS_FIELD ) , result . getString ( OWNER_FIELD ) , result . getDate ( EXPIRES_AT_FIELD ) ) ; } return null ; }
Retrieves a lock by key
 @param lockKey key
 @return LockEntry
Retrieves a lock by key @param lockKey key @return LockEntry