T - public interface Ranking<T>
getSize() positions,
the longer queries displace shorter queries when ranking reaches it max size.| Modifier and Type | Method and Description |
|---|---|
static RankingBuilder |
builder(int size)
Creates new instance of
RankingBuilder |
List<Position> |
getPositionsInDescendingOrder()
Returns the top of queries in descend order, slowest query will be at first place.
|
int |
getSize() |
void |
update(long weight,
T identity)
Updates the ranking positions.
|
static RankingBuilder builder(int size)
RankingBuildersize - maximum count of positions in the rankingRankingBuildervoid update(long weight,
T identity)
weight - the weight of queryidentity - the identity by which one query can be distinguished from another.List<Position> getPositionsInDescendingOrder()
getSize() if not enough count of quires were recorded.int getSize()
Copyright © 2020. All rights reserved.