Added isPending to ws dataservice
This commit is contained in:
parent
1abbeee1ae
commit
cce24ab61d
1 changed files with 5 additions and 0 deletions
|
|
@ -58,7 +58,12 @@ public class WebSocketDataService<ID, Value> {
|
||||||
logger.info("Item " + id + " pending propagation. Adding to pending register.");
|
logger.info("Item " + id + " pending propagation. Adding to pending register.");
|
||||||
return pendingRegister.putIfAbsent(id, future) == null;
|
return pendingRegister.putIfAbsent(id, future) == null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean add(ID id) {
|
public boolean add(ID id) {
|
||||||
return add(id, (_) -> {});
|
return add(id, (_) -> {});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isPending(ID id) {
|
||||||
|
return pendingRegister.containsKey(id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue