public org.drools.marshalling.impl.ProtobufMessages.NodeMemory.RIANodeMemory buildPartial() { org.drools.marshalling.impl.ProtobufMessages.NodeMemory.RIANodeMemory result = new org.drools.marshalling.impl.ProtobufMessages.NodeMemory.RIANodeMemory(this); int from_bitField0_ = bitField0_; if (contextBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001)) { context_ = java.util.Collections.unmodifiableList(context_); bitField0_ = (bitField0_ & ~0x00000001); } result.context_ = context_; } else { result.context_ = contextBuilder_.build(); } onBuilt(); return result; }
ria_ = org.drools.marshalling.impl.ProtobufMessages.NodeMemory.RIANodeMemory.getDefaultInstance(); } else { riaBuilder_.clear();
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); for (int i = 0; i < context_.size(); i++) { output.writeMessage(1, context_.get(i)); } getUnknownFields().writeTo(output); }
for( ProtobufMessages.NodeMemory.RIANodeMemory.RIAContext _ctx : _node.getRia().getContextList() ) { map.put( PersisterHelper.createTupleKey( _ctx.getTuple() ), _ctx.getResultHandle() );
com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = break; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; makeExtensionsImmutable();
public Builder mergeFrom(org.drools.marshalling.impl.ProtobufMessages.NodeMemory.RIANodeMemory other) { if (other == org.drools.marshalling.impl.ProtobufMessages.NodeMemory.RIANodeMemory.getDefaultInstance()) return this; if (contextBuilder_ == null) { if (!other.context_.isEmpty()) { this.mergeUnknownFields(other.getUnknownFields()); return this;
private static ProtobufMessages.NodeMemory writeRIANodeMemory(final int nodeId, final Memory memory) { // for RIA nodes, we need to store the ID of the created handles RIAMemory mem = (RIAMemory) memory; if (!mem.memory.isEmpty()) { ProtobufMessages.NodeMemory.RIANodeMemory.Builder _ria = ProtobufMessages.NodeMemory.RIANodeMemory.newBuilder(); final org.drools.core.util.Iterator it = mem.memory.iterator(); // iterates over all propagated handles and assert them to the new sink for (ObjectEntry entry = (ObjectEntry) it.next(); entry != null; entry = (ObjectEntry) it.next()) { LeftTuple leftTuple = (LeftTuple) entry.getKey(); InternalFactHandle handle = (InternalFactHandle) entry.getValue(); FactHandle _handle = ProtobufMessages.FactHandle.newBuilder() .setId(handle.getId()) .setRecency(handle.getRecency()) .build(); _ria.addContext(ProtobufMessages.NodeMemory.RIANodeMemory.RIAContext.newBuilder() .setTuple(PersisterHelper.createTuple(leftTuple)) .setResultHandle(_handle) .build()); } return ProtobufMessages.NodeMemory.newBuilder() .setNodeId(nodeId) .setNodeType(ProtobufMessages.NodeMemory.NodeType.RIA) .setRia(_ria.build()) .build(); } return null; }
/** * <code>optional .org.drools.marshalling.NodeMemory.RIANodeMemory ria = 4;</code> */ public Builder mergeRia(org.drools.marshalling.impl.ProtobufMessages.NodeMemory.RIANodeMemory value) { if (riaBuilder_ == null) { if (((bitField0_ & 0x00000008) == 0x00000008) && ria_ != org.drools.marshalling.impl.ProtobufMessages.NodeMemory.RIANodeMemory.getDefaultInstance()) { ria_ = org.drools.marshalling.impl.ProtobufMessages.NodeMemory.RIANodeMemory.newBuilder(ria_).mergeFrom(value).buildPartial(); } else { ria_ = value; } onChanged(); } else { riaBuilder_.mergeFrom(value); } bitField0_ |= 0x00000008; return this; } /**
public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(org.drools.marshalling.impl.ProtobufMessages.NodeMemory.RIANodeMemory prototype) {
/** * <code>optional .org.drools.marshalling.NodeMemory.RIANodeMemory ria = 4;</code> */ public Builder clearRia() { if (riaBuilder_ == null) { ria_ = org.drools.marshalling.impl.ProtobufMessages.NodeMemory.RIANodeMemory.getDefaultInstance(); onChanged(); } else { riaBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000008); return this; } /**
public Builder toBuilder() { return newBuilder(this); }
public org.drools.marshalling.impl.ProtobufMessages.NodeMemory.RIANodeMemory getDefaultInstanceForType() { return org.drools.marshalling.impl.ProtobufMessages.NodeMemory.RIANodeMemory.getDefaultInstance(); }
public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; for (int i = 0; i < context_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, context_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; }
private void initFields() { nodeId_ = 0; nodeType_ = org.drools.marshalling.impl.ProtobufMessages.NodeMemory.NodeType.ACCUMULATE; accumulate_ = org.drools.marshalling.impl.ProtobufMessages.NodeMemory.AccumulateNodeMemory.getDefaultInstance(); ria_ = org.drools.marshalling.impl.ProtobufMessages.NodeMemory.RIANodeMemory.getDefaultInstance(); from_ = org.drools.marshalling.impl.ProtobufMessages.NodeMemory.FromNodeMemory.getDefaultInstance(); queryElement_ = org.drools.marshalling.impl.ProtobufMessages.NodeMemory.QueryElementNodeMemory.getDefaultInstance(); } private byte memoizedIsInitialized = -1;
public static Builder newBuilder(org.drools.marshalling.impl.ProtobufMessages.NodeMemory.RIANodeMemory prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); }
public org.drools.marshalling.impl.ProtobufMessages.NodeMemory.RIANodeMemory build() { org.drools.marshalling.impl.ProtobufMessages.NodeMemory.RIANodeMemory result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }