public class ChannelManager extends Object implements EnvelopeDispatcher, BufferProviderBroker
| Constructor and Description |
|---|
ChannelManager(ChannelLookupProtocol channelLookupService,
InstanceConnectionInfo connectionInfo,
int numNetworkBuffers,
int networkBufferSize,
NetworkConnectionManager networkConnectionManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
dispatchFromInputChannel(Envelope envelope)
Dispatches an envelope from an input channel to the receiving output channels (backwards flow).
|
void |
dispatchFromNetwork(Envelope envelope)
Dispatches an envelope from an incoming TCP connection.
|
void |
dispatchFromOutputChannel(Envelope envelope)
Dispatches an envelope from an output channel to the receiving input channels (forward flow).
|
BufferProvider |
getBufferProvider(JobID jobID,
ChannelID sourceChannelID) |
void |
invalidateLookupCacheEntries(Set<ChannelID> channelIDs)
Invalidates the entries identified by the given channel IDs from the receiver lookup cache.
|
void |
logBufferUtilization() |
void |
register(Task task)
Registers the given task with the channel manager.
|
void |
shutdown() |
void |
unregister(ExecutionVertexID vertexId,
Task task)
Unregisters the given task from the channel manager.
|
public ChannelManager(ChannelLookupProtocol channelLookupService, InstanceConnectionInfo connectionInfo, int numNetworkBuffers, int networkBufferSize, NetworkConnectionManager networkConnectionManager) throws IOException
IOExceptionpublic void shutdown()
throws IOException
IOExceptionpublic void register(Task task) throws InsufficientResourcesException
task - the task to be registeredInsufficientResourcesException - thrown if not enough buffers available to safely run this taskpublic void unregister(ExecutionVertexID vertexId, Task task)
vertexId - the ID of the task to be unregisteredtask - the task to be unregisteredpublic void invalidateLookupCacheEntries(Set<ChannelID> channelIDs)
channelIDs - channel IDs for entries to invalidatepublic void dispatchFromOutputChannel(Envelope envelope) throws IOException, InterruptedException
EnvelopeDispatcherdispatchFromOutputChannel in interface EnvelopeDispatcherenvelope - envelope to be sentIOExceptionInterruptedExceptionpublic void dispatchFromInputChannel(Envelope envelope) throws IOException, InterruptedException
EnvelopeDispatcherdispatchFromInputChannel in interface EnvelopeDispatcherenvelope - envelope to be sentIOExceptionInterruptedExceptionpublic void dispatchFromNetwork(Envelope envelope) throws IOException, InterruptedException
EnvelopeDispatcherAfter an envelope has been constructed from a TCP socket, this method is called to send the envelope to the receiving input channel.
dispatchFromNetwork in interface EnvelopeDispatcherenvelope - envelope to be sentIOExceptionInterruptedExceptionpublic BufferProvider getBufferProvider(JobID jobID, ChannelID sourceChannelID) throws IOException
getBufferProvider in interface BufferProviderBrokerIOExceptionpublic void logBufferUtilization()
Copyright © 2014 The Apache Software Foundation. All rights reserved.