mirror of https://github.com/facebook/rocksdb.git
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:
parent
24b118ad98
commit
5830c619d5
|
@ -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
|
||||||
|
|
|
@ -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.
|
||||||
|
|
|
@ -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> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -16,7 +16,7 @@ import java.util.List;
|
||||||
* during the creation of a {@link org.rocksdb.RocksDB} (i.e., RocksDB.open()).
|
* 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
|
* 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
|
public class Options extends RocksObject
|
||||||
implements DBOptionsInterface<Options>,
|
implements DBOptionsInterface<Options>,
|
||||||
|
|
Loading…
Reference in New Issue