Class JobRequestMetadata

java.lang.Object
com.netflix.genie.common.internal.dtos.JobRequestMetadata
All Implemented Interfaces:
Serializable

public class JobRequestMetadata extends Object implements Serializable
Metadata gathered by the system as part of any JobRequest.
Since:
4.0.0
See Also:
  • Constructor Details

    • JobRequestMetadata

      public JobRequestMetadata(@Nullable ApiClientMetadata apiClientMetadata, @Nullable AgentClientMetadata agentClientMetadata, int numAttachments, long totalSizeOfAttachments, @Nullable Map<String,String> requestHeaders) throws IllegalArgumentException
      Constructor. One of apiClientMetadata or agentClientMetadata is required. Both cannot be present.
      Parameters:
      apiClientMetadata - The metadata about the client if this request was received via API
      agentClientMetadata - The metadata about the client if this request was received from the Agent
      numAttachments - The number of attachments that came with this job request
      totalSizeOfAttachments - The total size of the attachments that came with this job request
      requestHeaders - The map of HTTP headers (filtered upstream) if this request was received via API
      Throws:
      IllegalArgumentException - If both apiClientMetadata and agentClientMetadata are missing or both are present
  • Method Details

    • getApiClientMetadata

      public Optional<ApiClientMetadata> getApiClientMetadata()
      If the job request was sent via API this field will be populated.
      Returns:
      The API client metadata wrapped in an Optional
    • getAgentClientMetadata

      public Optional<AgentClientMetadata> getAgentClientMetadata()
      If the job request was sent via the Agent this field will be populated.
      Returns:
      The Agent client metadata wrapped in an Optional