Package org.lmdbjava

Class Env.Builder<T>

  • Type Parameters:
    T - buffer type
    Enclosing class:
    Env<T>

    public static final class Env.Builder<T>
    extends Object
    Builder for configuring and opening Env.
    • Method Detail

      • open

        public Env<T> open​(File path,
                           int mode,
                           EnvFlags... flags)
        Opens the environment.
        Parameters:
        path - file system destination
        mode - Unix permissions to set on created files and semaphores
        flags - the flags for this new environment
        Returns:
        an environment ready for use
      • open

        public Env<T> open​(File path,
                           EnvFlags... flags)
        Opens the environment with 0664 mode.
        Parameters:
        path - file system destination
        flags - the flags for this new environment
        Returns:
        an environment ready for use
      • setMapSize

        public Env.Builder<T> setMapSize​(long mapSize)
        Sets the map size.
        Parameters:
        mapSize - new limit in bytes
        Returns:
        the builder
      • setMaxDbs

        public Env.Builder<T> setMaxDbs​(int dbs)
        Sets the maximum number of databases (ie Dbis permitted.
        Parameters:
        dbs - new limit
        Returns:
        the builder
      • setMaxReaders

        public Env.Builder<T> setMaxReaders​(int readers)
        Sets the maximum number of databases permitted.
        Parameters:
        readers - new limit
        Returns:
        the builder