T - the resource typepublic abstract class ExtensibleResourceAdapter<T> extends ResourceAdapter<T> implements ExtensibleResource<T>
FieldValidateable.Validation| Modifier and Type | Field and Description |
|---|---|
protected Client |
client |
protected ExtensibleResource<T> |
resource |
| Constructor and Description |
|---|
ExtensibleResourceAdapter() |
| Modifier and Type | Method and Description |
|---|---|
ExtensibleResource<T> |
dryRun(boolean isDryRun)
Indicates whether modifications should not be persisted or not.
|
ExtensibleResource<T> |
fieldManager(String manager)
FieldManager is a name associated with the actor or entity that is making these changes.
|
ExtensibleResource<T> |
fieldValidation(FieldValidateable.Validation fieldValidation)
Instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields,
provided that the `ServerSideFieldValidation` feature gate is also enabled.
|
ExtensibleResource<T> |
forceConflicts()
Force this request / fieldManager to take ownership over conflicting fields.
|
ExtensibleResource<T> |
fromServer() |
T |
getItem()
Return the current item, which may be null if the resource was created
using
Nameable.withName(String) |
ExtensibleResourceAdapter<T> |
init(ExtensibleResource<T> resource,
Client client) |
<C extends Client> |
inWriteContext(Class<C> clazz)
Should be used to obtain a client in the same write context as the given resource
- dryRun, DeletionPropagation, etc.
|
ExtensibleResource<T> |
lockResourceVersion() |
ExtensibleResource<T> |
lockResourceVersion(String resourceVersion) |
abstract ExtensibleResourceAdapter<T> |
newInstance() |
ExtensibleResource<T> |
subresource(String subresource)
Provides edit, patch, and replace methods for the given subresource
|
ExtensibleResource<T> |
unlock()
Removes the resource version from the current item.
|
ExtensibleResource<T> |
withGracePeriod(long gracePeriodSeconds)
The duration in seconds before the object should be deleted.
|
ExtensibleResource<T> |
withIndexers(Map<String,Function<T,List<String>>> indexers)
The indexers to add to
SharedIndexInformers created by subsequent inform calls; |
ExtensibleResource<T> |
withLimit(Long limit)
Set the limit to the number of resources to list at one time.
|
ExtensibleResource<T> |
withPropagationPolicy(io.fabric8.kubernetes.api.model.DeletionPropagation propagationPolicy)
Whether and how garbage collection will be performed.
|
ExtensibleResource<T> |
withResourceVersion(String resourceVersion) |
ExtensibleResource<T> |
withTimeout(long timeout,
TimeUnit unit)
Perform the delete operation as blocking, waiting for finalizers, for up to the given timeout
|
ExtensibleResource<T> |
withTimeoutInMillis(long timeoutInMillis)
Perform the delete operation as blocking, waiting for finalizers, for up to the given timeout
|
accept, create, create, createOr, createOrReplace, createOrReplace, delete, delete, dryRun, edit, edit, edit, editStatus, get, getResource, inform, inform, inform, informOnCondition, isReady, item, patch, patch, patch, patch, patch, patch, patchStatus, patchStatus, replace, replace, replaceStatus, replaceStatus, require, runnableInformer, scale, scale, scale, scale, serverSideApply, update, updateStatus, updateStatus, waitUntilCondition, waitUntilReady, watch, watch, watchclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitscalecascading, isReady, item, requirewaitUntilCondition, waitUntilReadycreateOr, editStatus, patchStatuscreate, createOrReplacereplaceStatus, updateStatusaccept, edit, edit, edit, patch, patch, patch, patch, patch, patchcreate, createOrReplace, delete, patchStatus, updateStatusreplace, replaceStatusserverSideApplydryRuninform, inform, inform, informOnCondition, runnableInformerprotected ExtensibleResource<T> resource
protected Client client
public abstract ExtensibleResourceAdapter<T> newInstance()
public ExtensibleResourceAdapter<T> init(ExtensibleResource<T> resource, Client client)
public ExtensibleResource<T> lockResourceVersion(String resourceVersion)
lockResourceVersion in interface Resource<T>lockResourceVersion in interface ExtensibleResource<T>lockResourceVersion in class ResourceAdapter<T>public ExtensibleResource<T> withResourceVersion(String resourceVersion)
withResourceVersion in interface WatchAndWaitable<T>withResourceVersion in interface ExtensibleResource<T>withResourceVersion in class ResourceAdapter<T>public ExtensibleResource<T> fromServer()
fromServer in interface ExtensibleResource<T>fromServer in interface FromServerGettable<T>fromServer in class ResourceAdapter<T>public ExtensibleResource<T> withGracePeriod(long gracePeriodSeconds)
GracePeriodConfigurablewithGracePeriod in interface ExtensibleResource<T>withGracePeriod in interface GracePeriodConfigurable<PropagationPolicyConfigurable<? extends Deletable>>withGracePeriod in class ResourceAdapter<T>gracePeriodSeconds - grace period integer value in secondspublic ExtensibleResource<T> withPropagationPolicy(io.fabric8.kubernetes.api.model.DeletionPropagation propagationPolicy)
PropagationPolicyConfigurableThe default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.
Acceptable values are:
'Orphan' - orphan the dependents;
'Background' - allow the garbage collector to delete the dependents in the background;
'Foreground' - a cascading policy that deletes all dependents in the foreground.
withPropagationPolicy in interface ExtensibleResource<T>withPropagationPolicy in interface PropagationPolicyConfigurable<GracePeriodConfigurable<? extends Deletable>>withPropagationPolicy in class ResourceAdapter<T>propagationPolicy - propagation policy in form of string DeletionPropagationpublic ExtensibleResource<T> withIndexers(Map<String,Function<T,List<String>>> indexers)
InformableSharedIndexInformers created by subsequent inform calls;withIndexers in interface Informable<T>withIndexers in interface ExtensibleResource<T>withIndexers in class ResourceAdapter<T>indexers - to customize the indexingInformablepublic ExtensibleResource<T> dryRun(boolean isDryRun)
DryRunabledryRun in interface DryRunable<WritableOperation<T>>dryRun in interface ExtensibleResource<T>dryRun in class ResourceAdapter<T>isDryRun - whether dry run is enabled or disabledpublic ExtensibleResource<T> withLimit(Long limit)
InformableIf the list fails to complete it will be re-attempted with this limit, rather than falling back to the full list. You should ensure that your handlers are either async or fast acting to prevent long delays in list processing that may cause results to expire before reaching the end of the list.
WARNING As noted in the go client: "paginated lists are always served directly from etcd, which is significantly less efficient and may lead to serious performance and scalability problems."
withLimit in interface Informable<T>withLimit in interface ExtensibleResource<T>withLimit in class ResourceAdapter<T>limit - of a items in a list fetchInformablepublic <C extends Client> C inWriteContext(Class<C> clazz)
ExtensibleResourceinWriteContext in interface ExtensibleResource<T>clazz - client typepublic ExtensibleResource<T> lockResourceVersion()
lockResourceVersion in interface Resource<T>lockResourceVersion in interface ExtensibleResource<T>lockResourceVersion in class ResourceAdapter<T>public T getItem()
ExtensibleResourceNameable.withName(String)getItem in interface ExtensibleResource<T>public ExtensibleResource<T> fieldValidation(FieldValidateable.Validation fieldValidation)
FieldValidateablefieldValidation in interface FieldValidateable<NonDeletingOperation<T>>fieldValidation in interface ExtensibleResource<T>fieldValidation in class ResourceAdapter<T>public ExtensibleResource<T> fieldManager(String manager)
ServerSideApplicableThe value must be less than or 128 characters long, and only contain printable characters
the default value is "fabric8"
fieldManager in interface ServerSideApplicable<T>fieldManager in interface ExtensibleResource<T>fieldManager in class ResourceAdapter<T>ServerSideApplicable for continued operationspublic ExtensibleResource<T> forceConflicts()
ServerSideApplicableforceConflicts in interface ServerSideApplicable<T>forceConflicts in interface ExtensibleResource<T>forceConflicts in class ResourceAdapter<T>ServerSideApplicable for continued operationspublic ExtensibleResource<T> withTimeout(long timeout, TimeUnit unit)
DeletablewithTimeout in interface DeletablewithTimeout in interface TimeoutablewithTimeout in interface TimeoutableScalable<T>withTimeout in interface ExtensibleResource<T>withTimeout in class ResourceAdapter<T>timeout - 0 indicates no waitpublic ExtensibleResource<T> withTimeoutInMillis(long timeoutInMillis)
DeletablewithTimeoutInMillis in interface DeletablewithTimeoutInMillis in interface TimeoutablewithTimeoutInMillis in interface TimeoutableScalable<T>withTimeoutInMillis in interface ExtensibleResource<T>withTimeoutInMillis in class ResourceAdapter<T>timeoutInMillis - 0 indicates no waitpublic ExtensibleResource<T> unlock()
NonDeletingOperationunlock in interface NonDeletingOperation<T>unlock in interface ExtensibleResource<T>unlock in class ResourceAdapter<T>public ExtensibleResource<T> subresource(String subresource)
NonDeletingOperationsubresource in interface NonDeletingOperation<T>subresource in interface ExtensibleResource<T>subresource in class ResourceAdapter<T>Copyright © 2015–2024 Red Hat. All rights reserved.