Class CachedFileMap<K,​V>

  • Type Parameters:
    K -
    V -
    All Implemented Interfaces:
    FileMap<K,​V>, Map<K,​V>

    public class CachedFileMap<K,​V>
    extends AbstractFileMap<K,​V>
    This thread safe hash map is stored both in memory and on disk. Each insertion/update/removal is saved to the file in a readable JSON format. This offers high throughput, together with crash-safe file persistence. Note that the file works like a log and old entries are not "removed". They will only be overridden. This means that the file only grows.
    Author:
    dagnelies