Class Parser


  • public class Parser
    extends java.lang.Object
    Parse hidden-service statistics from extra-info descriptors, compute network fractions from consensuses, and write parsed contents to document files for later use.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void parseDescriptors()
      Instructs the descriptor reader to parse descriptor files, and handles the resulting parsed descriptors if they are either extra-info descriptors or consensuses.
      void parseRelayNetworkStatusConsensus​(org.torproject.descriptor.RelayNetworkStatusConsensus consensus)
      Parses the given consensus.
      void readParseHistory()
      Reads the parse history file to avoid parsing descriptor files that have not changed since the previous execution.
      void writeParseHistory()
      Writes parsed or skipped descriptor files with last-modified times and absolute paths to the parse history file to avoid parsing these files again, unless they change until the next execution.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • readParseHistory

        public void readParseHistory()
        Reads the parse history file to avoid parsing descriptor files that have not changed since the previous execution.
      • writeParseHistory

        public void writeParseHistory()
        Writes parsed or skipped descriptor files with last-modified times and absolute paths to the parse history file to avoid parsing these files again, unless they change until the next execution.
      • parseDescriptors

        public void parseDescriptors()
        Instructs the descriptor reader to parse descriptor files, and handles the resulting parsed descriptors if they are either extra-info descriptors or consensuses.
      • parseRelayNetworkStatusConsensus

        public void parseRelayNetworkStatusConsensus​(org.torproject.descriptor.RelayNetworkStatusConsensus consensus)
        Parses the given consensus.