I have a data adapter with the following code inside.
Code:
public class SecuritiesDataAdapter implements SmartDataProvider
{
...
public boolean isSnapshotAvailable(String itemName)
throws SubscriptionException {
return true;
}
...
}
------------------------------------------------------------------------------------------------
In the GWT client I have the following code:
Code:
jsonEntries = "xxx yyy zzz" //This is framed automatically based on his subscribed items.
$wnd.pushtable_messages = new $wnd.NonVisualTable(jsonEntries.split(" "), new Array("instancesAndSecurities"), "DISTINCT");
$wnd.pushtable_messages.setSnapshotRequired(true);
$wnd.pushtable_messages.onItemUpdate = function (pos, updateInfo, itemName) {
var val = updateInfo.getNewValue("instancesAndSecurities");
$wnd.jsonUpdatedStaticJS(val);}
$wnd.page.addTable($wnd.pushtable_messages, "instancesAndSecuritiesTable");
------------------------------------------------------------------------------------------------
Apart from this, I have a feed that is coming from our internal server to LS for all the subscribed items.
Query:
Client 1 logs in and subscribes to item "xxx" and he gets feed every 10 seconds with Snapshot set to true
Client 2 logs in and subscribes to the same item "xxx".
My understanding is, if Snapshot is set to true, as soon as Client 2 logs in and subscribes to item xxx, he will get the last available feed that has got updated for client 1. After 10 seconds, both client 1 and client 2 will get the next feed.
If my understanding is correct, I am not able to receive the feed in client 2 immediately. It is coming only after 10 seconds. What might be the issue?
Bookmarks