public interface ListTasksCmd extends SyncDockerCmd<List<Task>>
Modifier and Type | Interface and Description |
---|---|
static interface |
ListTasksCmd.Exec |
Modifier and Type | Method and Description |
---|---|
List<Task> |
exec() |
Map<String,List<String>> |
getFilters() |
ListTasksCmd |
withIdFilter(String... ids) |
ListTasksCmd |
withLabelFilter(Map<String,String> labels) |
ListTasksCmd |
withLabelFilter(String... labels) |
ListTasksCmd |
withNameFilter(String... names) |
ListTasksCmd |
withNodeFilter(String... nodeNames) |
ListTasksCmd |
withServiceFilter(String... serviceNames) |
ListTasksCmd |
withStateFilter(TaskState... desiredState) |
@CheckForNull Map<String,List<String>> getFilters()
ListTasksCmd withLabelFilter(Map<String,String> labels)
labels
- - Show only tasks with the passed labels.
Labels is a Map
that contains label keys and valuesListTasksCmd withLabelFilter(String... labels)
labels
- - Show only tasks with the passed labels.ListTasksCmd withIdFilter(String... ids)
ids
- Task id(s)ListTasksCmd withNameFilter(String... names)
names
- Task name(s)ListTasksCmd withNodeFilter(String... nodeNames)
nodeNames
- Node id(s) or name(s)ListTasksCmd withServiceFilter(String... serviceNames)
serviceNames
- Service name(s)ListTasksCmd withStateFilter(TaskState... desiredState)
desiredState
- The desired-state filter can take the values running, shutdown, or accepted.List<Task> exec() throws NotFoundException
exec
in interface SyncDockerCmd<List<Task>>
NotFoundException
Copyright © 2021. All rights reserved.