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 |
apiGroupVersion |
protected Reaper |
reaper |
apiGroup, apiVersion, client, config, JSON, JSON_MAPPER, JSON_PATCH, name, namespace, resourceT, YAML_MAPPER
Modifier | Constructor and Description |
---|---|
protected |
BaseOperation(okhttp3.OkHttpClient client,
Config config,
String apiGroup,
String apiVersion,
String resourceT,
String namespace,
String name,
Boolean cascading,
T item,
String resourceVersion,
Boolean reloadingFromServer,
Class<T> type,
Class<L> listType,
Class<D> doneableType) |
protected |
BaseOperation(okhttp3.OkHttpClient client,
Config config,
String apiGroup,
String apiVersion,
String resourceT,
String namespace,
String name,
Boolean cascading,
T item,
String resourceVersion,
Boolean reloadingFromServer,
long gracePeriodSeconds,
Map<String,String> labels,
Map<String,String> labelsNot,
Map<String,String[]> labelsIn,
Map<String,String[]> labelsNotIn,
Map<String,String> fields) |
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(okhttp3.OkHttpClient client, Config config, String apiGroup, String apiVersion, String resourceT, String namespace, String name, Boolean cascading, T item, String resourceVersion, Boolean reloadingFromServer, long gracePeriodSeconds, Map<String,String> labels, Map<String,String> labelsNot, Map<String,String[]> labelsIn, Map<String,String[]> labelsNotIn, Map<String,String> fields)
protected BaseOperation(okhttp3.OkHttpClient client, Config config, String apiGroup, String apiVersion, String resourceT, String namespace, String name, Boolean cascading, T item, String resourceVersion, Boolean reloadingFromServer, Class<T> type, Class<L> listType, Class<D> doneableType)
public T get()
public 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>>>
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> labels)
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>>>
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>
protected R createItemOperation(T item) throws InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException
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 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 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 Deletable<Boolean> withGracePeriod(long gracePeriodSeconds)
withGracePeriod
in interface GracePeriodConfigurable<Deletable<Boolean>>
protected void updateApiVersionResource(Object resource)
protected void updateApiVersion(io.fabric8.kubernetes.api.model.KubernetesResourceList list)
protected void updateApiVersion(io.fabric8.kubernetes.api.model.HasMetadata hasMetadata)
public String getApiGroupVersion()
public boolean isApiGroup()
public T waitUntilReady(long amount, TimeUnit timeUnit) throws InterruptedException
waitUntilReady
in interface Waitable<T>
InterruptedException
Copyright © 2015–2017 Red Hat. All rights reserved.