Class ExternalEventState
-
- All Implemented Interfaces:
-
java.io.Externalizable
,java.io.Serializable
,java.lang.Comparable
,org.apache.avro.generic.GenericContainer
,org.apache.avro.generic.GenericRecord
,org.apache.avro.generic.IndexedRecord
,org.apache.avro.specific.SpecificRecord
public class ExternalEventState extends SpecificRecordBase implements SpecificRecord
ExternalEventState contains the information required to send an external event and receive a response.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
ExternalEventState.Builder
RecordBuilder for ExternalEventState instances.
-
Field Summary
Fields Modifier and Type Field Description public final static Schema
SCHEMA$
public String
requestId
public ExternalEventStateStatus
status
public ExternalEvent
eventToSend
public int
retries
public String
factoryClassName
public Instant
sendTimestamp
public ExternalEventResponse
response
-
Constructor Summary
Constructors Constructor Description ExternalEventState()
Default constructor. ExternalEventState(String requestId, ExternalEventStateStatus status, ExternalEvent eventToSend, Integer retries, String factoryClassName, Instant sendTimestamp, ExternalEventResponse response)
All-args constructor.
-
Method Summary
Modifier and Type Method Description String
getRequestId()
Gets the value of the 'requestId' field. void
setRequestId(String value)
Sets the value of the 'requestId' field. ExternalEventStateStatus
getStatus()
Gets the value of the 'status' field. void
setStatus(ExternalEventStateStatus value)
Sets the value of the 'status' field. ExternalEvent
getEventToSend()
Gets the value of the 'eventToSend' field. void
setEventToSend(ExternalEvent value)
Sets the value of the 'eventToSend' field. int
getRetries()
Gets the value of the 'retries' field. void
setRetries(int value)
Sets the value of the 'retries' field. String
getFactoryClassName()
Gets the value of the 'factoryClassName' field. void
setFactoryClassName(String value)
Sets the value of the 'factoryClassName' field. Instant
getSendTimestamp()
Gets the value of the 'sendTimestamp' field. void
setSendTimestamp(Instant value)
Sets the value of the 'sendTimestamp' field. ExternalEventResponse
getResponse()
Gets the value of the 'response' field. void
setResponse(ExternalEventResponse value)
Sets the value of the 'response' field. static Schema
getClassSchema()
static BinaryMessageEncoder<ExternalEventState>
getEncoder()
Return the BinaryMessageEncoder instance used by this class. static BinaryMessageDecoder<ExternalEventState>
getDecoder()
Return the BinaryMessageDecoder instance used by this class. static BinaryMessageDecoder<ExternalEventState>
createDecoder(SchemaStore resolver)
Create a new BinaryMessageDecoder instance for this class that uses the specified SchemaStore. ByteBuffer
toByteBuffer()
Serializes this ExternalEventState to a ByteBuffer. static ExternalEventState
fromByteBuffer(ByteBuffer b)
Deserializes a ExternalEventState from a ByteBuffer. SpecificData
getSpecificData()
Schema
getSchema()
Object
get(int field$)
void
put(int field$, Object value$)
static ExternalEventState.Builder
newBuilder()
Creates a new ExternalEventState RecordBuilder. static ExternalEventState.Builder
newBuilder(ExternalEventState.Builder other)
Creates a new ExternalEventState RecordBuilder by copying an existing Builder. static ExternalEventState.Builder
newBuilder(ExternalEventState other)
Creates a new ExternalEventState RecordBuilder by copying an existing ExternalEventState instance. void
writeExternal(ObjectOutput out)
void
readExternal(ObjectInput in)
-
Methods inherited from class org.apache.avro.specific.SpecificRecordBase
compareTo, customDecode, customEncode, equals, getConversion, hashCode, toString
-
Methods inherited from class org.apache.avro.generic.GenericRecord
hasField
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
ExternalEventState
ExternalEventState()
Default constructor.
-
ExternalEventState
ExternalEventState(String requestId, ExternalEventStateStatus status, ExternalEvent eventToSend, Integer retries, String factoryClassName, Instant sendTimestamp, ExternalEventResponse response)
All-args constructor.- Parameters:
requestId
- Unique ID of a single request.status
- Status of the state.eventToSend
- The event to sendretries
- The amount of times the request has been sent.factoryClassName
- The name of the factory to use when resuming the flow.sendTimestamp
- Timestamp of when to send a message.response
- The response received from the external worker.
-
-
Method Detail
-
getRequestId
String getRequestId()
Gets the value of the 'requestId' field.
-
setRequestId
void setRequestId(String value)
Sets the value of the 'requestId' field. Unique ID of a single request. The ID remains the same for each resend.
- Parameters:
value
- the value to set.
-
getStatus
ExternalEventStateStatus getStatus()
Gets the value of the 'status' field.
-
setStatus
void setStatus(ExternalEventStateStatus value)
Sets the value of the 'status' field. Status of the state.
- Parameters:
value
- the value to set.
-
getEventToSend
ExternalEvent getEventToSend()
Gets the value of the 'eventToSend' field.
-
setEventToSend
void setEventToSend(ExternalEvent value)
Sets the value of the 'eventToSend' field. The event to send
- Parameters:
value
- the value to set.
-
getRetries
int getRetries()
Gets the value of the 'retries' field.
-
setRetries
void setRetries(int value)
Sets the value of the 'retries' field. The amount of times the request has been sent.
- Parameters:
value
- the value to set.
-
getFactoryClassName
String getFactoryClassName()
Gets the value of the 'factoryClassName' field.
-
setFactoryClassName
void setFactoryClassName(String value)
Sets the value of the 'factoryClassName' field. The name of the factory to use when resuming the flow.
- Parameters:
value
- the value to set.
-
getSendTimestamp
Instant getSendTimestamp()
Gets the value of the 'sendTimestamp' field.
-
setSendTimestamp
void setSendTimestamp(Instant value)
Sets the value of the 'sendTimestamp' field. Timestamp of when to send a message. If this time is in the past, then the message needs to be (re)sent.
- Parameters:
value
- the value to set.
-
getResponse
ExternalEventResponse getResponse()
Gets the value of the 'response' field.
-
setResponse
void setResponse(ExternalEventResponse value)
Sets the value of the 'response' field. The response received from the external worker.
- Parameters:
value
- the value to set.
-
getClassSchema
static Schema getClassSchema()
-
getEncoder
static BinaryMessageEncoder<ExternalEventState> getEncoder()
Return the BinaryMessageEncoder instance used by this class.
-
getDecoder
static BinaryMessageDecoder<ExternalEventState> getDecoder()
Return the BinaryMessageDecoder instance used by this class.
-
createDecoder
static BinaryMessageDecoder<ExternalEventState> createDecoder(SchemaStore resolver)
Create a new BinaryMessageDecoder instance for this class that uses the specified SchemaStore.
- Parameters:
resolver
- a SchemaStore used to find schemas by fingerprint
-
toByteBuffer
ByteBuffer toByteBuffer()
Serializes this ExternalEventState to a ByteBuffer.
-
fromByteBuffer
static ExternalEventState fromByteBuffer(ByteBuffer b)
Deserializes a ExternalEventState from a ByteBuffer.
- Parameters:
b
- a byte buffer holding serialized data for an instance of this class
-
getSpecificData
SpecificData getSpecificData()
-
getSchema
Schema getSchema()
-
newBuilder
static ExternalEventState.Builder newBuilder()
Creates a new ExternalEventState RecordBuilder.
-
newBuilder
static ExternalEventState.Builder newBuilder(ExternalEventState.Builder other)
Creates a new ExternalEventState RecordBuilder by copying an existing Builder.
- Parameters:
other
- The existing builder to copy.
-
newBuilder
static ExternalEventState.Builder newBuilder(ExternalEventState other)
Creates a new ExternalEventState RecordBuilder by copying an existing ExternalEventState instance.
- Parameters:
other
- The existing instance to copy.
-
writeExternal
void writeExternal(ObjectOutput out)
-
readExternal
void readExternal(ObjectInput in)
-
-
-
-