Class TypedStreamWriterProxy
java.lang.Object
io.camunda.zeebe.engine.processing.bpmn.behavior.TypedStreamWriterProxy
- All Implemented Interfaces:
TypedCommandWriter,TypedEventWriter,TypedRejectionWriter,TypedStreamWriter
-
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) 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(TypedStreamWriter writer)
-
Constructor Details
-
TypedStreamWriterProxy
public TypedStreamWriterProxy()
-
-
Method Details
-
wrap
-
appendRejection
public void appendRejection(TypedRecord<? extends RecordValue> command, RejectionType type, String reason) - Specified by:
appendRejectionin interfaceTypedRejectionWriter
-
configureSourceContext
public void configureSourceContext(long sourceRecordPosition) - Specified by:
configureSourceContextin interfaceTypedStreamWriter
-
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 interfaceTypedCommandWriter
-
appendFollowUpCommand
- Specified by:
appendFollowUpCommandin interfaceTypedCommandWriter
-
reset
public void reset()- Specified by:
resetin interfaceTypedCommandWriter
-
flush
public long flush()- Specified by:
flushin interfaceTypedCommandWriter- Returns:
- position of new record, negative value on failure
-