Record Class IntakeIngressEnvelope
java.lang.Object
java.lang.Record
ai.pipeline.connector.intake.ingress.IntakeIngressEnvelope
- Record Components:
request- The original gRPC handoff request from the connectorsourceDocId- The document identifier from the source systemschemaVersion- Version of this envelope schemadatasourceId- The identifier of the datasourceaccountId- The identifier of the accountcrawlId- The identifier of the crawl sessiondocId- The Pipestream internal document identifierstreamId- The identifier of the ingestion streampayloadMode- Mode of the payload (e.g., inline, reference)retryCount- Number of times this request has been retriedacceptedAtMs- Epoch timestamp when the request was accepted
public record IntakeIngressEnvelope(ai.pipestream.engine.v1.IntakeHandoffRequest request, String sourceDocId, String schemaVersion, String datasourceId, String accountId, String crawlId, String docId, String streamId, String payloadMode, int retryCount, long acceptedAtMs)
extends Record
Redis Stream payload shared by connector-intake and the engine sidecar.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionIntakeIngressEnvelope(ai.pipestream.engine.v1.IntakeHandoffRequest request, String sourceDocId, String schemaVersion, String datasourceId, String accountId, String crawlId, String docId, String streamId, String payloadMode, int retryCount, long acceptedAtMs) Creates an instance of aIntakeIngressEnveloperecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of theacceptedAtMsrecord component.Returns the value of theaccountIdrecord component.crawlId()Returns the value of thecrawlIdrecord component.Returns the value of thedatasourceIdrecord component.docId()Returns the value of thedocIdrecord component.final booleanIndicates whether some other object is "equal to" this one.static IntakeIngressEnvelopefromRedisFields(Map<String, String> fields) Reconstruct an envelope from a map of Redis Stream fields.static IntakeIngressEnvelopefromRequest(ai.pipestream.engine.v1.IntakeHandoffRequest request, String sourceDocId) Create an envelope from a gRPC request and source document ID.final inthashCode()Returns a hash code value for this object.Returns the value of thepayloadModerecord component.ai.pipestream.engine.v1.IntakeHandoffRequestrequest()Returns the value of therequestrecord component.intReturns the value of theretryCountrecord component.Returns the value of theschemaVersionrecord component.Returns the value of thesourceDocIdrecord component.streamId()Returns the value of thestreamIdrecord component.Convert the envelope to a map of strings for storage in Redis Stream.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
FIELD_REQUEST
- See Also:
-
FIELD_SOURCE_DOC_ID
- See Also:
-
FIELD_SCHEMA_VERSION
- See Also:
-
FIELD_DATASOURCE_ID
- See Also:
-
FIELD_ACCOUNT_ID
- See Also:
-
FIELD_CRAWL_ID
- See Also:
-
FIELD_DOC_ID
- See Also:
-
FIELD_STREAM_ID
- See Also:
-
FIELD_PAYLOAD_MODE
- See Also:
-
FIELD_RETRY_COUNT
- See Also:
-
FIELD_ACCEPTED_AT_MS
- See Also:
-
-
Constructor Details
-
IntakeIngressEnvelope
public IntakeIngressEnvelope(ai.pipestream.engine.v1.IntakeHandoffRequest request, String sourceDocId, String schemaVersion, String datasourceId, String accountId, String crawlId, String docId, String streamId, String payloadMode, int retryCount, long acceptedAtMs) Creates an instance of aIntakeIngressEnveloperecord class.- Parameters:
request- the value for therequestrecord componentsourceDocId- the value for thesourceDocIdrecord componentschemaVersion- the value for theschemaVersionrecord componentdatasourceId- the value for thedatasourceIdrecord componentaccountId- the value for theaccountIdrecord componentcrawlId- the value for thecrawlIdrecord componentdocId- the value for thedocIdrecord componentstreamId- the value for thestreamIdrecord componentpayloadMode- the value for thepayloadModerecord componentretryCount- the value for theretryCountrecord componentacceptedAtMs- the value for theacceptedAtMsrecord component
-
-
Method Details
-
fromRequest
public static IntakeIngressEnvelope fromRequest(ai.pipestream.engine.v1.IntakeHandoffRequest request, String sourceDocId) Create an envelope from a gRPC request and source document ID.- Parameters:
request- The gRPC handoff requestsourceDocId- The source document ID- Returns:
- A new IntakeIngressEnvelope instance
-
toRedisFields
-
fromRedisFields
public static IntakeIngressEnvelope fromRedisFields(Map<String, String> fields) throws com.google.protobuf.InvalidProtocolBufferExceptionReconstruct an envelope from a map of Redis Stream fields.- Parameters:
fields- The map of fields from Redis- Returns:
- A reconstructed IntakeIngressEnvelope instance
- Throws:
com.google.protobuf.InvalidProtocolBufferException- if the request payload is corrupt
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
request
-
sourceDocId
Returns the value of thesourceDocIdrecord component.- Returns:
- the value of the
sourceDocIdrecord component
-
schemaVersion
Returns the value of theschemaVersionrecord component.- Returns:
- the value of the
schemaVersionrecord component
-
datasourceId
Returns the value of thedatasourceIdrecord component.- Returns:
- the value of the
datasourceIdrecord component
-
accountId
-
crawlId
-
docId
-
streamId
-
payloadMode
Returns the value of thepayloadModerecord component.- Returns:
- the value of the
payloadModerecord component
-
retryCount
public int retryCount()Returns the value of theretryCountrecord component.- Returns:
- the value of the
retryCountrecord component
-
acceptedAtMs
public long acceptedAtMs()Returns the value of theacceptedAtMsrecord component.- Returns:
- the value of the
acceptedAtMsrecord component
-