java.lang.Object
net.i2p.i2ptunnel.access.FilterDefinitionElement
net.i2p.i2ptunnel.access.FileFilterDefinitionElement

class FileFilterDefinitionElementextends FilterDefinitionElement
Filter definition element that reads destination hashes from a file.
  • Field Details

    • file

      private final File file
      The file of blocked destinations.
    • lastLoaded

      private final Map<Hash, DestTracker> lastLoaded
      When each destination was last seen in the file.
    • lastLoading

      private volatile long lastLoading
      When the file was last loaded, 0 if never.
  • Constructor Details

    • FileFilterDefinitionElement

      FileFilterDefinitionElement(File file, Threshold threshold)
      Create a filter definition element that reads destinations from a file.
      Parameters:
      file - file to read the remote destinations from
      threshold - threshold to apply to all those destinations
  • Method Details

    • update

      public void update(Map<Hash, DestTracker> map) throws IOException
      Description copied from class: FilterDefinitionElement
      Updates the provided map with the hash(es) of remote destinations mentioned in this element.
      Specified by:
      update in class FilterDefinitionElement
      Parameters:
      map - the destination-to-tracker map the discovered hashes are added to
      Throws:
      IOException - if the destinations this element names cannot be read, as when a file-backed element cannot be opened