Exemple #1
0
 /** This is for creating a round robin with uniform weights across the stream. */
 public static SIRJoiner createUniformRR(SIRContainer parent, JExpression weight) {
   // make a uniform rr joiner
   return new SIRJoiner(
       parent, SIRJoinType.WEIGHTED_RR, Utils.initArray(Math.max(parent.size(), 1), weight), true);
 }
Exemple #2
0
 /**
  * If this is a joiner that has equal weight per way, then rescale the weights to be of the given
  * <extent>
  */
 public void rescale(int extent) {
   if (uniform) {
     this.weights = Utils.initArray(extent, weights[0]);
   }
 }