Class WeightsStatus
- java.lang.Object
-
- org.torproject.metrics.onionoo.docs.Document
-
- org.torproject.metrics.onionoo.docs.WeightsStatus
-
public class WeightsStatus extends Document
-
-
Constructor Summary
Constructors Constructor Description WeightsStatus()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addToHistory(long validAfterMillis, long freshUntilMillis, double[] weights)
Adds all given weights history objects that don't overlap with existing weights history objects.void
clearDirty()
void
compressHistory(long lastSeenMillis)
Compresses the history of weights objects by merging adjacent intervals, depending on how far back in the past they lie.java.util.SortedMap<long[],double[]>
getHistory()
boolean
isDirty()
void
setFromDocumentString(java.lang.String documentString)
void
setHistory(java.util.SortedMap<long[],double[]> history)
java.lang.String
toDocumentString()
-
Methods inherited from class org.torproject.metrics.onionoo.docs.Document
getDocumentString, setDocumentString
-
-
-
-
Method Detail
-
isDirty
public boolean isDirty()
-
clearDirty
public void clearDirty()
-
setHistory
public void setHistory(java.util.SortedMap<long[],double[]> history)
-
getHistory
public java.util.SortedMap<long[],double[]> getHistory()
-
setFromDocumentString
public void setFromDocumentString(java.lang.String documentString)
- Overrides:
setFromDocumentString
in classDocument
-
addToHistory
public void addToHistory(long validAfterMillis, long freshUntilMillis, double[] weights)
Adds all given weights history objects that don't overlap with existing weights history objects.
-
compressHistory
public void compressHistory(long lastSeenMillis)
Compresses the history of weights objects by merging adjacent intervals, depending on how far back in the past they lie.
-
toDocumentString
public java.lang.String toDocumentString()
- Overrides:
toDocumentString
in classDocument
-
-