public class PersistSybil extends Object
| Constructor and Description |
|---|
PersistSybil(I2PAppContext ctx)
access via Analysis.getPersister()
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
delete(long date)
Delete the file for a particular date
|
void |
deleteBlocklistFile()
Delete the blocklist
|
File |
getBlocklistFile()
Get the blocklist path
|
List<Long> |
load()
The list of stored analysis sets, as a time stamp.
|
Map<Long,Points> |
load(Hash h)
Load all the analysis for a certain hash.
|
Map<Hash,Points> |
load(long date)
Load the analysis for a certain date.
|
(package private) Map<String,Long> |
readBlocklist()
Read the blocklist
|
void |
removeOld()
Remove all files older than configured threshold
Inline for now, thread later if necessary
|
void |
store(long date,
Map<Hash,Points> entries)
Store each entry.
|
(package private) void |
storeBlocklist(Set<String> blocks,
long blockUntil)
Write the blocklist.
|
public PersistSybil(I2PAppContext ctx)
public boolean delete(long date)
public void deleteBlocklistFile()
public File getBlocklistFile()
public List<Long> load()
public Map<Long,Points> load(Hash h) throws IOException
IOExceptionpublic Map<Hash,Points> load(long date) throws IOException
IOExceptionMap<String,Long> readBlocklist()
public void removeOld()
public void store(long date,
Map<Hash,Points> entries)
throws IOException
entries - each one should be "entry" at the rootIOExceptionvoid storeBlocklist(Set<String> blocks, long blockUntil)
blocks - non-empty, will be merged with existing entries