From 5830c619d5732017a542bbef1be69f3e92dcd5f1 Mon Sep 17 00:00:00 2001 From: Jurriaan Mous Date: Wed, 19 Jun 2019 14:39:19 -0700 Subject: [PATCH] Java: Make the generics of the Options interfaces more strict (#5461) Summary: Make the generics of the Options interfaces more strict so they are usable in a Kotlin Multiplatform expect/actual typealias implementation without causing a Violation of Finite Bound Restriction. This fix would enable the creation of a generic Kotlin multiplatform library by just typealiasing the JVM implementation to the current Java implementation. Pull Request resolved: https://github.com/facebook/rocksdb/pull/5461 Differential Revision: D15903288 Pulled By: sagar0 fbshipit-source-id: 75e83fdf5d2fcede40744a17e767563d6a4b0696 --- .../java/org/rocksdb/AdvancedColumnFamilyOptionsInterface.java | 2 +- .../rocksdb/AdvancedMutableColumnFamilyOptionsInterface.java | 2 +- .../src/main/java/org/rocksdb/ColumnFamilyOptionsInterface.java | 2 +- java/src/main/java/org/rocksdb/DBOptionsInterface.java | 2 +- .../java/org/rocksdb/MutableColumnFamilyOptionsInterface.java | 2 +- java/src/main/java/org/rocksdb/MutableDBOptionsInterface.java | 2 +- java/src/main/java/org/rocksdb/Options.java | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/java/src/main/java/org/rocksdb/AdvancedColumnFamilyOptionsInterface.java b/java/src/main/java/org/rocksdb/AdvancedColumnFamilyOptionsInterface.java index ac8550f3ef..532db47340 100644 --- a/java/src/main/java/org/rocksdb/AdvancedColumnFamilyOptionsInterface.java +++ b/java/src/main/java/org/rocksdb/AdvancedColumnFamilyOptionsInterface.java @@ -14,7 +14,7 @@ import java.util.List; * Taken from include/rocksdb/advanced_options.h */ public interface AdvancedColumnFamilyOptionsInterface - { + > { /** * The minimum number of write buffers that will be merged together diff --git a/java/src/main/java/org/rocksdb/AdvancedMutableColumnFamilyOptionsInterface.java b/java/src/main/java/org/rocksdb/AdvancedMutableColumnFamilyOptionsInterface.java index 3ec4671238..64a6f9dccc 100644 --- a/java/src/main/java/org/rocksdb/AdvancedMutableColumnFamilyOptionsInterface.java +++ b/java/src/main/java/org/rocksdb/AdvancedMutableColumnFamilyOptionsInterface.java @@ -12,7 +12,7 @@ package org.rocksdb; * and MutableCFOptions in util/cf_options.h */ public interface AdvancedMutableColumnFamilyOptionsInterface - { + > { /** * The maximum number of write buffers that are built up in memory. diff --git a/java/src/main/java/org/rocksdb/ColumnFamilyOptionsInterface.java b/java/src/main/java/org/rocksdb/ColumnFamilyOptionsInterface.java index f88a21af2b..3c8cd5d518 100644 --- a/java/src/main/java/org/rocksdb/ColumnFamilyOptionsInterface.java +++ b/java/src/main/java/org/rocksdb/ColumnFamilyOptionsInterface.java @@ -6,7 +6,7 @@ package org.rocksdb; public interface ColumnFamilyOptionsInterface - + > extends AdvancedColumnFamilyOptionsInterface { /** diff --git a/java/src/main/java/org/rocksdb/DBOptionsInterface.java b/java/src/main/java/org/rocksdb/DBOptionsInterface.java index af9aa179bf..611f4f5da7 100644 --- a/java/src/main/java/org/rocksdb/DBOptionsInterface.java +++ b/java/src/main/java/org/rocksdb/DBOptionsInterface.java @@ -8,7 +8,7 @@ package org.rocksdb; import java.util.Collection; import java.util.List; -public interface DBOptionsInterface { +public interface DBOptionsInterface> { /** * Use this if your DB is very small (like under 1GB) and you don't want to diff --git a/java/src/main/java/org/rocksdb/MutableColumnFamilyOptionsInterface.java b/java/src/main/java/org/rocksdb/MutableColumnFamilyOptionsInterface.java index c2efcc54b6..4f4749646f 100644 --- a/java/src/main/java/org/rocksdb/MutableColumnFamilyOptionsInterface.java +++ b/java/src/main/java/org/rocksdb/MutableColumnFamilyOptionsInterface.java @@ -6,7 +6,7 @@ package org.rocksdb; public interface MutableColumnFamilyOptionsInterface - + > extends AdvancedMutableColumnFamilyOptionsInterface { /** diff --git a/java/src/main/java/org/rocksdb/MutableDBOptionsInterface.java b/java/src/main/java/org/rocksdb/MutableDBOptionsInterface.java index 1715d69d09..00087a43ca 100644 --- a/java/src/main/java/org/rocksdb/MutableDBOptionsInterface.java +++ b/java/src/main/java/org/rocksdb/MutableDBOptionsInterface.java @@ -1,7 +1,7 @@ // Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. package org.rocksdb; -public interface MutableDBOptionsInterface { +public interface MutableDBOptionsInterface> { /** * Specifies the maximum number of concurrent background jobs (both flushes diff --git a/java/src/main/java/org/rocksdb/Options.java b/java/src/main/java/org/rocksdb/Options.java index 5831b1e298..bb3c87aefd 100644 --- a/java/src/main/java/org/rocksdb/Options.java +++ b/java/src/main/java/org/rocksdb/Options.java @@ -16,7 +16,7 @@ import java.util.List; * during the creation of a {@link org.rocksdb.RocksDB} (i.e., RocksDB.open()). * * If {@link #dispose()} function is not called, then it will be GC'd - * automaticallyand native resources will be released as part of the process. + * automatically and native resources will be released as part of the process. */ public class Options extends RocksObject implements DBOptionsInterface,