From 69c986825e0e01c5002c2e0bebaeaac013992317 Mon Sep 17 00:00:00 2001 From: Adam Retter Date: Mon, 26 Apr 2021 08:33:15 -0700 Subject: [PATCH] Fix javadoc for keyMayExist (#8232) Summary: Closes https://github.com/facebook/rocksdb/issues/6985 Pull Request resolved: https://github.com/facebook/rocksdb/pull/8232 Reviewed By: jay-zhuang Differential Revision: D27999779 Pulled By: mrambacher fbshipit-source-id: a37c88d93bde2692b8be9e46e673dda7bea701b2 --- java/src/main/java/org/rocksdb/RocksDB.java | 32 +++++++++++++++------ 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/java/src/main/java/org/rocksdb/RocksDB.java b/java/src/main/java/org/rocksdb/RocksDB.java index 5c0d105f5..bec702faf 100644 --- a/java/src/main/java/org/rocksdb/RocksDB.java +++ b/java/src/main/java/org/rocksdb/RocksDB.java @@ -2546,7 +2546,9 @@ public class RocksDB extends RocksObject { /** * If the key definitely does not exist in the database, then this method - * returns null, else it returns an instance of KeyMayExistResult + * returns false, otherwise it returns true if the key might exist. + * That is to say that this method is probabilistic and may return false + * positives, but never a true negative. * * If the caller wants to obtain value when the key * is found in memory, then {@code valueHolder} must be set. @@ -2570,7 +2572,9 @@ public class RocksDB extends RocksObject { /** * If the key definitely does not exist in the database, then this method - * returns null, else it returns an instance of KeyMayExistResult + * returns false, otherwise it returns true if the key might exist. + * That is to say that this method is probabilistic and may return false + * positives, but never a true negative. * * If the caller wants to obtain value when the key * is found in memory, then {@code valueHolder} must be set. @@ -2599,7 +2603,9 @@ public class RocksDB extends RocksObject { /** * If the key definitely does not exist in the database, then this method - * returns null, else it returns an instance of KeyMayExistResult + * returns false, otherwise it returns true if the key might exist. + * That is to say that this method is probabilistic and may return false + * positives, but never a true negative. * * If the caller wants to obtain value when the key * is found in memory, then {@code valueHolder} must be set. @@ -2626,7 +2632,9 @@ public class RocksDB extends RocksObject { /** * If the key definitely does not exist in the database, then this method - * returns null, else it returns an instance of KeyMayExistResult + * returns false, otherwise it returns true if the key might exist. + * That is to say that this method is probabilistic and may return false + * positives, but never a true negative. * * If the caller wants to obtain value when the key * is found in memory, then {@code valueHolder} must be set. @@ -2658,7 +2666,9 @@ public class RocksDB extends RocksObject { /** * If the key definitely does not exist in the database, then this method - * returns null, else it returns an instance of KeyMayExistResult + * returns false, otherwise it returns true if the key might exist. + * That is to say that this method is probabilistic and may return false + * positives, but never a true negative. * * If the caller wants to obtain value when the key * is found in memory, then {@code valueHolder} must be set. @@ -2685,7 +2695,9 @@ public class RocksDB extends RocksObject { /** * If the key definitely does not exist in the database, then this method - * returns null, else it returns an instance of KeyMayExistResult + * returns false, otherwise it returns true if the key might exist. + * That is to say that this method is probabilistic and may return false + * positives, but never a true negative. * * If the caller wants to obtain value when the key * is found in memory, then {@code valueHolder} must be set. @@ -2717,7 +2729,9 @@ public class RocksDB extends RocksObject { /** * If the key definitely does not exist in the database, then this method - * returns null, else it returns an instance of KeyMayExistResult + * returns false, otherwise it returns true if the key might exist. + * That is to say that this method is probabilistic and may return false + * positives, but never a true negative. * * If the caller wants to obtain value when the key * is found in memory, then {@code valueHolder} must be set. @@ -2746,7 +2760,9 @@ public class RocksDB extends RocksObject { /** * If the key definitely does not exist in the database, then this method - * returns null, else it returns an instance of KeyMayExistResult + * returns false, otherwise it returns true if the key might exist. + * That is to say that this method is probabilistic and may return false + * positives, but never a true negative. * * If the caller wants to obtain value when the key * is found in memory, then {@code valueHolder} must be set.