Class SyncPersistence
- java.lang.Object
-
- org.torproject.metrics.collector.sync.SyncPersistence
-
public class SyncPersistence extends java.lang.ObjectProvides persistence for descriptors based on the descriptor type.
-
-
Constructor Summary
Constructors Constructor Description SyncPersistence(Configuration conf)Initialize with the given configuration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanDirectory()Cleans the directory inRecentPathafter storing descriptors.voidstoreDesc(org.torproject.descriptor.Descriptor desc, long received)Stores a descriptor in main storage and recent.voidstoreDescs(java.lang.Iterable<org.torproject.descriptor.Descriptor> descs, long received)Stores descriptors in main storage and recent.
-
-
-
Constructor Detail
-
SyncPersistence
public SyncPersistence(Configuration conf) throws ConfigurationException
Initialize with the given configuration.- Throws:
ConfigurationException
-
-
Method Detail
-
cleanDirectory
public void cleanDirectory()
Cleans the directory inRecentPathafter storing descriptors.
-
storeDescs
public void storeDescs(java.lang.Iterable<org.torproject.descriptor.Descriptor> descs, long received)Stores descriptors in main storage and recent. The storage locations are taken fromcollector.properties' optionsOutputPathandRecentPath.
-
storeDesc
public void storeDesc(org.torproject.descriptor.Descriptor desc, long received)Stores a descriptor in main storage and recent. The storage locations are taken fromcollector.properties' optionsOutputPathandRecentPath.
-
-