Interface ServerStatisticsStorage
-
- All Known Implementing Classes:
ServerStatisticsStorageImpl
public interface ServerStatisticsStorage
Created by Andrey Titov on 1/30/17.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ServerStatisticsStorage.Key
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
publish(ServerStatisticsStorage.Key key, long value, long timestamp)
Persists a value to the storageList<Pair<Long,Long>>
retrieve(ServerStatisticsStorage.Key key, long since, long till)
Retrieves all values published in provided time range
-
-
-
Method Detail
-
publish
void publish(@NotNull ServerStatisticsStorage.Key key, long value, long timestamp)
Persists a value to the storage- Parameters:
key
- key of this valuevalue
- value to persisttimestamp
- timestamp to persist
-
retrieve
@NotNull List<Pair<Long,Long>> retrieve(@NotNull ServerStatisticsStorage.Key key, long since, long till)
Retrieves all values published in provided time range- Parameters:
key
- key of these valuessince
- start of the time rangetill
- end of the time range- Returns:
- list of pairs {value,timestamp}
-
-