code: @Override
      public synchronized ChannelData updateChannelWeight(String channelName, int newWeight) throws ChannelException {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
              Tr.entry(tc, "updateChannelWeight");
          }
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
              Tr.debug(tc, "channelName=" + channelName + ", newWeight=" + newWeight);
          }
          if (null == channelName) {
              throw new InvalidChannelNameException("Input channel name is null");
          }
          if (newWeight < 0) {
              throw new InvalidWeightException("Invalid input weight, " + newWeight);
          }
  
          // Find the existing channel config
          ChannelDataImpl channelData = (ChannelDataImpl) channelDataMap.get(channelName);
          if (null == channelData) {
              throw new InvalidChannelNameException("Unable to find input channel, " + channelName);
          }
  
          // Set the new weight in the framework.
          channelData.setDiscriminatorWeight(newWeight);
          // Update each running channel that is using this parent channel data
          // object.
          updateRunningChannels(channelData);
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
              Tr.exit(tc, "updateChannelWeight");
          }
          return channelData;
      }
docs: /*
  @see
  com.ibm.wsspi.channelfw.ChannelFramework#updateChannelWeight(java.lang.
  String, int)