public class Blocker extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Blocker.BlockStatus |
| Constructor and Description |
|---|
Blocker(int maxUniqueValues) |
| Modifier and Type | Method and Description |
|---|---|
long |
durationToNextRelease(long currentTimeMillis,
long defaultValue) |
boolean |
isBlocked(int id) |
long |
isBlockedUntil(int id) |
int |
nextReleased(long now,
int none) |
void |
releaseBlocks(long now) |
boolean |
until(int id,
long untilTime)
set release until time for a particular id.
|
boolean |
willReleaseInWindow(long limit)
Returns true if any block will be released in the defined window.
|
public boolean until(int id,
long untilTime)
id - untilTime - public int nextReleased(long now,
int none)
public void releaseBlocks(long now)
public boolean isBlocked(int id)
public long isBlockedUntil(int id)
public boolean willReleaseInWindow(long limit)
public long durationToNextRelease(long currentTimeMillis,
long defaultValue)
Copyright © 2018. All Rights Reserved.