-
September 18th, 2017, 09:01 AM
#1
The code shown is still internal to your Data Adapter and does not reference anything in Lightstreamer Adapter interface.
I mean that SubscriptionInfo, subscribedItems, and onDelete are still defined in your code.
So, it is difficult for us to devise any needed change.
This is furtherly complicated by the fact that the code is inspired in part to our StockQuotesDataAdapter.java code sample (which defines SubscriptionInfo and subscribedItems) and in part by the PortfolioDataAdapter.java code sample (which defines onDelete).
Anyway, if you manage to invoke onDelete and the implementation of onDelete is the one included in our PortfolioDataAdapter.java, this should correctly send the DELETE command.
However, we didn't see that reported in the log.
So, please debug your Adapter to ensure that
- onDelete is invoked,
- onDelete invokes listener.smartUpdate with the correct parameters,
- after the invocation, the Server logs the update as expected (on LightstreamerLogger.subscriptions at DEBUG level).
If you dump the parameters upon the invocation of listener.smartUpdate, together with the current time, we can help you in comparing those with the log.
-
September 28th, 2017, 01:08 PM
#2
Hi,
I have updated code to clear snapshot while I delete the stock the below code will execute. After I cleared the snapshot still the deleted commodity displaying in client screen. Is there any other storage available in LS.
public void clearStatus() {
synchronized (subscribedItems) {
Set<String> keys = subscribedItems.keySet();
for (String itemName : keys) {
listener.clearSnapshot(itemName);
}
}
}
@Override
public void onDeleteStatus(String itemName) {
SubscriptionInfo si;
synchronized (subscribedItems) {
si = new SubscriptionInfo(new Boolean(false), new Boolean(true));
subscribedItems.remove(itemName, si);
onDelete(this.handle, itemName);
clearStatus();
}
}
-
September 29th, 2017, 11:40 AM
#3
Hi rvkvino,
I am not sure that the piece of code you posted, can work since the clearStatus method is called after the itemName is removed from the subscribedItems map.
Maybe there is some confusion between the COMMAND table keys and the ItemName representing the whole table.
While DELETE commands are executed on individual row keys, clearStatus must specify the name of the Item of entire table, the one you received with subscribe call.
Regards,
Giuseppe
Similar Threads
-
By Alessandro in forum Adapter SDKs
Replies: 4
Last Post: October 24th, 2011, 09:33 AM
-
By ganeshk in forum Adapter SDKs
Replies: 1
Last Post: September 22nd, 2010, 06:52 PM
-
By sjohn in forum Adapter SDKs
Replies: 3
Last Post: January 7th, 2010, 08:57 AM
-
By niravmehta2009 in forum General
Replies: 4
Last Post: January 3rd, 2010, 08:03 AM
-
By mnenchev in forum General
Replies: 3
Last Post: August 10th, 2009, 03:22 PM
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
All times are GMT +1. The time now is 11:28 AM.
Bookmarks