public class BaseOperation<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList,D extends io.fabric8.kubernetes.api.model.Doneable<T>,R extends ClientResource<T,D>> extends OperationSupport implements ClientMixedOperation<T,L,D,R>
Modifier and Type | Field and Description |
---|---|
protected Reaper |
reaper |
client, config, JSON, JSON_MAPPER, name, namespace, resourceT, YAML_MAPPER
Modifier | Constructor and Description |
---|---|
protected |
BaseOperation(com.squareup.okhttp.OkHttpClient client,
Config config,
String resourceT,
String namespace,
String name,
Boolean cascading,
T item) |
protected |
BaseOperation(com.squareup.okhttp.OkHttpClient client,
Config config,
String resourceT,
String namespace,
String name,
Boolean cascading,
T item,
Class<T> type,
Class<L> listType,
Class<D> doneableType) |
assertResponseCode, checkName, checkNamespace, getConfig, getName, getNamespace, getNamespacedUrl, getNamespacedUrl, getResourceUrl, getResourceUrl, getRootUrl, handleCreate, handleDelete, handleDelete, handleGet, handleReplace, handleResponse, unmarshal
protected Reaper reaper
protected BaseOperation(com.squareup.okhttp.OkHttpClient client, Config config, String resourceT, String namespace, String name, Boolean cascading, T item)
public T get()
public io.fabric8.kubernetes.api.model.RootPaths getRootPaths()
public T getMandatory()
public D edit() throws KubernetesClientException
edit
in interface Editable<D extends io.fabric8.kubernetes.api.model.Doneable<T>>
KubernetesClientException
public ClientNonNamespaceOperation<T,L,D,R> inNamespace(String namespace)
inNamespace
in interface Namespaceable<ClientNonNamespaceOperation<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList,D extends io.fabric8.kubernetes.api.model.Doneable<T>,R extends ClientResource<T,D>>>
public ClientNonNamespaceOperation<T,L,D,R> inAnyNamespace()
inAnyNamespace
in interface AnyNamespaceable<FilterWatchListMultiDeletable<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList,Boolean>>
public EditReplaceDeletable<T,T,D,Boolean> cascading(boolean enabled)
public R load(InputStream is)
load
in interface Loadable<InputStream,R extends ClientResource<T,D>>
public T create(T... resources) throws KubernetesClientException
create
in interface Createable<T,T,D extends io.fabric8.kubernetes.api.model.Doneable<T>>
KubernetesClientException
public D createNew() throws KubernetesClientException
createNew
in interface Createable<T,T,D extends io.fabric8.kubernetes.api.model.Doneable<T>>
KubernetesClientException
public FilterWatchListDeletable<T,L,Boolean> withLabels(Map<String,String> labels)
withLabels
in interface Filterable<FilterWatchListDeletable<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList,Boolean>>
public FilterWatchListDeletable<T,L,Boolean> withoutLabels(Map<String,String> labels) throws KubernetesClientException
withoutLabels
in interface Filterable<FilterWatchListDeletable<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList,Boolean>>
KubernetesClientException
public FilterWatchListDeletable<T,L,Boolean> withLabelIn(String key, String... values) throws KubernetesClientException
withLabelIn
in interface Filterable<FilterWatchListDeletable<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList,Boolean>>
KubernetesClientException
public FilterWatchListDeletable<T,L,Boolean> withLabelNotIn(String key, String... values) throws KubernetesClientException
withLabelNotIn
in interface Filterable<FilterWatchListDeletable<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList,Boolean>>
KubernetesClientException
public FilterWatchListDeletable<T,L,Boolean> withLabel(String key, String value)
withLabel
in interface Filterable<FilterWatchListDeletable<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList,Boolean>>
public FilterWatchListDeletable<T,L,Boolean> withoutLabel(String key, String value) throws KubernetesClientException
withoutLabel
in interface Filterable<FilterWatchListDeletable<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList,Boolean>>
KubernetesClientException
public FilterWatchListDeletable<T,L,Boolean> withFields(Map<String,String> labels)
withFields
in interface Filterable<FilterWatchListDeletable<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList,Boolean>>
public FilterWatchListDeletable<T,L,Boolean> withField(String key, String value)
withField
in interface Filterable<FilterWatchListDeletable<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList,Boolean>>
public String getLabelQueryParam()
public String getFieldQueryParam()
public L list() throws KubernetesClientException
list
in interface Listable<L extends io.fabric8.kubernetes.api.model.KubernetesResourceList>
KubernetesClientException
public Boolean delete()
Deletable
public Boolean delete(T... items)
delete
in interface MultiDeleteable<T,Boolean>
public Boolean delete(List<T> items)
delete
in interface MultiDeleteable<T,Boolean>
public Watch watch(Watcher<T> watcher) throws KubernetesClientException
watch
in interface Watchable<T>
KubernetesClientException
public Watch watch(String resourceVersion, Watcher<T> watcher) throws KubernetesClientException
watch
in interface Watchable<T>
KubernetesClientException
public boolean isNamespaceRequired()
isNamespaceRequired
in class OperationSupport
protected T handleResponse(com.squareup.okhttp.Request.Builder requestBuilder, int successStatusCode) throws ExecutionException, InterruptedException, KubernetesClientException, IOException
protected T handleCreate(T resource) throws ExecutionException, InterruptedException, KubernetesClientException, IOException
protected T handleReplace(T updated) throws ExecutionException, InterruptedException, KubernetesClientException, IOException
protected T handleGet(URL resourceUrl) throws InterruptedException, ExecutionException, IOException
public Boolean isCascading()
public T getItem()
public String getResourceT()
getResourceT
in class OperationSupport
protected boolean isReaping()
protected void setReaping(boolean reaping)
Copyright © 2015 Red Hat. All rights reserved.