class BroadcastPartitioner extends StreamPartitioner<T> {

	@Override
	public int[] selectChannels(SerializationDelegate<StreamRecord<T>> record,
			int numberOfOutputChannels) {
		if (set && setNumber == numberOfOutputChannels) {
			return returnArray;
		} else {
			this.returnArray = new int[numberOfOutputChannels];
			for (int i = 0; i < numberOfOutputChannels; i++) {
				returnArray[i] = i;
			}
			set = true;
			setNumber = numberOfOutputChannels;
			return returnArray;
		}
	}

}