Package org.rocksdb
Class AbstractMutableOptions.AbstractMutableOptionsBuilder<T extends AbstractMutableOptions,U extends AbstractMutableOptions.AbstractMutableOptionsBuilder<T,U,K>,K extends MutableOptionKey>
- java.lang.Object
-
- org.rocksdb.AbstractMutableOptions.AbstractMutableOptionsBuilder<T,U,K>
-
- Direct Known Subclasses:
MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder,MutableDBOptions.MutableDBOptionsBuilder
- Enclosing class:
- AbstractMutableOptions
public abstract static class AbstractMutableOptions.AbstractMutableOptionsBuilder<T extends AbstractMutableOptions,U extends AbstractMutableOptions.AbstractMutableOptionsBuilder<T,U,K>,K extends MutableOptionKey> extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description AbstractMutableOptionsBuilder()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract java.util.Map<java.lang.String,K>allKeys()Get all of the possible keysTbuild()protected abstract Tbuild(java.lang.String[] keys, java.lang.String[] values)Construct a sub-class instance ofAbstractMutableOptions.protected UfromParsed(java.util.List<org.rocksdb.OptionString.Entry> options, boolean ignoreUnknown)Constructs a builder for mutable column family options from a hierarchical parsed options string representation.protected booleangetBoolean(K key)protected doublegetDouble(K key)protected <N extends java.lang.Enum<N>>
NgetEnum(K key)protected intgetInt(K key)protected int[]getIntArray(K key)protected longgetLong(K key)java.util.List<org.rocksdb.OptionString.Entry>getUnknown()protected abstract Uself()protected UsetBoolean(K key, boolean value)protected UsetDouble(K key, double value)protected <N extends java.lang.Enum<N>>
UsetEnum(K key, N value)protected UsetInt(K key, int value)protected UsetIntArray(K key, int[] value)protected UsetLong(K key, long value)
-
-
-
Method Detail
-
self
protected abstract U self()
-
allKeys
protected abstract java.util.Map<java.lang.String,K> allKeys()
Get all of the possible keys- Returns:
- A map of all keys, indexed by name.
-
build
protected abstract T build(java.lang.String[] keys, java.lang.String[] values)
Construct a sub-class instance ofAbstractMutableOptions.- Parameters:
keys- the keysvalues- the values- Returns:
- an instance of the options.
-
build
public T build()
-
getDouble
protected double getDouble(K key) throws java.util.NoSuchElementException, java.lang.NumberFormatException
- Throws:
java.util.NoSuchElementExceptionjava.lang.NumberFormatException
-
getLong
protected long getLong(K key) throws java.util.NoSuchElementException, java.lang.NumberFormatException
- Throws:
java.util.NoSuchElementExceptionjava.lang.NumberFormatException
-
getInt
protected int getInt(K key) throws java.util.NoSuchElementException, java.lang.NumberFormatException
- Throws:
java.util.NoSuchElementExceptionjava.lang.NumberFormatException
-
getBoolean
protected boolean getBoolean(K key) throws java.util.NoSuchElementException, java.lang.NumberFormatException
- Throws:
java.util.NoSuchElementExceptionjava.lang.NumberFormatException
-
getIntArray
protected int[] getIntArray(K key) throws java.util.NoSuchElementException, java.lang.NumberFormatException
- Throws:
java.util.NoSuchElementExceptionjava.lang.NumberFormatException
-
getEnum
protected <N extends java.lang.Enum<N>> N getEnum(K key) throws java.util.NoSuchElementException, java.lang.NumberFormatException
- Throws:
java.util.NoSuchElementExceptionjava.lang.NumberFormatException
-
fromParsed
protected U fromParsed(java.util.List<org.rocksdb.OptionString.Entry> options, boolean ignoreUnknown)
Constructs a builder for mutable column family options from a hierarchical parsed options string representation. TheOptionString.Parserclass output has been used to create a (name,value)-list; each value may be either a simple string or a (name, value)-list in turn.- Parameters:
options- a list of parsed option string objectsignoreUnknown- what to do if the key is not one of the keys we expect- Returns:
- a builder with the values from the parsed input set
- Throws:
java.lang.IllegalArgumentException- if an option value is of the wrong type, or a key is empty
-
getUnknown
public java.util.List<org.rocksdb.OptionString.Entry> getUnknown()
- Returns:
- the list of keys encountered which were not known to the type being generated
-
-