private void notifyCaches(NotificationContext context, ChangeType changeType) { if (context == null || context.getType() != Type.CALLBACK) { _cache.requireFullRefresh(); _taskCache.requireFullRefresh(); } else { _cache.notifyDataChange(changeType, context.getPathChanged()); _taskCache.notifyDataChange(changeType, context.getPathChanged()); } }
private void notifyCaches(NotificationContext context, ChangeType changeType) { if (context == null || context.getType() != Type.CALLBACK) { _cache.requireFullRefresh(); _taskCache.requireFullRefresh(); } else { _cache.notifyDataChange(changeType, context.getPathChanged()); _taskCache.notifyDataChange(changeType, context.getPathChanged()); } }
public void queueEvent(NotificationContext context, ClusterEventType eventType, HelixConstants.ChangeType changeType) { ClusterEvent event = new ClusterEvent(_clusterName, eventType); if (context == null || context.getType() != NotificationContext.Type.CALLBACK || context.getType() == NotificationContext.Type.PERIODIC_REFRESH) { _dataCache.requireFullRefresh(); } else { _dataCache.notifyDataChange(changeType, context.getPathChanged()); } // Null check for manager in the following line is done in handleEvent() event.addAttribute(AttributeName.helixmanager.name(), context.getManager()); event.addAttribute(AttributeName.changeContext.name(), context); queueEvent(event); _monitor.increaseCallbackCounters(_eventQueue.size()); } }
public void queueEvent(NotificationContext context, ClusterEventType eventType, HelixConstants.ChangeType changeType) { ClusterEvent event = new ClusterEvent(_clusterName, eventType); if (context == null || context.getType() != NotificationContext.Type.CALLBACK || context.getType() == NotificationContext.Type.PERIODIC_REFRESH) { _dataCache.requireFullRefresh(); } else { _dataCache.notifyDataChange(changeType, context.getPathChanged()); } // Null check for manager in the following line is done in handleEvent() event.addAttribute(AttributeName.helixmanager.name(), context.getManager()); event.addAttribute(AttributeName.changeContext.name(), context); queueEvent(event); _monitor.increaseCallbackCounters(_eventQueue.size()); } }