public class PushDataManager
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
PushDataManager.UpdateEvent
An event that tells the client what and how it should be updated
|
Constructor and Description |
---|
PushDataManager(Ticker ticker) |
Modifier and Type | Method and Description |
---|---|
void |
elementRendered(java.lang.String requestUniqueId,
BaseUpdateableElement element)
A pushed element is rendered and needs to be tracked.
|
boolean |
failover(java.lang.String originalRequestId,
java.lang.String newRequestId)
Fails a request and copies all notifications directed to it to another request.
|
PushDataManager.UpdateEvent |
getNextNotification(java.lang.String requestId)
Waits and return the next notification.
|
BaseUpdateableElement |
getRenderedElement(java.lang.String requestId,
java.lang.String id)
Returns the element's current state.
|
boolean |
keepAliveReceived(java.lang.String requestId)
A keepalive received.
|
boolean |
leaving(java.lang.String requestId)
The request leaves, so it needs to be deleted
|
void |
updateElement(java.lang.String id)
An element is updated and needs to be pushed to all requests.
|
public PushDataManager(Ticker ticker)
public void updateElement(java.lang.String id)
id
- - The id of the element that changedpublic void elementRendered(java.lang.String requestUniqueId, BaseUpdateableElement element)
requestUniqueId
- - The requestId that rendered the elementelement
- - The element that is renderedpublic BaseUpdateableElement getRenderedElement(java.lang.String requestId, java.lang.String id)
requestId
- - The requestId that needs the element.id
- - The element's idpublic boolean failover(java.lang.String originalRequestId, java.lang.String newRequestId)
originalRequestId
- - The failing leader's idnewRequestId
- - The new leader's idpublic boolean leaving(java.lang.String requestId)
requestId
- - The id of the request that is leavingpublic boolean keepAliveReceived(java.lang.String requestId)
requestId
- - The id of the request that sent the keepalivepublic PushDataManager.UpdateEvent getNextNotification(java.lang.String requestId)
requestId
- - The id of the request