Class BatchResponse<T>
java.lang.Object
com.helixframework.api.contract.HateoasResponse
com.helixframework.api.contract.batch.BatchResponse<T>
- Type Parameters:
T- the type of the success items in the response
Represents a batch response for a collection of items.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class for creating BatchResponse objects. -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> BatchResponse.Builder<T>Returns a new instance of Builder for creating BatchResponse objects.getItems()Retrieves the batch items from the BatchResponse.Returns the status of the batch operation.Returns a BatchSummary object that contains the total number of items, the number of successful items, and the number of failed items.
-
Method Details
-
builder
Returns a new instance of Builder for creating BatchResponse objects.- Type Parameters:
T- the type of the success items in the response- Parameters:
clazz- the class of the success items in the response- Returns:
- a new instance of Builder
-
getStatus
Returns the status of the batch operation.- Returns:
- the status of the batch operation
-
getItems
Retrieves the batch items from the BatchResponse.- Returns:
- the batch items in the response
-
getSummary
Returns a BatchSummary object that contains the total number of items, the number of successful items, and the number of failed items.- Returns:
- a BatchSummary object representing the summary of the items in the batch response
-