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
This commit is contained in:
Jurriaan Mous 2019-06-19 14:39:19 -07:00 committed by Facebook Github Bot
parent 24b118ad98
commit 5830c619d5
7 changed files with 7 additions and 7 deletions

View file

@ -14,7 +14,7 @@ import java.util.List;
* Taken from include/rocksdb/advanced_options.h * Taken from include/rocksdb/advanced_options.h
*/ */
public interface AdvancedColumnFamilyOptionsInterface public interface AdvancedColumnFamilyOptionsInterface
<T extends AdvancedColumnFamilyOptionsInterface> { <T extends AdvancedColumnFamilyOptionsInterface<T>> {
/** /**
* The minimum number of write buffers that will be merged together * The minimum number of write buffers that will be merged together

View file

@ -12,7 +12,7 @@ package org.rocksdb;
* and MutableCFOptions in util/cf_options.h * and MutableCFOptions in util/cf_options.h
*/ */
public interface AdvancedMutableColumnFamilyOptionsInterface public interface AdvancedMutableColumnFamilyOptionsInterface
<T extends AdvancedMutableColumnFamilyOptionsInterface> { <T extends AdvancedMutableColumnFamilyOptionsInterface<T>> {
/** /**
* The maximum number of write buffers that are built up in memory. * The maximum number of write buffers that are built up in memory.

View file

@ -6,7 +6,7 @@
package org.rocksdb; package org.rocksdb;
public interface ColumnFamilyOptionsInterface public interface ColumnFamilyOptionsInterface
<T extends ColumnFamilyOptionsInterface> <T extends ColumnFamilyOptionsInterface<T>>
extends AdvancedColumnFamilyOptionsInterface<T> { extends AdvancedColumnFamilyOptionsInterface<T> {
/** /**

View file

@ -8,7 +8,7 @@ package org.rocksdb;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
public interface DBOptionsInterface<T extends DBOptionsInterface> { public interface DBOptionsInterface<T extends DBOptionsInterface<T>> {
/** /**
* Use this if your DB is very small (like under 1GB) and you don't want to * Use this if your DB is very small (like under 1GB) and you don't want to

View file

@ -6,7 +6,7 @@
package org.rocksdb; package org.rocksdb;
public interface MutableColumnFamilyOptionsInterface public interface MutableColumnFamilyOptionsInterface
<T extends MutableColumnFamilyOptionsInterface> <T extends MutableColumnFamilyOptionsInterface<T>>
extends AdvancedMutableColumnFamilyOptionsInterface<T> { extends AdvancedMutableColumnFamilyOptionsInterface<T> {
/** /**

View file

@ -1,7 +1,7 @@
// Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. // Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
package org.rocksdb; package org.rocksdb;
public interface MutableDBOptionsInterface<T extends MutableDBOptionsInterface> { public interface MutableDBOptionsInterface<T extends MutableDBOptionsInterface<T>> {
/** /**
* Specifies the maximum number of concurrent background jobs (both flushes * Specifies the maximum number of concurrent background jobs (both flushes