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.
      U fromString​(java.lang.String keyStr, java.lang.String valueStr)  
      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)  
      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
      • fromString

        public U fromString​(java.lang.String keyStr,
                            java.lang.String valueStr)
                     throws java.lang.IllegalArgumentException
        Throws:
        java.lang.IllegalArgumentException