Class LogFileMap

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,​java.util.TreeMap<java.lang.String,​java.util.TreeMap<java.time.LocalDate,​LogMetadata>>>, java.util.NavigableMap<java.lang.String,​java.util.TreeMap<java.lang.String,​java.util.TreeMap<java.time.LocalDate,​LogMetadata>>>, java.util.SortedMap<java.lang.String,​java.util.TreeMap<java.lang.String,​java.util.TreeMap<java.time.LocalDate,​LogMetadata>>>

    public class LogFileMap
    extends java.util.TreeMap<java.lang.String,​java.util.TreeMap<java.lang.String,​java.util.TreeMap<java.time.LocalDate,​LogMetadata>>>
    Processes the given path and stores metadata for log files.
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.util.AbstractMap

        java.util.AbstractMap.SimpleEntry<K extends java.lang.Object,​V extends java.lang.Object>, java.util.AbstractMap.SimpleImmutableEntry<K extends java.lang.Object,​V extends java.lang.Object>
    • Constructor Summary

      Constructors 
      Constructor Description
      LogFileMap​(java.nio.file.Path startDir)
      The map to keep track of the logfiles by virtual host, physical host, and date.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(LogMetadata metadata)
      Add log metadata to the map structure.
      java.util.stream.Stream<LogMetadata> metadataStream()
      Returns a stream of all contained log metadata.
      java.util.Optional<LogMetadata> nextDayLogFor​(LogMetadata metadata)
      Takes the given metadata and returns the LogMetadata for the entry of the next day.
      • Methods inherited from class java.util.TreeMap

        ceilingEntry, ceilingKey, clear, clone, comparator, containsKey, containsValue, descendingKeySet, descendingMap, entrySet, firstEntry, firstKey, floorEntry, floorKey, forEach, get, headMap, headMap, higherEntry, higherKey, keySet, lastEntry, lastKey, lowerEntry, lowerKey, navigableKeySet, pollFirstEntry, pollLastEntry, put, putAll, remove, replace, replace, replaceAll, size, subMap, subMap, tailMap, tailMap, values
      • Methods inherited from class java.util.AbstractMap

        equals, hashCode, isEmpty, toString
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Map

        compute, computeIfAbsent, computeIfPresent, equals, getOrDefault, hashCode, isEmpty, merge, putIfAbsent, remove
    • Constructor Detail

      • LogFileMap

        public LogFileMap​(java.nio.file.Path startDir)
        The map to keep track of the logfiles by virtual host, physical host, and date.
    • Method Detail

      • add

        public void add​(LogMetadata metadata)
        Add log metadata to the map structure.
      • nextDayLogFor

        public java.util.Optional<LogMetadata> nextDayLogFor​(LogMetadata metadata)
        Takes the given metadata and returns the LogMetadata for the entry of the next day.
      • metadataStream

        public java.util.stream.Stream<LogMetadata> metadataStream()
        Returns a stream of all contained log metadata.