Class DatabaseBuilder


  • public class DatabaseBuilder
    extends Object
    Class to create/load XMDB databases
    • Constructor Detail

      • DatabaseBuilder

        public DatabaseBuilder()
    • Method Detail

      • setCacheNodeSizeRead

        public DatabaseBuilder setCacheNodeSizeRead​(int cacheNodeSizeRead)
        Set read node cache size (in nodes count)
        Parameters:
        cacheNodeSizeRead - read node cache size
        Returns:
        current object to chaining
      • setCacheNodeSizeWrite

        public DatabaseBuilder setCacheNodeSizeWrite​(int cacheNodeSizeWrite)
        Set write node cache size (in nodes count)
        Parameters:
        cacheNodeSizeWrite - write node cache size
        Returns:
        current object to chaining
      • setCacheValueSize

        public DatabaseBuilder setCacheValueSize​(int cacheValueSize)
        Set value cache size (in element count)
        Parameters:
        cacheValueSize - value cache size
        Returns:
        current object to chaining
      • setFilename

        public DatabaseBuilder setFilename​(String filename)
        Set database location in fs
        Parameters:
        filename - database location in fs
        Returns:
        current object to chaining
      • setLazySync

        public DatabaseBuilder setLazySync​(boolean lazySync)
        Set lazy sync mode (don't sync after each index list modification)
        Parameters:
        lazySync - lazy sync flag
        Returns:
        current object to chaining
      • setOpenTest

        public DatabaseBuilder setOpenTest​(boolean openTest)
        Set strict open test mode
        Parameters:
        openTest - strict open test flag
        Returns:
        current object to chaining
      • setThreadSafe

        public DatabaseBuilder setThreadSafe​(boolean threadSafe)
        Set thread safe flag to database
        Parameters:
        threadSafe - thread safe flag
        Returns:
        current object to chaining
      • setInMemory

        public DatabaseBuilder setInMemory​(boolean inMemory)
        Set inMemory flag (fit db completelly in memory)
        Parameters:
        inMemory -
        Returns:
        current object to chaining
      • setObjectBatchBS

        public DatabaseBuilder setObjectBatchBS​(int objectBatchBS)
        Set block size to batch object writing
        Parameters:
        objectBatchBS -
        Returns:
        current object to chaining
      • buildDatabase

        public Database buildDatabase()
        Load or create database with current database builder state parameters
        Returns:
        database