T
- the type of record which is sent through the attached output gatepublic interface ChannelSelector<T extends IOReadableWritable>
ChannelSelector
determines to which logical channels a record should be written to.Modifier and Type | Method and Description |
---|---|
boolean |
isBroadcast()
Returns whether the channel selector always selects all the output channels.
|
int |
selectChannel(T record)
Returns the logical channel index, to which the given record should be written.
|
void |
setup(int numberOfChannels)
Initializes the channel selector with the number of output channels.
|
void setup(int numberOfChannels)
numberOfChannels
- the total number of output channels which are attached to respective
output gate.int selectChannel(T record)
UnsupportedOperationException
).record
- the record to determine the output channels for.boolean isBroadcast()
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.