Interface PersistentMapBuilder<K,​V>


  • public interface PersistentMapBuilder<K,​V>
    The interface for a persistent map builder for use with mapDB.
    • Method Detail

      • withName

        PersistentMapBuilder<K,​V> withName​(java.lang.String name)
        Sets the name of this map.
        Parameters:
        name - the string name of this map
        Returns:
        a persistent map builder with the name option now set
      • withSerializer

        PersistentMapBuilder<K,​V> withSerializer​(Serializer serializer)
        Sets the key serializer to be used to serialize this map, this is a required parameter.
        Parameters:
        serializer - the serializer to be used for keys
        Returns:
        a persistent map builder with the key serializer set
      • build

        java.util.Map<K,​V> build()
        Validates the map settings and then builds this map in the database. Throws an exception if invalid settings are found.
        Returns:
        The map that was created