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

    Modifier and Type Method Description
    void cleanDirectory()
    Cleans the directory in RecentPath 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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • cleanDirectory

      public void cleanDirectory()
      Cleans the directory in RecentPath 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 from collector.properties' options OutputPath and RecentPath.
    • storeDesc

      public void storeDesc​(org.torproject.descriptor.Descriptor desc, long received)
      Stores a descriptor in main storage and recent. The storage locations are taken from collector.properties' options OutputPath and RecentPath.