Package org.rocksdb

Class AbstractMutableOptions.AbstractMutableOptionsBuilder<T extends AbstractMutableOptions,​U extends AbstractMutableOptions.AbstractMutableOptionsBuilder<T,​U,​K>,​K extends MutableOptionKey>

    • 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 keys
      T build()  
      protected abstract T build​(java.lang.String[] keys, java.lang.String[] values)
      Construct a sub-class instance of AbstractMutableOptions.
      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.
      protected boolean getBoolean​(K key)  
      protected double getDouble​(K key)  
      protected <N extends java.lang.Enum<N>>
      N
      getEnum​(K key)  
      protected int getInt​(K key)  
      protected int[] getIntArray​(K key)  
      protected long getLong​(K key)  
      java.util.List<org.rocksdb.OptionString.Entry> getUnknown()  
      protected abstract U self()  
      protected U setBoolean​(K key, boolean value)  
      protected U setDouble​(K key, double value)  
      protected <N extends java.lang.Enum<N>>
      U
      setEnum​(K key, N value)  
      protected U setInt​(K key, int value)  
      protected U setIntArray​(K key, int[] value)  
      protected U setLong​(K key, long value)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractMutableOptionsBuilder

        public AbstractMutableOptionsBuilder()
    • 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 of AbstractMutableOptions.
        Parameters:
        keys - the keys
        values - the values
        Returns:
        an instance of the options.
      • build

        public T build()
      • setDouble

        protected U setDouble​(K key,
                              double value)
      • getDouble

        protected double getDouble​(K key)
                            throws java.util.NoSuchElementException,
                                   java.lang.NumberFormatException
        Throws:
        java.util.NoSuchElementException
        java.lang.NumberFormatException
      • setLong

        protected U setLong​(K key,
                            long value)
      • getLong

        protected long getLong​(K key)
                        throws java.util.NoSuchElementException,
                               java.lang.NumberFormatException
        Throws:
        java.util.NoSuchElementException
        java.lang.NumberFormatException
      • setInt

        protected U setInt​(K key,
                           int value)
      • getInt

        protected int getInt​(K key)
                      throws java.util.NoSuchElementException,
                             java.lang.NumberFormatException
        Throws:
        java.util.NoSuchElementException
        java.lang.NumberFormatException
      • setBoolean

        protected U setBoolean​(K key,
                               boolean value)
      • getBoolean

        protected boolean getBoolean​(K key)
                              throws java.util.NoSuchElementException,
                                     java.lang.NumberFormatException
        Throws:
        java.util.NoSuchElementException
        java.lang.NumberFormatException
      • setIntArray

        protected U setIntArray​(K key,
                                int[] value)
      • getIntArray

        protected int[] getIntArray​(K key)
                             throws java.util.NoSuchElementException,
                                    java.lang.NumberFormatException
        Throws:
        java.util.NoSuchElementException
        java.lang.NumberFormatException
      • setEnum

        protected <N extends java.lang.Enum<N>> U setEnum​(K key,
                                                          N value)
      • getEnum

        protected <N extends java.lang.Enum<N>> N getEnum​(K key)
                                                   throws java.util.NoSuchElementException,
                                                          java.lang.NumberFormatException
        Throws:
        java.util.NoSuchElementException
        java.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. The OptionString.Parser class 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 objects
        ignoreUnknown - 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