public class UserInTokenContainerTrackerDefaultService<T extends Token<T>,U extends User,TC extends TokenContainer<T>> extends Object implements UserInTokenContainerTrackerService<T,U,TC>
UserInTokenContainerTrackerService
Modifier and Type | Field and Description |
---|---|
protected StoreMap<String,List<T>> |
tokensMap |
Constructor and Description |
---|
UserInTokenContainerTrackerDefaultService() |
UserInTokenContainerTrackerDefaultService(StoreMap<String,List<T>> tokensMap) |
Modifier and Type | Method and Description |
---|---|
void |
add(T token,
U user,
TC container)
Add (Associate E to Token), in
TokenContainer |
protected String |
calcKey(U user,
TC container)
Calculate key
|
void |
clear()
Clear All
|
void |
clear(TC container)
Clear all keys related to a
TokenContainer |
void |
clear(U user) |
void |
clear(U user,
TC container) |
List<T> |
get(U user)
Get user added across
TokenContainer s |
List<T> |
get(U user,
TC container)
For e in
TokenContainer fetch any existing Token(s) |
protected boolean |
isKeyFor(String key,
TC container) |
protected boolean |
isKeyFor(String key,
U user) |
protected boolean |
isKeyFor(String key,
U user,
TC container) |
boolean |
replace(T token,
U user,
TC container)
Replace (Associate E to Token), in
TokenContainer |
public UserInTokenContainerTrackerDefaultService()
protected String calcKey(U user, TC container)
user
- as U, cannot be nullcontainer
- as TokenContainer
, can be nullpublic void add(T token, U user, TC container)
UserInTokenContainerTrackerService
TokenContainer
public boolean replace(T token, U user, TC container)
UserInTokenContainerTrackerService
TokenContainer
replace
in interface UserInTokenContainerTrackerService<T extends Token<T>,U extends User,TC extends TokenContainer<T>>
token
- as T to replceuser
- as User
container
- as TCpublic List<T> get(U user, TC container)
UserInTokenContainerTrackerService
TokenContainer
fetch any existing Token(s)public List<T> get(U user)
UserInTokenContainerTrackerService
TokenContainer
spublic void clear(U user)
clear
in interface UserInTokenContainerTrackerService<T extends Token<T>,U extends User,TC extends TokenContainer<T>>
public void clear(U user, TC container)
clear
in interface UserInTokenContainerTrackerService<T extends Token<T>,U extends User,TC extends TokenContainer<T>>
public void clear(TC container)
UserInTokenContainerTrackerService
TokenContainer
clear
in interface UserInTokenContainerTrackerService<T extends Token<T>,U extends User,TC extends TokenContainer<T>>
public void clear()
UserInTokenContainerTrackerService
clear
in interface UserInTokenContainerTrackerService<T extends Token<T>,U extends User,TC extends TokenContainer<T>>
Copyright © 2018. All rights reserved.