public static class QueryService.Builder
extends java.lang.Object
QueryService
.Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
QueryService.Builder |
add(BoundedContext context)
Adds the passed bounded context to be served by the query service.
|
QueryService |
build()
Builds the
QueryService . |
boolean |
contains(BoundedContext context)
Tells if the builder already contains the passed bounded context.
|
QueryService.Builder |
remove(BoundedContext context)
Excludes the passed bounded context from being served by the query service.
|
@CanIgnoreReturnValue public QueryService.Builder add(BoundedContext context)
@CanIgnoreReturnValue public QueryService.Builder remove(BoundedContext context)
public boolean contains(BoundedContext context)
public QueryService build() throws java.lang.IllegalStateException
QueryService
.java.lang.IllegalStateException
- if no bounded contexts were added.