public class BaseOperation<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList,D extends io.fabric8.kubernetes.api.model.Doneable<T>,R extends Resource<T,D>> extends OperationSupport implements OperationInfo, MixedOperation<T,L,D,R>, Resource<T,D>
| Modifier and Type | Field and Description |
|---|---|
protected String |
apiVersion |
protected Class<D> |
doneableType |
protected Class<L> |
listType |
protected Reaper |
reaper |
protected Class<T> |
type |
apiGroupName, apiGroupVersion, client, config, context, JSON, JSON_MAPPER, JSON_PATCH, name, namespace, resourceT, YAML_MAPPER| Modifier | Constructor and Description |
|---|---|
protected |
BaseOperation(OperationContext ctx) |
assertResponseCode, checkName, checkNamespace, createStatus, createStatus, getAPIGroup, getAPIVersion, getConfig, getName, getNamespace, getNamespacedUrl, getNamespacedUrl, getNamespacedUrl, getResourceUrl, getResourceUrl, getRootUrl, handleCreate, handleDelete, handleDelete, handleGet, handleGet, handlePatch, handleReplace, handleReplace, handleResponse, handleResponse, handleResponse, handleResponse, requestException, requestFailure, unmarshal, unmarshal, unmarshalclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetName, getNamespaceprotected BaseOperation(OperationContext ctx)
public BaseOperation<T,L,D,R> newInstance(OperationContext context)
public T get()
public T require() throws ResourceNotFoundException
require in interface Requirable<T>ResourceNotFoundException - if resource is absentpublic T getMandatory()
public io.fabric8.kubernetes.api.model.RootPaths getRootPaths()
public D edit() throws KubernetesClientException
edit in interface Editable<D extends io.fabric8.kubernetes.api.model.Doneable<T>>KubernetesClientExceptionpublic Replaceable<T,T> lockResourceVersion(String resourceVersion)
lockResourceVersion in interface Lockable<Replaceable<T,T>>public NonNamespaceOperation<T,L,D,R> inNamespace(String namespace)
inNamespace in interface Namespaceable<NonNamespaceOperation<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList,D extends io.fabric8.kubernetes.api.model.Doneable<T>,R extends Resource<T,D>>>public NonNamespaceOperation<T,L,D,R> inAnyNamespace()
inAnyNamespace in interface AnyNamespaceable<FilterWatchListMultiDeletable<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList,Boolean,Watch,Watcher<T>>>public EditReplacePatchDeletable<T,T,D,Boolean> cascading(boolean cascading)
public R load(InputStream is)
LoadableInputStream.public Gettable<T> fromServer()
fromServer in interface FromServerable<Gettable<T>>public T create(T... resources) 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 D createOrReplaceWithNew() throws KubernetesClientException
createOrReplaceWithNew in interface CreateOrReplaceable<T,T,D extends io.fabric8.kubernetes.api.model.Doneable<T>>KubernetesClientExceptionpublic T createOrReplace(T... items)
createOrReplace in interface CreateOrReplaceable<T,T,D extends io.fabric8.kubernetes.api.model.Doneable<T>>public FilterWatchListDeletable<T,L,Boolean,Watch,Watcher<T>> withLabels(Map<String,String> labels)
withLabels in interface Filterable<FilterWatchListDeletable<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList,Boolean,Watch,Watcher<T>>>public FilterWatchListDeletable<T,L,Boolean,Watch,Watcher<T>> withLabelSelector(io.fabric8.kubernetes.api.model.LabelSelector selector)
withLabelSelector in interface Filterable<FilterWatchListDeletable<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList,Boolean,Watch,Watcher<T>>>@Deprecated public FilterWatchListDeletable<T,L,Boolean,Watch,Watcher<T>> withoutLabels(Map<String,String> labels) throws KubernetesClientException
withoutLabels in interface Filterable<FilterWatchListDeletable<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList,Boolean,Watch,Watcher<T>>>KubernetesClientExceptionpublic FilterWatchListDeletable<T,L,Boolean,Watch,Watcher<T>> withLabelIn(String key, String... values) throws KubernetesClientException
withLabelIn in interface Filterable<FilterWatchListDeletable<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList,Boolean,Watch,Watcher<T>>>KubernetesClientExceptionpublic FilterWatchListDeletable<T,L,Boolean,Watch,Watcher<T>> withLabelNotIn(String key, String... values) throws KubernetesClientException
withLabelNotIn in interface Filterable<FilterWatchListDeletable<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList,Boolean,Watch,Watcher<T>>>KubernetesClientExceptionpublic FilterWatchListDeletable<T,L,Boolean,Watch,Watcher<T>> withLabel(String key, String value)
withLabel in interface Filterable<FilterWatchListDeletable<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList,Boolean,Watch,Watcher<T>>>public FilterWatchListDeletable<T,L,Boolean,Watch,Watcher<T>> withLabel(String key)
withLabel in interface Filterable<FilterWatchListDeletable<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList,Boolean,Watch,Watcher<T>>>public FilterWatchListDeletable<T,L,Boolean,Watch,Watcher<T>> withoutLabel(String key, String value)
withoutLabel in interface Filterable<FilterWatchListDeletable<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList,Boolean,Watch,Watcher<T>>>public FilterWatchListDeletable<T,L,Boolean,Watch,Watcher<T>> withoutLabel(String key)
withoutLabel in interface Filterable<FilterWatchListDeletable<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList,Boolean,Watch,Watcher<T>>>public FilterWatchListDeletable<T,L,Boolean,Watch,Watcher<T>> withFields(Map<String,String> fields)
withFields in interface Filterable<FilterWatchListDeletable<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList,Boolean,Watch,Watcher<T>>>public FilterWatchListDeletable<T,L,Boolean,Watch,Watcher<T>> withField(String key, String value)
withField in interface Filterable<FilterWatchListDeletable<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList,Boolean,Watch,Watcher<T>>>@Deprecated public FilterWatchListDeletable<T,L,Boolean,Watch,Watcher<T>> withoutFields(Map<String,String> fields) throws KubernetesClientException
withoutFields in interface Filterable<FilterWatchListDeletable<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList,Boolean,Watch,Watcher<T>>>KubernetesClientExceptionpublic FilterWatchListDeletable<T,L,Boolean,Watch,Watcher<T>> withoutField(String key, String value)
withoutField in interface Filterable<FilterWatchListDeletable<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList,Boolean,Watch,Watcher<T>>>public String getLabelQueryParam()
public String getFieldQueryParam()
public L list() throws KubernetesClientException
list in interface Listable<L extends io.fabric8.kubernetes.api.model.KubernetesResourceList>KubernetesClientExceptionpublic L list(Integer limitVal, String continueVal) throws KubernetesClientException
list in interface Listable<L extends io.fabric8.kubernetes.api.model.KubernetesResourceList>KubernetesClientExceptionpublic Boolean delete()
Deletablepublic Boolean delete(T... items)
delete in interface MultiDeleteable<T,Boolean>public Boolean delete(List<T> items)
delete in interface MultiDeleteable<T,Boolean>public Watchable<Watch,Watcher<T>> withResourceVersion(String resourceVersion)
withResourceVersion in interface Versionable<Watchable<Watch,Watcher<T>>>public Watch watch(Watcher<T> watcher) throws KubernetesClientException
public Watch watch(String resourceVersion, Watcher<T> watcher) throws KubernetesClientException
public Watch watch(String resourceVersion, Watcher<T> watcher, boolean deserializeWithoutTypeCheck) throws KubernetesClientException
KubernetesClientExceptionpublic boolean isResourceNamespaced()
isResourceNamespaced in class OperationSupportprotected T handleResponse(okhttp3.Request.Builder requestBuilder) 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 handlePatch(T current, T updated) throws ExecutionException, InterruptedException, KubernetesClientException, IOException
protected T handleGet(URL resourceUrl) throws InterruptedException, ExecutionException, IOException
public Boolean isCascading()
public T getItem()
public String getResourceVersion()
@Deprecated public Boolean getReloadingFromServer()
public Boolean isReloadingFromServer()
public Long getGracePeriodSeconds()
public String getPropagationPolicy()
public String getResourceT()
getResourceT in class OperationSupportprotected boolean isReaping()
protected void setReaping(boolean reaping)
public String getKind()
getKind in interface OperationInfopublic String getOperationType()
getOperationType in interface OperationInfopublic OperationInfo forOperationType(String type)
forOperationType in interface OperationInfopublic FilterWatchListDeletable<T,L,Boolean,Watch,Watcher<T>> withGracePeriod(long gracePeriodSeconds)
withGracePeriod in interface GracePeriodConfigurable<Deletable<Boolean>>public FilterWatchListDeletable<T,L,Boolean,Watch,Watcher<T>> withPropagationPolicy(String propagationPolicy)
withPropagationPolicy in interface PropagationPolicyConfigurable<Deletable<Boolean>>protected void updateApiVersionResource(Object resource)
resource - resource objectprotected void updateApiVersion(io.fabric8.kubernetes.api.model.KubernetesResourceList list)
list - Kubernetes resource listprotected void updateApiVersion(io.fabric8.kubernetes.api.model.HasMetadata hasMetadata)
hasMetadata - object whose api version needs to be updatedpublic String getApiVersion()
public boolean isApiGroup()
protected T waitUntilExists(long amount, TimeUnit timeUnit) throws InterruptedException
InterruptedExceptionpublic T waitUntilReady(long amount, TimeUnit timeUnit) throws InterruptedException
waitUntilReady in interface Waitable<T,T>InterruptedExceptionpublic T waitUntilCondition(Predicate<T> condition, long amount, TimeUnit timeUnit) throws InterruptedException
waitUntilCondition in interface Waitable<T,T>InterruptedExceptionpublic void setNamespace(String namespace)
Copyright © 2015–2019 Red Hat. All rights reserved.