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> |
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
SharedIndexInformer s 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, 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, watch
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
scale
cascading, isReady, item, require
waitUntilCondition, waitUntilReady
create, createOrReplace
accept, edit, edit, edit, editStatus, patch, patch, patch, patch, patch, patch, patchStatus
replace, replaceStatus, update, updateStatus
create, createOrReplace, delete, patchStatus, updateStatus
replace, replaceStatus
serverSideApply
dryRun
inform, inform, inform, informOnCondition, runnableInformer
protected 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)
GracePeriodConfigurable
withGracePeriod
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)
PropagationPolicyConfigurable
The 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 DeletionPropagation
public ExtensibleResource<T> withIndexers(Map<String,Function<T,List<String>>> indexers)
Informable
SharedIndexInformer
s created by subsequent inform calls;withIndexers
in interface Informable<T>
withIndexers
in interface ExtensibleResource<T>
withIndexers
in class ResourceAdapter<T>
indexers
- to customize the indexingInformable
public ExtensibleResource<T> dryRun(boolean isDryRun)
DryRunable
dryRun
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)
Informable
If 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 fetchInformable
public <C extends Client> C inWriteContext(Class<C> clazz)
ExtensibleResource
inWriteContext
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()
ExtensibleResource
Nameable.withName(String)
getItem
in interface ExtensibleResource<T>
public ExtensibleResource<T> fieldValidation(FieldValidateable.Validation fieldValidation)
FieldValidateable
fieldValidation
in interface FieldValidateable<NonDeletingOperation<T>>
fieldValidation
in interface ExtensibleResource<T>
fieldValidation
in class ResourceAdapter<T>
public ExtensibleResource<T> fieldManager(String manager)
ServerSideApplicable
The 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()
ServerSideApplicable
forceConflicts
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)
Deletable
withTimeout
in interface Deletable
withTimeout
in interface Timeoutable
withTimeout
in interface TimeoutableScalable<T>
withTimeout
in interface ExtensibleResource<T>
withTimeout
in class ResourceAdapter<T>
timeout
- 0 indicates no waitpublic ExtensibleResource<T> withTimeoutInMillis(long timeoutInMillis)
Deletable
withTimeoutInMillis
in interface Deletable
withTimeoutInMillis
in interface Timeoutable
withTimeoutInMillis
in interface TimeoutableScalable<T>
withTimeoutInMillis
in interface ExtensibleResource<T>
withTimeoutInMillis
in class ResourceAdapter<T>
timeoutInMillis
- 0 indicates no waitCopyright © 2015–2023 Red Hat. All rights reserved.