Class SyncPersistence
- java.lang.Object
-
- org.torproject.metrics.collector.sync.SyncPersistence
-
public class SyncPersistence extends java.lang.Object
Provides 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 void
cleanDirectory()
Cleans the directory inRecentPath
after storing descriptors.void
storeDesc(org.torproject.descriptor.Descriptor desc, long received)
Stores a descriptor in main storage and recent.void
storeDescs(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 inRecentPath
after 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
' optionsOutputPath
andRecentPath
.
-
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
' optionsOutputPath
andRecentPath
.
-
-