java.lang.Object
net.i2p.i2ptunnel.access.FilterDefinitionElement
net.i2p.i2ptunnel.access.FileFilterDefinitionElement
Filter definition element that reads destination hashes from a file.
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final FileThe file of blocked destinations.private final Map<Hash, DestTracker> When each destination was last seen in the file.private longWhen the file was last loaded, 0 if never.Fields inherited from class FilterDefinitionElement
thresholdConstructor Summary
ConstructorsConstructorDescriptionFileFilterDefinitionElement(File file, Threshold threshold) Create a filter definition element that reads destinations from a file.Method Summary
All MethodsModifier and TypeMethodDescriptionvoidupdate(Map<Hash, DestTracker> map) Updates the provided map with the hash(es) of remote destinations mentioned in this element.Methods inherited from class FilterDefinitionElement
fromBase32, getThresholdModifier and TypeMethodDescriptionprotected static HashfromBase32(String b32) Utility method to create a Hash object from a .b32 string.(package private) ThresholdThe access limit applied to the destinations this element names.
Field Details
file
The file of blocked destinations.lastLoaded
When each destination was last seen in the file.lastLoading
private volatile long lastLoadingWhen the file was last loaded, 0 if never.
Constructor Details
FileFilterDefinitionElement
Method Details
update
Description copied from class:FilterDefinitionElementUpdates the provided map with the hash(es) of remote destinations mentioned in this element.- Specified by:
updatein classFilterDefinitionElement- 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