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, unmarshal
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getName, getNamespace
protected 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>>
KubernetesClientException
public 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)
Loadable
InputStream
.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>>
KubernetesClientException
public D createNew() throws KubernetesClientException
createNew
in interface Createable<T,T,D extends io.fabric8.kubernetes.api.model.Doneable<T>>
KubernetesClientException
public D createOrReplaceWithNew() throws KubernetesClientException
createOrReplaceWithNew
in interface CreateOrReplaceable<T,T,D extends io.fabric8.kubernetes.api.model.Doneable<T>>
KubernetesClientException
public 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>>>
KubernetesClientException
public 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>>>
KubernetesClientException
public 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>>>
KubernetesClientException
public 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>>>
KubernetesClientException
public 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>
KubernetesClientException
public L list(Integer limitVal, String continueVal) 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 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
KubernetesClientException
public boolean isResourceNamespaced()
isResourceNamespaced
in class OperationSupport
protected 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 OperationSupport
protected boolean isReaping()
protected void setReaping(boolean reaping)
public String getKind()
getKind
in interface OperationInfo
public String getOperationType()
getOperationType
in interface OperationInfo
public OperationInfo forOperationType(String type)
forOperationType
in interface OperationInfo
public 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
InterruptedException
public T waitUntilReady(long amount, TimeUnit timeUnit) throws InterruptedException
waitUntilReady
in interface Waitable<T,T>
InterruptedException
public T waitUntilCondition(Predicate<T> condition, long amount, TimeUnit timeUnit) throws InterruptedException
waitUntilCondition
in interface Waitable<T,T>
InterruptedException
public void setNamespace(String namespace)
Copyright © 2015–2019 Red Hat. All rights reserved.