new ArrayList<NotificationListener>(dwm.getNotificationListeners()); for (NotificationListener nl : copy)
/** * Local delta doWork accepted * @param address the logical address */ public void localDeltaDoWorkAccepted(Address address) { log.tracef("LOCAL_DELTA_DOWORK_ACCEPTED(%s)", address); WorkManagerCoordinator wmc = WorkManagerCoordinator.getInstance(); DistributedWorkManager dwm = wmc.resolveDistributedWorkManager(address); if (dwm != null) { Collection<NotificationListener> copy = new ArrayList<NotificationListener>(dwm.getNotificationListeners()); for (NotificationListener nl : copy) { nl.deltaDoWorkAccepted(); } } }
/** * Local delta doWork rejected * @param address the logical address */ public void localDeltaDoWorkRejected(Address address) { log.tracef("LOCAL_DELTA_DOWORK_REJECTED(%s)", address); WorkManagerCoordinator wmc = WorkManagerCoordinator.getInstance(); DistributedWorkManager dwm = wmc.resolveDistributedWorkManager(address); if (dwm != null) { Collection<NotificationListener> copy = new ArrayList<NotificationListener>(dwm.getNotificationListeners()); for (NotificationListener nl : copy) { nl.deltaDoWorkRejected(); } } }
/** * Local delta scheduleWork rejected * @param address the logical address */ public void localDeltaScheduleWorkRejected(Address address) { log.tracef("LOCAL_DELTA_SCHEDULEWORK_REJECTED(%s)", address); WorkManagerCoordinator wmc = WorkManagerCoordinator.getInstance(); DistributedWorkManager dwm = wmc.resolveDistributedWorkManager(address); if (dwm != null) { Collection<NotificationListener> copy = new ArrayList<NotificationListener>(dwm.getNotificationListeners()); for (NotificationListener nl : copy) { nl.deltaScheduleWorkRejected(); } } }
/** * Local delta startWork accepted * @param address the logical address */ public void localDeltaStartWorkAccepted(Address address) { log.tracef("LOCAL_DELTA_STARTWORK_ACCEPTED(%s)", address); WorkManagerCoordinator wmc = WorkManagerCoordinator.getInstance(); DistributedWorkManager dwm = wmc.resolveDistributedWorkManager(address); if (dwm != null) { Collection<NotificationListener> copy = new ArrayList<NotificationListener>(dwm.getNotificationListeners()); for (NotificationListener nl : copy) { nl.deltaStartWorkAccepted(); } } }
/** * Local delta startWork rejected * @param address the logical address */ public void localDeltaStartWorkRejected(Address address) { log.tracef("LOCAL_DELTA_STARTWORK_REJECTED(%s)", address); WorkManagerCoordinator wmc = WorkManagerCoordinator.getInstance(); DistributedWorkManager dwm = wmc.resolveDistributedWorkManager(address); if (dwm != null) { Collection<NotificationListener> copy = new ArrayList<NotificationListener>(dwm.getNotificationListeners()); for (NotificationListener nl : copy) { nl.deltaStartWorkRejected(); } } }
/** * Local delta scheduleWork accepted * @param address the logical address */ public void localDeltaScheduleWorkAccepted(Address address) { log.tracef("LOCAL_DELTA_SCHEDULEWORK_ACCEPTED(%s)", address); WorkManagerCoordinator wmc = WorkManagerCoordinator.getInstance(); DistributedWorkManager dwm = wmc.resolveDistributedWorkManager(address); if (dwm != null) { Collection<NotificationListener> copy = new ArrayList<NotificationListener>(dwm.getNotificationListeners()); for (NotificationListener nl : copy) { nl.deltaScheduleWorkAccepted(); } } }
/** * Local delta work successful * @param address the logical address */ public void localDeltaWorkSuccessful(Address address) { log.tracef("LOCAL_DELTA_WORK_SUCCESSFUL(%s)", address); WorkManagerCoordinator wmc = WorkManagerCoordinator.getInstance(); DistributedWorkManager dwm = wmc.resolveDistributedWorkManager(address); if (dwm != null) { Collection<NotificationListener> copy = new ArrayList<NotificationListener>(dwm.getNotificationListeners()); for (NotificationListener nl : copy) { nl.deltaWorkSuccessful(); } } }
/** * Local delta work failed * @param address the logical address */ public void localDeltaWorkFailed(Address address) { log.tracef("LOCAL_DELTA_WORK_FAILED(%s)", address); WorkManagerCoordinator wmc = WorkManagerCoordinator.getInstance(); DistributedWorkManager dwm = wmc.resolveDistributedWorkManager(address); if (dwm != null) { Collection<NotificationListener> copy = new ArrayList<NotificationListener>(dwm.getNotificationListeners()); for (NotificationListener nl : copy) { nl.deltaWorkFailed(); } } }
/** * join * @param logicalAddress the logical address * @param physicalAddress the physical address */ public void join(Address logicalAddress, T physicalAddress) { log.tracef("JOIN(%s, %s)", logicalAddress, physicalAddress); if (!nodes.containsKey(logicalAddress)) { nodes.put(logicalAddress, physicalAddress); WorkManagerCoordinator wmc = WorkManagerCoordinator.getInstance(); DistributedWorkManager dwm = wmc.resolveDistributedWorkManager(logicalAddress); if (dwm != null) { Collection<NotificationListener> copy = new ArrayList<NotificationListener>(dwm.getNotificationListeners()); for (NotificationListener nl : copy) { nl.join(logicalAddress); } } else { WorkManagerEventQueue wmeq = WorkManagerEventQueue.getInstance(); wmeq.addEvent(new WorkManagerEvent(WorkManagerEvent.TYPE_JOIN, logicalAddress)); } } }
/** * localWorkManagerRemove * * @param address the logical address */ public void localWorkManagerRemove(Address address) { log.tracef("LOCAL_WORKMANAGER_REMOVE(%s)", address); nodes.remove(address); WorkManagerCoordinator wmc = WorkManagerCoordinator.getInstance(); DistributedWorkManager dwm = wmc.resolveDistributedWorkManager(address); if (dwm != null) { Collection<NotificationListener> copy = new ArrayList<NotificationListener>(dwm.getNotificationListeners()); for (NotificationListener nl : copy) { nl.leave(address); } } else { WorkManagerEventQueue wmeq = WorkManagerEventQueue.getInstance(); wmeq.addEvent(new WorkManagerEvent(WorkManagerEvent.TYPE_LEAVE, address)); } }
/** * localUpdateLongRunningFree * * @param logicalAddress the logical address * @param freeCount the free count */ public void localUpdateLongRunningFree(Address logicalAddress, Long freeCount) { log.tracef("LOCAL_UPDATE_LONGRUNNING_FREE(%s, %d)", logicalAddress, freeCount); WorkManagerCoordinator wmc = WorkManagerCoordinator.getInstance(); DistributedWorkManager dwm = wmc.resolveDistributedWorkManager(logicalAddress); if (dwm != null) { Collection<NotificationListener> copy = new ArrayList<NotificationListener>(dwm.getNotificationListeners()); for (NotificationListener nl : copy) { nl.updateLongRunningFree(logicalAddress, freeCount); } } else { WorkManagerEventQueue wmeq = WorkManagerEventQueue.getInstance(); wmeq.addEvent(new WorkManagerEvent(WorkManagerEvent.TYPE_UPDATE_LONG_RUNNING, logicalAddress, freeCount)); } }
/** * localUpdateShortRunningFree * * @param logicalAddress the logical address * @param freeCount the free count */ public void localUpdateShortRunningFree(Address logicalAddress, Long freeCount) { log.tracef("LOCAL_UPDATE_SHORTRUNNING_FREE(%s, %d)", logicalAddress, freeCount); WorkManagerCoordinator wmc = WorkManagerCoordinator.getInstance(); DistributedWorkManager dwm = wmc.resolveDistributedWorkManager(logicalAddress); if (dwm != null) { Collection<NotificationListener> copy = new ArrayList<NotificationListener>(dwm.getNotificationListeners()); for (NotificationListener nl : copy) { nl.updateShortRunningFree(logicalAddress, freeCount); } } else { WorkManagerEventQueue wmeq = WorkManagerEventQueue.getInstance(); wmeq.addEvent(new WorkManagerEvent(WorkManagerEvent.TYPE_UPDATE_SHORT_RUNNING, logicalAddress, freeCount)); } }
new ArrayList<NotificationListener>(dwm.getNotificationListeners()); for (NotificationListener nl : copy) new ArrayList<NotificationListener>(dwm.getNotificationListeners()); for (NotificationListener nl : copy) new ArrayList<NotificationListener>(dwm.getNotificationListeners()); for (NotificationListener nl : copy) new ArrayList<NotificationListener>(dwm.getNotificationListeners()); for (NotificationListener nl : copy)