public class Parser
extends java.lang.Object
Constructor and Description |
---|
Parser(java.io.File[] inDirectories,
java.io.File statusDirectory,
DocumentStore<ReportedHidServStats> reportedHidServStatsStore,
DocumentStore<ComputedNetworkFractions> computedNetworkFractionsStore)
Initializes a new parser object using the given directories and
document stores.
|
Modifier and Type | Method and Description |
---|---|
boolean |
parseDescriptors()
Instructs the descriptor reader to parse descriptor files, and
handles the resulting parsed descriptors if they are either
extra-info descriptors or consensuses.
|
boolean |
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.
|
public Parser(java.io.File[] inDirectories, java.io.File statusDirectory, DocumentStore<ReportedHidServStats> reportedHidServStatsStore, DocumentStore<ComputedNetworkFractions> computedNetworkFractionsStore)
public void readParseHistory()
public void writeParseHistory()
public boolean parseDescriptors()
public boolean parseRelayNetworkStatusConsensus(org.torproject.descriptor.RelayNetworkStatusConsensus consensus)