public interface NonDeletingOperation<T> extends CreateOrReplaceable<T>, EditReplacePatchable<T>, Replaceable<T>, ItemReplacable<T>, ItemWritableOperation<T>, ServerSideApplicable<T>
| Modifier and Type | Method and Description |
|---|---|
T |
createOr(Function<NonDeletingOperation<T>,T> conflictAction)
Alternative to
CreateOrReplaceable.createOrReplace(). |
NonDeletingOperation<T> |
unlock()
Removes the resource version from the current item.
|
create, createOrReplaceaccept, edit, edit, edit, editStatus, patch, patch, patch, patch, patch, patch, patchStatusreplace, replaceStatus, update, updateStatuscreate, createOrReplace, delete, patchStatus, updateStatuswithGracePeriodwithPropagationPolicydelete, withTimeout, withTimeoutInMillisreplace, replaceStatusfieldManager, forceConflicts, serverSideApplyT createOr(Function<NonDeletingOperation<T>,T> conflictAction)
CreateOrReplaceable.createOrReplace().
Will attempt a create, and if that fails will perform the conflictAction.
Most commonly the conflictAction will be NonDeletingOperation::update or NonDeletingOperation::patch, but you are free to provide whatever Function suits your needs.
conflictAction - to be performed it the create fails with a conflictNonDeletingOperation<T> unlock()
Copyright © 2015–2023 Red Hat. All rights reserved.