Class LegacyTypedStreamWriterProxy
java.lang.Object
io.camunda.zeebe.engine.processing.bpmn.behavior.LegacyTypedStreamWriterProxy
- All Implemented Interfaces:
LegacyTypedCommandWriter,LegacyTypedStreamWriter,TypedCommandWriter,TypedEventWriter,TypedRejectionWriter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidappendFollowUpCommand(long key, Intent intent, RecordValue value) voidappendFollowUpEvent(long key, Intent intent, RecordValue value) voidappendNewCommand(Intent intent, RecordValue value) voidappendRecord(long key, RecordType type, Intent intent, RejectionType rejectionType, String rejectionReason, RecordValue value) voidappendRejection(TypedRecord<? extends RecordValue> command, RejectionType type, String reason) booleancanWriteEventOfLength(int eventLength) Use this to know whether you can write an event of this length.voidconfigureSourceContext(long sourceRecordPosition) longflush()intvoidreset()voidwrap(LegacyTypedStreamWriter writer)
-
Constructor Details
-
LegacyTypedStreamWriterProxy
public LegacyTypedStreamWriterProxy()
-
-
Method Details
-
wrap
-
appendRejection
public void appendRejection(TypedRecord<? extends RecordValue> command, RejectionType type, String reason) - Specified by:
appendRejectionin interfaceTypedRejectionWriter
-
appendRecord
public void appendRecord(long key, RecordType type, Intent intent, RejectionType rejectionType, String rejectionReason, RecordValue value) - Specified by:
appendRecordin interfaceLegacyTypedStreamWriter
-
configureSourceContext
public void configureSourceContext(long sourceRecordPosition) - Specified by:
configureSourceContextin interfaceLegacyTypedStreamWriter
-
appendFollowUpEvent
- Specified by:
appendFollowUpEventin interfaceTypedEventWriter
-
canWriteEventOfLength
public boolean canWriteEventOfLength(int eventLength) Description copied from interface:TypedEventWriterUse this to know whether you can write an event of this length.Example:
final TypedEventWriter writer; // ... assign the writer final TypedRecord<?> record; // ... assign record if (!writer.canWriteEventOfLength(record.getLength())) { // raise an incident or some such return; }- Specified by:
canWriteEventOfLengthin interfaceTypedEventWriter- Parameters:
eventLength- the length of the event that will be written- Returns:
- true if an event of length
eventLengthcan be written
-
getMaxEventLength
public int getMaxEventLength()- Specified by:
getMaxEventLengthin interfaceTypedEventWriter- Returns:
- the maximum event length
-
appendNewCommand
- Specified by:
appendNewCommandin interfaceLegacyTypedCommandWriter- Specified by:
appendNewCommandin interfaceTypedCommandWriter
-
appendFollowUpCommand
- Specified by:
appendFollowUpCommandin interfaceLegacyTypedCommandWriter- Specified by:
appendFollowUpCommandin interfaceTypedCommandWriter
-
reset
public void reset()- Specified by:
resetin interfaceLegacyTypedCommandWriter
-
flush
public long flush()- Specified by:
flushin interfaceLegacyTypedCommandWriter- Returns:
- position of new record, negative value on failure
-