public boolean exists(final Txn<ByteBuffer> txn, final Predicate<K> keyPredicate) {
        Objects.requireNonNull(keyPredicate);
        boolean wasMatchFound = false;
        try (CursorIterable<ByteBuffer> iterable = getLmdbDbi().iterate(txn, KeyRange.allBackward())) {
            for (final KeyVal<ByteBuffer> keyValBuffer : iterable) {
                final K key = deserializeKey(keyValBuffer.key());
                if (keyPredicate.test(key)) {
                    wasMatchFound = true;
                    break;
                }
            }
        }
        return wasMatchFound;
    }
Scans over all entries till it finds a match, so not recommended for use on big tables.
De-serialises each key as it goes.
Intended for use when it is not possible to test a key without di-serialisation, e.g. when
variable width serialisation is used.

@return True if any entry exists that matches keyPredicate.
stroom-lmdb/src/main/java/stroom/lmdb/AbstractLmdbDb.java