Class MapLoader<K,​V,​KM extends net.openhft.chronicle.hash.serialization.BytesReader<K> & net.openhft.chronicle.hash.serialization.BytesWriter<K>,​VM extends net.openhft.chronicle.hash.serialization.SizedReader<V> & net.openhft.chronicle.hash.serialization.SizedWriter<V>>


  • public class MapLoader<K,​V,​KM extends net.openhft.chronicle.hash.serialization.BytesReader<K> & net.openhft.chronicle.hash.serialization.BytesWriter<K>,​VM extends net.openhft.chronicle.hash.serialization.SizedReader<V> & net.openhft.chronicle.hash.serialization.SizedWriter<V>>
    extends Object
    Loader for ChronicleMap. If a file already exists at the given location, will make an attempt to load the map from the existing file. Will fall-back to an in memory representation if the file cannot be loaded (see logs).
    Author:
    Tim Schmidt ([email protected]).
    • Constructor Detail

      • MapLoader

        public MapLoader​(Class<K> keyClass,
                         Class<V> valueClass,
                         long entries,
                         double avgKeySize,
                         double avgValueSize,
                         KM keyMarshaller,
                         VM valueMarshaller,
                         boolean doPersist)
        Creates a new MapLoader
        Parameters:
        keyClass - the Key class
        valueClass - the Value class
        entries - the maximum number of entries
        avgKeySize - the average marshaled key size in bytes
        avgValueSize - the average marshaled value size in bytes
        keyMarshaller - the key codec
        valueMarshaller - the value codec
        doPersist - whether to persist the map