public class DefaultTokenNotificationTrackerService<T extends Token<T>> extends Object implements TokenNotificationTrackerService<T>
StoreMap
Modifier and Type | Field and Description |
---|---|
protected StoreMap<String,Integer> |
countMap |
Constructor and Description |
---|
DefaultTokenNotificationTrackerService() |
DefaultTokenNotificationTrackerService(StoreMap<String,Integer> countMap) |
Modifier and Type | Method and Description |
---|---|
protected String |
calcKey(T token,
FlowStatus status) |
void |
clearCount() |
void |
clearCount(Shift<T> shift) |
void |
clearCount(T token) |
int |
count(T token,
FlowStatus status)
Return the # of times a
Token has been notified. |
protected boolean |
isKeyFor(String key,
Shift<T> shift) |
protected boolean |
isKeyFor(String key,
T token) |
protected boolean |
isKeyFor(String key,
T token,
FlowStatus status) |
int |
keepCount(T token,
FlowStatus status)
Update and return latest count
|
public DefaultTokenNotificationTrackerService()
protected String calcKey(T token, FlowStatus status)
protected boolean isKeyFor(String key, T token, FlowStatus status)
public int keepCount(T token, FlowStatus status)
TokenNotificationTrackerService
keepCount
in interface TokenNotificationTrackerService<T extends Token<T>>
token
- as Token
type status
- as FlowStatus
Token
was notified. 0 or less means none.public int count(T token, FlowStatus status)
TokenNotificationTrackerService
Token
has been notified.count
in interface TokenNotificationTrackerService<T extends Token<T>>
token
- as Token
type status
- as FlowStatus
Token
was notified. 0 or less means none.public void clearCount(T token)
clearCount
in interface TokenNotificationTrackerService<T extends Token<T>>
public void clearCount(Shift<T> shift)
clearCount
in interface TokenNotificationTrackerService<T extends Token<T>>
public void clearCount()
clearCount
in interface TokenNotificationTrackerService<T extends Token<T>>
Copyright © 2018. All rights reserved.