Buffer changes from Interest List.

This commit is contained in:
AlgorithmX2
2014-06-10 12:16:14 -05:00
parent a73109b62e
commit d807812bc8
5 changed files with 334 additions and 246 deletions
+7 -3
View File
@@ -59,9 +59,9 @@ public class NetworkMonitor<T extends IAEStack<T>> extends MEMonitorHandler<T>
sendEvent = true;
super.postChange( diff, src );
if ( myGridCache.interests.containsKey( diff ) )
if ( myGridCache.interestManager.containsKey( diff ) )
{
Set<ItemWatcher> list = myGridCache.interests.get( diff );
Set<ItemWatcher> list = myGridCache.interestManager.get( diff );
if ( !list.isEmpty() )
{
IItemList<T> myStorageList = getStorageList();
@@ -72,9 +72,13 @@ public class NetworkMonitor<T extends IAEStack<T>> extends MEMonitorHandler<T>
fullStack = diff.copy();
fullStack.setStackSize( 0 );
}
myGridCache.interestManager.enableTransactions();
for (ItemWatcher iw : list)
iw.getHost().onStackChange( myStorageList, fullStack, diff, src, getChannel() );
myGridCache.interestManager.disableTransactions();
}
}