Class Criterion.Builder
java.lang.Object
com.netflix.genie.common.internal.dtos.Criterion.Builder
- Enclosing class:
- Criterion
Builder for creating a Criterion instance.
- Since:
- 4.0.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build an immutable Criterion.Set the id of the resource (cluster, command, etc) to use.Set the name of the resource (cluster, command, etc) to search for.withStatus
(String status) Set the status to search for.Set the tags to use in the search.withVersion
(String version) Set the version of the resource (cluster, command, etc) to search for.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
withId
Set the id of the resource (cluster, command, etc) to use.- Parameters:
id
- The id- Returns:
- The builder
-
withName
Set the name of the resource (cluster, command, etc) to search for.- Parameters:
name
- The name of the resource- Returns:
- The builder
-
withVersion
Set the version of the resource (cluster, command, etc) to search for.- Parameters:
version
- The version of the resource- Returns:
- The builder
-
withStatus
Set the status to search for. Overrides default status of resource in search algorithm.- Parameters:
status
- The status to override the default with- Returns:
- The builder
-
withTags
Set the tags to use in the search.- Parameters:
tags
- The tags. Any blanks will be removed- Returns:
- The builder
-
build
Build an immutable Criterion. A precondition exception will be thrown if all of the fields are empty.- Returns:
- A criterion which is completely immutable.
- Throws:
IllegalArgumentException
- A valid Criterion must have at least one field populated
-