@ChannelHandler.Sharable public final class BlockTransfer extends io.netty.channel.SimpleChannelInboundHandler<BlockStream>
BlockManagerWorker.| Modifier and Type | Method and Description |
|---|---|
void |
channelActive(io.netty.channel.ChannelHandlerContext ctx) |
void |
channelInactive(io.netty.channel.ChannelHandlerContext ctx) |
protected void |
channelRead0(io.netty.channel.ChannelHandlerContext ctx,
BlockStream stream) |
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause) |
BlockInputStream |
initiatePull(String executorId,
boolean encodePartialBlock,
DataStoreProperty.Value blockStoreValue,
String blockId,
String runtimeEdgeId,
KeyRange keyRange)
Initiate a pull-based block transfer.
|
BlockOutputStream |
initiatePush(String executorId,
boolean encodePartialBlock,
String blockId,
String runtimeEdgeId,
KeyRange keyRange)
Initiate a push-based block transfer.
|
acceptInboundMessage, channelReadchannelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggeredensureNotSharable, handlerAdded, handlerRemoved, isSharablepublic BlockInputStream initiatePull(String executorId, boolean encodePartialBlock, DataStoreProperty.Value blockStoreValue, String blockId, String runtimeEdgeId, KeyRange keyRange)
executorId - the id of the source executorencodePartialBlock - whether the sender should start encoding even though the whole block
has not been written yetblockStoreValue - the block storeblockId - the id of the block to transferruntimeEdgeId - the runtime edge idkeyRange - the key rangeBlockInputStream from which the received data can be readpublic BlockOutputStream initiatePush(String executorId, boolean encodePartialBlock, String blockId, String runtimeEdgeId, KeyRange keyRange)
executorId - the id of the destination executorencodePartialBlock - whether to start encoding even though the whole block has not been written yetblockId - the id of the block to transferruntimeEdgeId - the runtime edge idkeyRange - the key rangeBlockOutputStream to which data can be writtenprotected void channelRead0(io.netty.channel.ChannelHandlerContext ctx,
BlockStream stream)
channelRead0 in class io.netty.channel.SimpleChannelInboundHandler<BlockStream>public void channelActive(io.netty.channel.ChannelHandlerContext ctx)
channelActive in interface io.netty.channel.ChannelInboundHandlerchannelActive in class io.netty.channel.ChannelInboundHandlerAdapterpublic void channelInactive(io.netty.channel.ChannelHandlerContext ctx)
channelInactive in interface io.netty.channel.ChannelInboundHandlerchannelInactive in class io.netty.channel.ChannelInboundHandlerAdapterpublic void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause)
exceptionCaught in interface io.netty.channel.ChannelHandlerexceptionCaught in interface io.netty.channel.ChannelInboundHandlerexceptionCaught in class io.netty.channel.ChannelInboundHandlerAdapterCopyright © 2018. All rights reserved.