Class BatchResponse.Builder<T>
java.lang.Object
com.helixframework.api.contract.batch.BatchResponse.Builder<T>
- Type Parameters:
T- the type of the success items in the response
- Enclosing class:
- BatchResponse<T>
Builder class for creating BatchResponse objects.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a new instance of BatchResponse using the success and failure items added to the builder.failure(BatchFailure failure) Adds a failure item to the batch response.failure(Collection<BatchFailure> failures) Adds a collection of failure items to the batch response builder.success(Collection<T> successes) Adds a collection of success items to the batch response builder.Adds a success item to the batch response.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
success
Adds a success item to the batch response.- Parameters:
success- the success item to be added- Returns:
- the builder object
-
success
Adds a collection of success items to the batch response builder.- Parameters:
successes- the collection of success items to be added- Returns:
- the builder object
-
failure
Adds a failure item to the batch response.- Parameters:
failure- the failure item to be added- Returns:
- the builder object
-
failure
Adds a collection of failure items to the batch response builder.- Parameters:
failures- the collection of failure items to be added- Returns:
- the builder object
-
build
Builds a new instance of BatchResponse using the success and failure items added to the builder.- Returns:
- a new instance of BatchResponse
-