@Override protected void encode(final ChannelHandlerContext ctx, final ByteTransferContext in, final List out) { final ByteTransferContextSetupMessage message = ByteTransferContextSetupMessage.newBuilder() .setInitiatorExecutorId(localExecutorId) .setTransferIndex(in.getContextId().getTransferIndex()) .setDataDirection(in.getContextId().getDataDirection()) .setContextDescriptor(ByteString.copyFrom(in.getContextDescriptor())) .setIsPipe(in.getContextId().isPipe()) .build(); final byte[] frameBody = message.toByteArray(); out.add(ZEROS.retain()); out.add(ctx.alloc().ioBuffer(BODY_LENGTH_LENGTH, BODY_LENGTH_LENGTH).writeInt(frameBody.length)); out.add(Unpooled.wrappedBuffer(frameBody)); } }
public Builder mergeFrom(org.apache.nemo.runtime.common.comm.ControlMessage.ByteTransferContextSetupMessage other) { if (other == org.apache.nemo.runtime.common.comm.ControlMessage.ByteTransferContextSetupMessage.getDefaultInstance()) return this; if (other.hasInitiatorExecutorId()) { bitField0_ |= 0x00000001; initiatorExecutorId_ = other.initiatorExecutorId_; onChanged(); } if (other.hasTransferIndex()) { setTransferIndex(other.getTransferIndex()); } if (other.hasDataDirection()) { setDataDirection(other.getDataDirection()); } if (other.hasContextDescriptor()) { setContextDescriptor(other.getContextDescriptor()); } if (other.hasIsPipe()) { setIsPipe(other.getIsPipe()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder mergeFrom(org.apache.nemo.runtime.common.comm.ControlMessage.ByteTransferContextSetupMessage other) { if (other == org.apache.nemo.runtime.common.comm.ControlMessage.ByteTransferContextSetupMessage.getDefaultInstance()) return this; if (other.hasInitiatorExecutorId()) { bitField0_ |= 0x00000001; initiatorExecutorId_ = other.initiatorExecutorId_; onChanged(); } if (other.hasTransferIndex()) { setTransferIndex(other.getTransferIndex()); } if (other.hasDataDirection()) { setDataDirection(other.getDataDirection()); } if (other.hasContextDescriptor()) { setContextDescriptor(other.getContextDescriptor()); } if (other.hasIsPipe()) { setIsPipe(other.getIsPipe()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public final boolean isInitialized() { if (!hasInitiatorExecutorId()) { return false; } if (!hasTransferIndex()) { return false; } if (!hasDataDirection()) { return false; } if (!hasContextDescriptor()) { return false; } if (!hasIsPipe()) { return false; } return true; }
public final boolean isInitialized() { if (!hasInitiatorExecutorId()) { return false; } if (!hasTransferIndex()) { return false; } if (!hasDataDirection()) { return false; } if (!hasContextDescriptor()) { return false; } if (!hasIsPipe()) { return false; } return true; }
@Override protected void encode(final ChannelHandlerContext ctx, final ByteTransferContext in, final List out) { final ByteTransferContextSetupMessage message = ByteTransferContextSetupMessage.newBuilder() .setInitiatorExecutorId(localExecutorId) .setTransferIndex(in.getContextId().getTransferIndex()) .setDataDirection(in.getContextId().getDataDirection()) .setContextDescriptor(ByteString.copyFrom(in.getContextDescriptor())) .setIsPipe(in.getContextId().isPipe()) .build(); final byte[] frameBody = message.toByteArray(); out.add(ZEROS.retain()); out.add(ctx.alloc().ioBuffer(BODY_LENGTH_LENGTH, BODY_LENGTH_LENGTH).writeInt(frameBody.length)); out.add(Unpooled.wrappedBuffer(frameBody)); } }
private static Builder create() { return new Builder(); }
public Builder clone() { return create().mergeFrom(buildPartial()); }
private static Builder create() { return new Builder(); }
public Builder clone() { return create().mergeFrom(buildPartial()); }
public org.apache.nemo.runtime.common.comm.ControlMessage.ByteTransferContextSetupMessage build() { org.apache.nemo.runtime.common.comm.ControlMessage.ByteTransferContextSetupMessage result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
@java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /**
public org.apache.nemo.runtime.common.comm.ControlMessage.ByteTransferContextSetupMessage build() { org.apache.nemo.runtime.common.comm.ControlMessage.ByteTransferContextSetupMessage result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
@java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /**