/** * Updates the load factor of this node compared to other nodes registered with the {@link CommandRouter}. * * @param loadFactor the new load factor of this node */ public void updateLoadFactor(int loadFactor) { this.loadFactor = loadFactor; commandRouter.updateMembership(loadFactor, commandFilter.get()); }
private void updateFilter(CommandMessageFilter newFilter) { if (!commandFilter.getAndSet(newFilter).equals(newFilter)) { commandRouter.updateMembership(loadFactor, newFilter); } }
/** * Updates the load factor of this node compared to other nodes registered with the {@link CommandRouter}. * * @param loadFactor the new load factor of this node */ public void updateLoadFactor(int loadFactor) { this.loadFactor = loadFactor; commandRouter.updateMembership(loadFactor, commandFilter.get()); }
/** * Updates the load factor of this node compared to other nodes registered with the {@link CommandRouter}. * * @param loadFactor the new load factor of this node */ public void updateLoadFactor(int loadFactor) { this.loadFactor = loadFactor; commandRouter.updateMembership(loadFactor, commandFilter.get()); }
private void updateFilter(CommandMessageFilter newFilter) { if (!commandFilter.getAndSet(newFilter).equals(newFilter)) { commandRouter.updateMembership(loadFactor, newFilter); } }
private void updateFilter(Predicate<CommandMessage<?>> newFilter) { if (!commandFilter.getAndSet(newFilter).equals(newFilter)) { commandRouter.updateMembership(loadFactor, newFilter); } }