public class BaseOperation<C extends KubernetesClient,T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList,D extends io.fabric8.kubernetes.api.model.Doneable<T>,R extends ClientResource<T,D>> extends Object implements ClientMixedOperation<C,T,L,D,R>
| Modifier and Type | Field and Description |
|---|---|
protected static com.fasterxml.jackson.databind.ObjectMapper |
mapper |
| Modifier | Constructor and Description |
|---|---|
protected |
BaseOperation(C client,
String resourceT,
String namespace,
String name) |
protected |
BaseOperation(C client,
String resourceT,
String namespace,
String name,
Class<T> clientType,
Class<T> type,
Class<L> listType,
Class<D> doneableType) |
public T get()
public D edit() throws KubernetesClientException
edit in interface Editable<D extends io.fabric8.kubernetes.api.model.Doneable<T>>KubernetesClientExceptionpublic D edit(boolean cascade) throws KubernetesClientException
edit in interface EditCascadeable<D extends io.fabric8.kubernetes.api.model.Doneable<T>>KubernetesClientExceptionpublic ClientNonNamespaceOperation<C,T,L,D,R> inNamespace(String namespace)
inNamespace in interface Namespaceable<ClientNonNamespaceOperation<C extends KubernetesClient,T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList,D extends io.fabric8.kubernetes.api.model.Doneable<T>,R extends ClientResource<T,D>>>public T create(T resource) throws KubernetesClientException
create in interface Createable<T,T,D extends io.fabric8.kubernetes.api.model.Doneable<T>>KubernetesClientExceptionpublic D createNew() throws KubernetesClientException
createNew in interface Createable<T,T,D extends io.fabric8.kubernetes.api.model.Doneable<T>>KubernetesClientExceptionpublic FilterWatchListDeleteable<T,L,Boolean> withLabels(Map<String,String> labels)
withLabels in interface Filterable<FilterWatchListDeleteable<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList,Boolean>>public FilterWatchListDeleteable<T,L,Boolean> withoutLabels(Map<String,String> labels) throws KubernetesClientException
withoutLabels in interface Filterable<FilterWatchListDeleteable<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList,Boolean>>KubernetesClientExceptionpublic FilterWatchListDeleteable<T,L,Boolean> withLabelIn(String key, String... values) throws KubernetesClientException
withLabelIn in interface Filterable<FilterWatchListDeleteable<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList,Boolean>>KubernetesClientExceptionpublic FilterWatchListDeleteable<T,L,Boolean> withLabelNotIn(String key, String... values) throws KubernetesClientException
withLabelNotIn in interface Filterable<FilterWatchListDeleteable<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList,Boolean>>KubernetesClientExceptionpublic FilterWatchListDeleteable<T,L,Boolean> withLabel(String key, String value)
withLabel in interface Filterable<FilterWatchListDeleteable<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList,Boolean>>public FilterWatchListDeleteable<T,L,Boolean> withoutLabel(String key, String value) throws KubernetesClientException
withoutLabel in interface Filterable<FilterWatchListDeleteable<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList,Boolean>>KubernetesClientExceptionpublic FilterWatchListDeleteable<T,L,Boolean> withFields(Map<String,String> labels)
withFields in interface Filterable<FilterWatchListDeleteable<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList,Boolean>>public FilterWatchListDeleteable<T,L,Boolean> withField(String key, String value)
withField in interface Filterable<FilterWatchListDeleteable<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList,Boolean>>public L list() throws KubernetesClientException
list in interface Listable<L extends io.fabric8.kubernetes.api.model.KubernetesResourceList>KubernetesClientExceptionpublic Boolean delete()
Deleteabledelete in interface Deleteable<Boolean>public Boolean delete(boolean cascade)
DeleteCascadeabledelete in interface DeleteCascadeable<Boolean>public com.ning.http.client.ws.WebSocket watch(Watcher<T> watcher) throws KubernetesClientException
watch in interface Watchable<T>KubernetesClientExceptionpublic T update(T item, boolean cascade)
update in interface UpdateCascadeable<T,T>public T replace(T item, boolean cascade)
replace in interface ReplaceCascadeable<T,T>protected URL getNamespacedUrl() throws MalformedURLException
MalformedURLExceptionprotected URL getResourceUrl() throws MalformedURLException
MalformedURLExceptionprotected T handleResponse(com.ning.http.client.AsyncHttpClient.BoundRequestBuilder requestBuilder, int successStatusCode) throws ExecutionException, InterruptedException, KubernetesClientException, IOException
protected void handleDelete(URL requestUrl) throws ExecutionException, InterruptedException, KubernetesClientException, IOException
protected T handleCreate(T resource) throws ExecutionException, InterruptedException, KubernetesClientException, IOException
protected T handleReplace(URL resourceUrl, T updated) throws ExecutionException, InterruptedException, KubernetesClientException, IOException
protected T handleGet(URL resourceUrl) throws ExecutionException, InterruptedException, KubernetesClientException, IOException
public URL getRootUrl()
public String getName()
public String getNamespace()
public String getResourceT()
public C getClient()
getClient in interface ClientAware<C extends KubernetesClient>Copyright © 2015 Red Hat. All rights reserved.