/** * <code>optional .org.drools.marshalling.Timers.BehaviorTimer behavior = 4;</code> */ public Builder mergeBehavior(org.drools.marshalling.impl.ProtobufMessages.Timers.BehaviorTimer value) { if (behaviorBuilder_ == null) { if (((bitField0_ & 0x00000008) == 0x00000008) && behavior_ != org.drools.marshalling.impl.ProtobufMessages.Timers.BehaviorTimer.getDefaultInstance()) { behavior_ = org.drools.marshalling.impl.ProtobufMessages.Timers.BehaviorTimer.newBuilder(behavior_).mergeFrom(value).buildPartial(); } else { behavior_ = value; } onChanged(); } else { behaviorBuilder_.mergeFrom(value); } bitField0_ |= 0x00000008; return this; } /**
public Timer serialize(JobContext jobCtx, MarshallerWriteContext outputCtx) { // BehaviorJob, no state BehaviorJobContext bjobCtx = ( BehaviorJobContext ) jobCtx; // write out SlidingTimeWindowContext SlidingTimeWindowContext slCtx = ( SlidingTimeWindowContext ) bjobCtx.behaviorContext; EventFactHandle handle = slCtx.getQueue().peek(); return ProtobufMessages.Timers.Timer.newBuilder() .setType( ProtobufMessages.Timers.TimerType.BEHAVIOR ) .setBehavior( ProtobufMessages.Timers.BehaviorTimer.newBuilder() .setHandleId( handle.getId() ) .build() ) .build(); } }
public Builder toBuilder() { return newBuilder(this); }
public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(org.drools.marshalling.impl.ProtobufMessages.Timers.BehaviorTimer prototype) {
public static Builder newBuilder(org.drools.marshalling.impl.ProtobufMessages.Timers.BehaviorTimer prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); }