public org.drools.marshalling.impl.ProtobufMessages.Timers.ActivationTimer buildPartial() { org.drools.marshalling.impl.ProtobufMessages.Timers.ActivationTimer result = new org.drools.marshalling.impl.ProtobufMessages.Timers.ActivationTimer(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } if (activationBuilder_ == null) { result.activation_ = activation_; } else { result.activation_ = activationBuilder_.build(); } if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } if (triggerBuilder_ == null) { result.trigger_ = trigger_; } else { result.trigger_ = triggerBuilder_.build(); } result.bitField0_ = to_bitField0_; onBuilt(); return result; }
public Builder clear() { super.clear(); type_ = org.drools.marshalling.impl.ProtobufMessages.Timers.TimerType.EXPIRE; bitField0_ = (bitField0_ & ~0x00000001); if (expireBuilder_ == null) { expire_ = org.drools.marshalling.impl.ProtobufMessages.Timers.ExpireTimer.getDefaultInstance(); } else { expireBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); if (activationBuilder_ == null) { activation_ = org.drools.marshalling.impl.ProtobufMessages.Timers.ActivationTimer.getDefaultInstance(); } else { activationBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); if (behaviorBuilder_ == null) { behavior_ = org.drools.marshalling.impl.ProtobufMessages.Timers.BehaviorTimer.getDefaultInstance(); } else { behaviorBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000008); return this; }
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeMessage(1, activation_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeMessage(2, trigger_); } getUnknownFields().writeTo(output); }
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; } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable();
/** * <code>optional .org.drools.marshalling.Timers.ActivationTimer activation = 3;</code> */ public Builder mergeActivation(org.drools.marshalling.impl.ProtobufMessages.Timers.ActivationTimer value) { if (activationBuilder_ == null) { if (((bitField0_ & 0x00000004) == 0x00000004) && activation_ != org.drools.marshalling.impl.ProtobufMessages.Timers.ActivationTimer.getDefaultInstance()) { activation_ = org.drools.marshalling.impl.ProtobufMessages.Timers.ActivationTimer.newBuilder(activation_).mergeFrom(value).buildPartial(); } else { activation_ = value; } onChanged(); } else { activationBuilder_.mergeFrom(value); } bitField0_ |= 0x00000004; return this; } /**
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 ); } }
public org.drools.marshalling.impl.ProtobufMessages.Timers.ActivationTimer getDefaultInstanceForType() { return org.drools.marshalling.impl.ProtobufMessages.Timers.ActivationTimer.getDefaultInstance(); }
/** * <code>optional .org.drools.marshalling.Timers.ActivationTimer activation = 3;</code> */ public Builder clearActivation() { if (activationBuilder_ == null) { activation_ = org.drools.marshalling.impl.ProtobufMessages.Timers.ActivationTimer.getDefaultInstance(); onChanged(); } else { activationBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); return this; } /**
public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, activation_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, trigger_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; }
private void initFields() { type_ = org.drools.marshalling.impl.ProtobufMessages.Timers.TimerType.EXPIRE; expire_ = org.drools.marshalling.impl.ProtobufMessages.Timers.ExpireTimer.getDefaultInstance(); activation_ = org.drools.marshalling.impl.ProtobufMessages.Timers.ActivationTimer.getDefaultInstance(); behavior_ = org.drools.marshalling.impl.ProtobufMessages.Timers.BehaviorTimer.getDefaultInstance(); } private byte memoizedIsInitialized = -1;
public org.drools.marshalling.impl.ProtobufMessages.Timers.ActivationTimer build() { org.drools.marshalling.impl.ProtobufMessages.Timers.ActivationTimer result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
public Builder mergeFrom(org.drools.marshalling.impl.ProtobufMessages.Timers.ActivationTimer other) { if (other == org.drools.marshalling.impl.ProtobufMessages.Timers.ActivationTimer.getDefaultInstance()) return this; if (other.hasActivation()) { mergeActivation(other.getActivation()); } if (other.hasTrigger()) { mergeTrigger(other.getTrigger()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }