public org.drools.marshalling.impl.ProtobufMessages.Activation buildPartial() { org.drools.marshalling.impl.ProtobufMessages.Activation result = new org.drools.marshalling.impl.ProtobufMessages.Activation(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0;
.computeBytesSize(4, getPackageNameBytes()); .computeBytesSize(5, getRuleNameBytes()); .computeBytesSize(7, getActivationGroupBytes()); size += 1 * getLogicalDependencyList().size(); size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size;
public Builder clear() { super.clear(); if (activationBuilder_ == null) { activation_ = org.drools.marshalling.impl.ProtobufMessages.Activation.getDefaultInstance(); } else { activationBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); if (triggerBuilder_ == null) { trigger_ = org.drools.marshalling.impl.ProtobufMessages.Trigger.getDefaultInstance(); } else { triggerBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); return this; }
PersisterHelper.createActivationKey( _activation.getPackageName(), _activation.getRuleName(), _activation.getTuple() ) ).getObject(); PropagationContext pc = activation.getPropagationContext(); ObjectTypeConf typeConf = context.wm.getObjectTypeConfigurationRegistry().getObjectTypeConf( ((NamedEntryPoint)handle.getEntryPoint()).getEntryPoint(),
public Builder mergeFrom(org.drools.marshalling.impl.ProtobufMessages.Activation other) { if (other == org.drools.marshalling.impl.ProtobufMessages.Activation.getDefaultInstance()) return this; if (other.hasTuple()) { mergeTuple(other.getTuple()); if (other.hasSalience()) { setSalience(other.getSalience()); if (other.hasPackageName()) { bitField0_ |= 0x00000004; packageName_ = other.packageName_; onChanged(); if (other.hasRuleName()) { bitField0_ |= 0x00000008; ruleName_ = other.ruleName_; onChanged(); if (other.hasActivationGroup()) { bitField0_ |= 0x00000010; activationGroup_ = other.activationGroup_; onChanged(); if (other.hasIsActivated()) { setIsActivated(other.getIsActivated()); if (other.hasHandleId()) { setHandleId(other.getHandleId()); this.mergeUnknownFields(other.getUnknownFields());
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeMessage(2, tuple_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeInt32(3, salience_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBytes(4, getPackageNameBytes()); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeBytes(5, getRuleNameBytes()); } if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeBytes(7, getActivationGroupBytes()); } if (((bitField0_ & 0x00000020) == 0x00000020)) { output.writeBool(8, isActivated_); } if (((bitField0_ & 0x00000040) == 0x00000040)) { output.writeInt32(9, handleId_); } for (int i = 0; i < logicalDependency_.size(); i++) { output.writeInt32(10, logicalDependency_.get(i)); } getUnknownFields().writeTo(output); }
/** * <code>optional .org.drools.marshalling.Activation activation = 1;</code> */ public Builder mergeActivation(org.drools.marshalling.impl.ProtobufMessages.Activation value) { if (activationBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001) && activation_ != org.drools.marshalling.impl.ProtobufMessages.Activation.getDefaultInstance()) { activation_ = org.drools.marshalling.impl.ProtobufMessages.Activation.newBuilder(activation_).mergeFrom(value).buildPartial(); } else { activation_ = value; } onChanged(); } else { activationBuilder_.mergeFrom(value); } bitField0_ |= 0x00000001; return this; } /**
/** * <code>optional .org.drools.marshalling.Activation activation = 2;</code> */ public Builder mergeActivation(org.drools.marshalling.impl.ProtobufMessages.Activation value) { if (activationBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002) && activation_ != org.drools.marshalling.impl.ProtobufMessages.Activation.getDefaultInstance()) { activation_ = org.drools.marshalling.impl.ProtobufMessages.Activation.newBuilder(activation_).mergeFrom(value).buildPartial(); } else { activation_ = value; } onChanged(); } else { activationBuilder_.mergeFrom(value); } bitField0_ |= 0x00000002; return this; } /**
public LogicalRetractCallback(MarshallerReaderContext context, Action _action) { LogicalRetract _retract = _action.getLogicalRetract(); this.tms = context.wm.getTruthMaintenanceSystem(); this.handle = context.handles.get( _retract.getHandleId() ); this.activation = (Activation) context.filter .getTuplesCache().get( PersisterHelper.createActivationKey( _retract.getActivation().getPackageName(), _retract.getActivation().getRuleName(), _retract.getActivation().getTuple() ) ).getObject(); this.context = this.activation.getPropagationContext(); this.beliefSet = (BeliefSet) this.tms.getJustifiedMap().get( handle.getId() ); for ( LinkedListEntry entry = (LinkedListEntry) beliefSet.getFirst(); entry != null; entry = (LinkedListEntry) entry.getNext() ) { final LogicalDependency node = (LogicalDependency) entry.getObject(); if ( node.getJustifier() == this.activation ) { this.node = node; break; } } }
public void deserialize(MarshallerReaderContext inCtx, Timer _timer) throws ClassNotFoundException { ActivationTimer _activation = _timer.getActivation(); LeftTuple leftTuple = inCtx.filter.getTuplesCache().get( PersisterHelper.createActivationKey( _activation.getActivation().getPackageName(), _activation.getActivation().getRuleName(), _activation.getActivation().getTuple() ) ); ScheduledAgendaItem item = (ScheduledAgendaItem) leftTuple.getObject(); Trigger trigger = ProtobufInputMarshaller.readTrigger( inCtx, _activation.getTrigger() ); DefaultAgenda agenda = ( DefaultAgenda ) inCtx.wm.getAgenda(); ActivationTimerJob job = new ActivationTimerJob(); ActivationTimerJobContext ctx = new ActivationTimerJobContext( trigger, item, agenda ); JobHandle jobHandle = ((InternalWorkingMemory)agenda.getWorkingMemory()).getTimerService().scheduleJob( job, ctx, trigger ); item.setJobHandle( jobHandle ); } }
/** * <code>optional .org.drools.marshalling.Activation activation = 1;</code> */ public Builder clearActivation() { if (activationBuilder_ == null) { activation_ = org.drools.marshalling.impl.ProtobufMessages.Activation.getDefaultInstance(); onChanged(); } else { activationBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); return this; } /**
public org.drools.marshalling.impl.ProtobufMessages.Activation getDefaultInstanceForType() { return org.drools.marshalling.impl.ProtobufMessages.Activation.getDefaultInstance(); }
/** * <code>optional string activation_group = 7;</code> * * <pre> *optional int64 propagation_number = 6; * </pre> */ public Builder clearActivationGroup() { bitField0_ = (bitField0_ & ~0x00000010); activationGroup_ = getDefaultInstance().getActivationGroup(); onChanged(); return this; } /**
/** * <code>optional .org.drools.marshalling.Activation activation = 2;</code> */ public Builder clearActivation() { if (activationBuilder_ == null) { activation_ = org.drools.marshalling.impl.ProtobufMessages.Activation.getDefaultInstance(); onChanged(); } else { activationBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); return this; } /**
/** * <code>repeated .org.drools.marshalling.Activation activation = 4;</code> */ public org.drools.marshalling.impl.ProtobufMessages.Activation.Builder addActivationBuilder( int index) { return getActivationFieldBuilder().addBuilder( index, org.drools.marshalling.impl.ProtobufMessages.Activation.getDefaultInstance()); } /**
/** * <code>repeated .org.drools.marshalling.Activation activation = 4;</code> */ public org.drools.marshalling.impl.ProtobufMessages.Activation.Builder addActivationBuilder() { return getActivationFieldBuilder().addBuilder( org.drools.marshalling.impl.ProtobufMessages.Activation.getDefaultInstance()); } /**
public Builder clear() { super.clear(); handleId_ = 0; bitField0_ = (bitField0_ & ~0x00000001); if (activationBuilder_ == null) { activation_ = org.drools.marshalling.impl.ProtobufMessages.Activation.getDefaultInstance(); } else { activationBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); return this; }
/** * <code>repeated .org.drools.marshalling.Activation activation = 6;</code> */ public org.drools.marshalling.impl.ProtobufMessages.Activation.Builder addActivationBuilder( int index) { return getActivationFieldBuilder().addBuilder( index, org.drools.marshalling.impl.ProtobufMessages.Activation.getDefaultInstance()); } /**
/** * <code>optional string package_name = 4;</code> */ public Builder clearPackageName() { bitField0_ = (bitField0_ & ~0x00000004); packageName_ = getDefaultInstance().getPackageName(); onChanged(); return this; } /**
/** * <code>optional string rule_name = 5;</code> */ public Builder clearRuleName() { bitField0_ = (bitField0_ & ~0x00000008); ruleName_ = getDefaultInstance().getRuleName(); onChanged(); return this; } /**