Class TypedStreamWriterProxy
- java.lang.Object
-
- io.camunda.zeebe.engine.processing.bpmn.behavior.TypedStreamWriterProxy
-
- All Implemented Interfaces:
TypedCommandWriter
,TypedEventWriter
,TypedRejectionWriter
,TypedStreamWriter
public final class TypedStreamWriterProxy extends Object implements TypedStreamWriter
-
-
Constructor Summary
Constructors Constructor Description TypedStreamWriterProxy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
appendFollowUpCommand(long key, Intent intent, RecordValue value)
void
appendFollowUpEvent(long key, Intent intent, RecordValue value)
void
appendNewCommand(Intent intent, RecordValue value)
void
appendRejection(TypedRecord<? extends RecordValue> command, RejectionType type, String reason)
boolean
canWriteEventOfLength(int eventLength)
Use this to know whether you can write an event of this length.void
configureSourceContext(long sourceRecordPosition)
long
flush()
int
getMaxEventLength()
void
reset()
void
wrap(TypedStreamWriter writer)
-
-
-
Method Detail
-
wrap
public void wrap(TypedStreamWriter writer)
-
appendRejection
public void appendRejection(TypedRecord<? extends RecordValue> command, RejectionType type, String reason)
- Specified by:
appendRejection
in interfaceTypedRejectionWriter
-
configureSourceContext
public void configureSourceContext(long sourceRecordPosition)
- Specified by:
configureSourceContext
in interfaceTypedStreamWriter
-
appendFollowUpEvent
public void appendFollowUpEvent(long key, Intent intent, RecordValue value)
- Specified by:
appendFollowUpEvent
in interfaceTypedEventWriter
-
canWriteEventOfLength
public boolean canWriteEventOfLength(int eventLength)
Description copied from interface:TypedEventWriter
Use 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:
canWriteEventOfLength
in interfaceTypedEventWriter
- Parameters:
eventLength
- the length of the event that will be written- Returns:
- true if an event of length
eventLength
can be written
-
getMaxEventLength
public int getMaxEventLength()
- Specified by:
getMaxEventLength
in interfaceTypedEventWriter
- Returns:
- the maximum event length
-
appendNewCommand
public void appendNewCommand(Intent intent, RecordValue value)
- Specified by:
appendNewCommand
in interfaceTypedCommandWriter
-
appendFollowUpCommand
public void appendFollowUpCommand(long key, Intent intent, RecordValue value)
- Specified by:
appendFollowUpCommand
in interfaceTypedCommandWriter
-
reset
public void reset()
- Specified by:
reset
in interfaceTypedCommandWriter
-
flush
public long flush()
- Specified by:
flush
in interfaceTypedCommandWriter
- Returns:
- position of new record, negative value on failure
-
-