Class TimeWindowLeaderboardWindowUpdate
- java.lang.Object
-
- com.apple.foundationdb.record.provider.foundationdb.IndexOperation
-
- com.apple.foundationdb.record.provider.foundationdb.leaderboard.TimeWindowLeaderboardWindowUpdate
-
@API(EXPERIMENTAL) public class TimeWindowLeaderboardWindowUpdate extends IndexOperation
Maintain active set of time windows.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TimeWindowLeaderboardWindowUpdate.Rebuild
When to completely rebuild an index.static class
TimeWindowLeaderboardWindowUpdate.TimeWindowSpec
A specification of a set of sliding time windows.
-
Constructor Summary
Constructors Constructor Description TimeWindowLeaderboardWindowUpdate(long updateTimestamp, boolean highScoreFirst, long deleteBefore, boolean allTime, Iterable<TimeWindowLeaderboardWindowUpdate.TimeWindowSpec> specs, int nlevels, TimeWindowLeaderboardWindowUpdate.Rebuild rebuild)
Create a time window update operation.TimeWindowLeaderboardWindowUpdate(long updateTimestamp, boolean highScoreFirst, long deleteBefore, boolean allTime, Iterable<TimeWindowLeaderboardWindowUpdate.TimeWindowSpec> specs, TimeWindowLeaderboardWindowUpdate.Rebuild rebuild)
Create a time window update operation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getDeleteBefore()
int
getNlevels()
TimeWindowLeaderboardWindowUpdate.Rebuild
getRebuild()
Iterable<TimeWindowLeaderboardWindowUpdate.TimeWindowSpec>
getSpecs()
long
getUpdateTimestamp()
boolean
isAllTime()
boolean
isHighScoreFirst()
-
-
-
Constructor Detail
-
TimeWindowLeaderboardWindowUpdate
public TimeWindowLeaderboardWindowUpdate(long updateTimestamp, boolean highScoreFirst, long deleteBefore, boolean allTime, Iterable<TimeWindowLeaderboardWindowUpdate.TimeWindowSpec> specs, int nlevels, TimeWindowLeaderboardWindowUpdate.Rebuild rebuild)
Create a time window update operation.- Parameters:
updateTimestamp
- a timestamp to be recorded if any changes are madehighScoreFirst
- iftrue
, numerically higher scores come first in the indexdeleteBefore
- delete any time windows ending at this time or beforeallTime
- include an all-time leaderboardspecs
- specifications for time windows to createnlevels
- number of skip list levels to maintainrebuild
- completely rebuild the index using the new time windows by scanning all existing records
-
TimeWindowLeaderboardWindowUpdate
public TimeWindowLeaderboardWindowUpdate(long updateTimestamp, boolean highScoreFirst, long deleteBefore, boolean allTime, Iterable<TimeWindowLeaderboardWindowUpdate.TimeWindowSpec> specs, TimeWindowLeaderboardWindowUpdate.Rebuild rebuild)
Create a time window update operation.- Parameters:
updateTimestamp
- a timestamp to be recorded if any changes are madehighScoreFirst
- iftrue
, numerically higher scores come first in the indexdeleteBefore
- delete any time windows ending at this time or beforeallTime
- include an all-time leaderboardspecs
- specifications for time windows to createrebuild
- completely rebuild the index using the new time windows by scanning all existing records
-
-
Method Detail
-
getUpdateTimestamp
public long getUpdateTimestamp()
-
isHighScoreFirst
public boolean isHighScoreFirst()
-
getDeleteBefore
public long getDeleteBefore()
-
isAllTime
public boolean isAllTime()
-
getSpecs
public Iterable<TimeWindowLeaderboardWindowUpdate.TimeWindowSpec> getSpecs()
-
getNlevels
public int getNlevels()
-
getRebuild
public TimeWindowLeaderboardWindowUpdate.Rebuild getRebuild()
-
-