bitField0_ = (bitField0_ & ~0x00000002); if (initialFactBuilder_ == null) { initialFact_ = org.drools.marshalling.impl.ProtobufMessages.FactHandle.getDefaultInstance(); } else { initialFactBuilder_.clear();
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return org.drools.marshalling.impl.ProtobufMessages.FactHandle.getDescriptor().getEnumTypes().get(0); }
.computeBytesSize(10, getEntryPointBytes()); size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size;
public org.drools.marshalling.impl.ProtobufMessages.FactHandle buildPartial() { org.drools.marshalling.impl.ProtobufMessages.FactHandle result = new org.drools.marshalling.impl.ProtobufMessages.FactHandle(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0;
handle = workingMemory.getFactHandleFactory().newFactHandle( _handle.getId(), object, _handle.getRecency(), objectTypeConf, workingMemory,
Object object = null; ObjectMarshallingStrategy strategy = null; if ( _handle.hasStrategyIndex() ) { strategy = context.usedStrategies.get( _handle.getStrategyIndex() ); object = strategy.unmarshal( context.strategyContexts.get( strategy ), context, _handle.getObject().toByteArray(), (context.ruleBase == null)?null:context.ruleBase.getRootClassLoader() ); ((InternalWorkingMemoryEntryPoint) context.wm.getEntryPoints().get( _handle.getEntryPoint() ) ).getEntryPoint(), object ); switch ( _handle.getType() ) { case FACT : { handle = new DefaultFactHandle( _handle.getId(), object, _handle.getRecency(), entryPoint, typeConf != null && typeConf.isTrait() ); _handle.getId(), _handle.getRecency() ); break; handle = new EventFactHandle( _handle.getId(), object, _handle.getRecency(), _handle.getTimestamp(), _handle.getDuration(),
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeEnum(1, type_.getNumber()); output.writeBytes(10, getEntryPointBytes()); getUnknownFields().writeTo(output);
handle = workingMemory.getFactHandleFactory().newFactHandle( _handle.getId(), result, _handle.getRecency(), workingMemory.getObjectTypeConfigurationRegistry().getObjectTypeConf( context.getEntryPoint(), result ),
public Builder mergeFrom(org.drools.marshalling.impl.ProtobufMessages.FactHandle other) { if (other == org.drools.marshalling.impl.ProtobufMessages.FactHandle.getDefaultInstance()) return this; if (other.hasType()) { setType(other.getType()); if (other.hasId()) { setId(other.getId()); if (other.hasRecency()) { setRecency(other.getRecency()); if (other.hasTimestamp()) { setTimestamp(other.getTimestamp()); if (other.hasDuration()) { setDuration(other.getDuration()); if (other.hasIsExpired()) { setIsExpired(other.getIsExpired()); if (other.hasActivationsCount()) { setActivationsCount(other.getActivationsCount()); if (other.hasStrategyIndex()) { setStrategyIndex(other.getStrategyIndex()); if (other.hasObject()) { setObject(other.getObject()); if (other.hasEntryPoint()) {
@SuppressWarnings("unchecked") private InternalFactHandle createFactHandle(final LeftTuple leftTuple, final PropagationContext context, final InternalWorkingMemory workingMemory) { InternalFactHandle handle = null; ProtobufMessages.FactHandle _handle = null; if( context.getReaderContext() != null ) { Map<ProtobufInputMarshaller.TupleKey, ProtobufMessages.FactHandle> map = (Map<ProtobufInputMarshaller.TupleKey, ProtobufMessages.FactHandle>) context.getReaderContext().nodeMemories.get( getId() ); if( map != null ) { _handle = map.get( PersisterHelper.createTupleKey( leftTuple ) ); } } if( _handle != null ) { // create a handle with the given id handle = workingMemory.getFactHandleFactory().newFactHandle( _handle.getId(), leftTuple, _handle.getRecency(), workingMemory.getObjectTypeConfigurationRegistry().getObjectTypeConf( context.getEntryPoint(), leftTuple ), workingMemory, null ); // so far, result is not an event } else { handle = workingMemory.getFactHandleFactory().newFactHandle( leftTuple, workingMemory.getObjectTypeConfigurationRegistry().getObjectTypeConf( context.getEntryPoint(), leftTuple ), workingMemory, null ); // so far, result is not an event } return handle; }
@SuppressWarnings("unchecked") private InternalFactHandle createFactHandle(final PropagationContext context, final InternalWorkingMemory workingMemory, final LeftTuple leftTuple ) { InternalFactHandle handle = null; ProtobufMessages.FactHandle _handle = null; if( context.getReaderContext() != null ) { Map<TupleKey, QueryElementContext> map = (Map<TupleKey, QueryElementContext>) context.getReaderContext().nodeMemories.get( getId() ); if( map != null ) { _handle = map.get( PersisterHelper.createTupleKey( leftTuple ) ).handle; } } if( _handle != null ) { // create a handle with the given id handle = workingMemory.getFactHandleFactory().newFactHandle( _handle.getId(), null, _handle.getRecency(), null, workingMemory, workingMemory ); } else { handle = workingMemory.getFactHandleFactory().newFactHandle( null, null, workingMemory, workingMemory ); } return handle; }
@SuppressWarnings("unchecked") private QueryElementFactHandle createQueryResultHandle(PropagationContext context, InternalWorkingMemory workingMemory, Object[] objects) { QueryElementFactHandle handle = null; ProtobufMessages.FactHandle _handle = null; if( context.getReaderContext() != null ) { Map<TupleKey, QueryElementContext> map = (Map<TupleKey, QueryElementContext>) context.getReaderContext().nodeMemories.get( node.getId() ); if( map != null ) { QueryElementContext _context = map.get( PersisterHelper.createTupleKey( leftTuple ) ); if( _context != null ) { _handle = _context.results.removeFirst(); } } } if( _handle != null ) { // create a handle with the given id handle = new QueryElementFactHandle( objects, _handle.getId(), _handle.getRecency() ); } else { handle = new QueryElementFactHandle( objects, workingMemory.getFactHandleFactory().getAtomicId().incrementAndGet(), workingMemory.getFactHandleFactory().getAtomicRecency().incrementAndGet() ); } return handle; }
public Builder clear() { super.clear(); if (tupleBuilder_ == null) { tuple_ = org.drools.marshalling.impl.ProtobufMessages.Tuple.getDefaultInstance(); } else { tupleBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); if (handleBuilder_ == null) { handle_ = org.drools.marshalling.impl.ProtobufMessages.FactHandle.getDefaultInstance(); } else { handleBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); if (resultBuilder_ == null) { result_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000004); } else { resultBuilder_.clear(); } return this; }
/** * <code>optional .org.drools.marshalling.FactHandle result_handle = 2;</code> */ public Builder mergeResultHandle(org.drools.marshalling.impl.ProtobufMessages.FactHandle value) { if (resultHandleBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002) && resultHandle_ != org.drools.marshalling.impl.ProtobufMessages.FactHandle.getDefaultInstance()) { resultHandle_ = org.drools.marshalling.impl.ProtobufMessages.FactHandle.newBuilder(resultHandle_).mergeFrom(value).buildPartial(); } else { resultHandle_ = value; } onChanged(); } else { resultHandleBuilder_.mergeFrom(value); } bitField0_ |= 0x00000002; return this; } /**
/** * <code>optional .org.drools.marshalling.FactHandle handle = 2;</code> */ public Builder mergeHandle(org.drools.marshalling.impl.ProtobufMessages.FactHandle value) { if (handleBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002) && handle_ != org.drools.marshalling.impl.ProtobufMessages.FactHandle.getDefaultInstance()) { handle_ = org.drools.marshalling.impl.ProtobufMessages.FactHandle.newBuilder(handle_).mergeFrom(value).buildPartial(); } else { handle_ = value; } onChanged(); } else { handleBuilder_.mergeFrom(value); } bitField0_ |= 0x00000002; return this; } /**
/** * <code>optional .org.drools.marshalling.FactHandle initial_fact = 6;</code> */ public Builder mergeInitialFact(org.drools.marshalling.impl.ProtobufMessages.FactHandle value) { if (initialFactBuilder_ == null) { if (((bitField0_ & 0x00000004) == 0x00000004) && initialFact_ != org.drools.marshalling.impl.ProtobufMessages.FactHandle.getDefaultInstance()) { initialFact_ = org.drools.marshalling.impl.ProtobufMessages.FactHandle.newBuilder(initialFact_).mergeFrom(value).buildPartial(); } else { initialFact_ = value; } onChanged(); } else { initialFactBuilder_.mergeFrom(value); } bitField0_ |= 0x00000004; return this; } /**
/** * <code>optional .org.drools.marshalling.FactHandle result_handle = 2;</code> */ public Builder mergeResultHandle(org.drools.marshalling.impl.ProtobufMessages.FactHandle value) { if (resultHandleBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002) && resultHandle_ != org.drools.marshalling.impl.ProtobufMessages.FactHandle.getDefaultInstance()) { resultHandle_ = org.drools.marshalling.impl.ProtobufMessages.FactHandle.newBuilder(resultHandle_).mergeFrom(value).buildPartial(); } else { resultHandle_ = value; } onChanged(); } else { resultHandleBuilder_.mergeFrom(value); } bitField0_ |= 0x00000002; return this; } /**
public Builder clear() { super.clear(); if (tupleBuilder_ == null) { tuple_ = org.drools.marshalling.impl.ProtobufMessages.Tuple.getDefaultInstance(); } else { tupleBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); if (resultHandleBuilder_ == null) { resultHandle_ = org.drools.marshalling.impl.ProtobufMessages.FactHandle.getDefaultInstance(); } else { resultHandleBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); return this; }
public Builder clear() { super.clear(); if (tupleBuilder_ == null) { tuple_ = org.drools.marshalling.impl.ProtobufMessages.Tuple.getDefaultInstance(); } else { tupleBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); if (resultHandleBuilder_ == null) { resultHandle_ = org.drools.marshalling.impl.ProtobufMessages.FactHandle.getDefaultInstance(); } else { resultHandleBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); return this; }
/** * <code>optional .org.drools.marshalling.FactHandle handle = 2;</code> */ public Builder clearHandle() { if (handleBuilder_ == null) { handle_ = org.drools.marshalling.impl.ProtobufMessages.FactHandle.getDefaultInstance(); onChanged(); } else { handleBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); return this; } /**