]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/rocksdb/java/src/main/java/org/rocksdb/ColumnFamilyOptionsInterface.java
import 14.2.4 nautilus point release
[ceph.git] / ceph / src / rocksdb / java / src / main / java / org / rocksdb / ColumnFamilyOptionsInterface.java
index 5cb68b46148e1fda814d250d45825198b1f0c673..f88a21af2b0140e2be5d90798a3dbcdb5a416c16 100644 (file)
@@ -151,6 +151,60 @@ public interface ColumnFamilyOptionsInterface
    */
   T setMergeOperator(MergeOperator mergeOperator);
 
+  /**
+   * A single CompactionFilter instance to call into during compaction.
+   * Allows an application to modify/delete a key-value during background
+   * compaction.
+   *
+   * If the client requires a new compaction filter to be used for different
+   * compaction runs, it can specify call
+   * {@link #setCompactionFilterFactory(AbstractCompactionFilterFactory)}
+   * instead.
+   *
+   * The client should specify only set one of the two.
+   * {@link #setCompactionFilter(AbstractCompactionFilter)} takes precedence
+   * over {@link #setCompactionFilterFactory(AbstractCompactionFilterFactory)}
+   * if the client specifies both.
+   *
+   * If multithreaded compaction is being used, the supplied CompactionFilter
+   * instance may be used from different threads concurrently and so should be thread-safe.
+   *
+   * @param compactionFilter {@link AbstractCompactionFilter} instance.
+   * @return the instance of the current object.
+   */
+  T setCompactionFilter(
+          final AbstractCompactionFilter<? extends AbstractSlice<?>> compactionFilter);
+
+  /**
+   * Accessor for the CompactionFilter instance in use.
+   *
+   * @return  Reference to the CompactionFilter, or null if one hasn't been set.
+   */
+  AbstractCompactionFilter<? extends AbstractSlice<?>> compactionFilter();
+
+  /**
+   * This is a factory that provides {@link AbstractCompactionFilter} objects
+   * which allow an application to modify/delete a key-value during background
+   * compaction.
+   *
+   * A new filter will be created on each compaction run.  If multithreaded
+   * compaction is being used, each created CompactionFilter will only be used
+   * from a single thread and so does not need to be thread-safe.
+   *
+   * @param compactionFilterFactory {@link AbstractCompactionFilterFactory} instance.
+   * @return the instance of the current object.
+   */
+  T setCompactionFilterFactory(
+          final AbstractCompactionFilterFactory<? extends AbstractCompactionFilter<?>>
+                  compactionFilterFactory);
+
+  /**
+   * Accessor for the CompactionFilterFactory instance in use.
+   *
+   * @return  Reference to the CompactionFilterFactory, or null if one hasn't been set.
+   */
+  AbstractCompactionFilterFactory<? extends AbstractCompactionFilter<?>> compactionFilterFactory();
+
   /**
    * This prefix-extractor uses the first n bytes of a key as its prefix.
    *
@@ -345,6 +399,28 @@ public interface ColumnFamilyOptionsInterface
    */
   CompressionType bottommostCompressionType();
 
+  /**
+   * Set the options for compression algorithms used by
+   * {@link #bottommostCompressionType()} if it is enabled.
+   *
+   * To enable it, please see the definition of
+   * {@link CompressionOptions}.
+   *
+   * @param compressionOptions the bottom most compression options.
+   *
+   * @return the reference of the current options.
+   */
+  T setBottommostCompressionOptions(
+      final CompressionOptions compressionOptions);
+
+  /**
+   * Get the bottom most compression options.
+   *
+   * See {@link #setBottommostCompressionOptions(CompressionOptions)}.
+   *
+   * @return the bottom most compression options.
+   */
+  CompressionOptions bottommostCompressionOptions();
 
   /**
    * Set the different options for compression algorithms