public interface EditReplacePatchable<T> extends Replaceable<T>
| Modifier and Type | Method and Description |
|---|---|
T |
accept(Consumer<T> function)
Issues a JSON patch against the item based upon the changes made by the function provided as argument
|
<V> T |
edit(Class<V> visitorType,
io.fabric8.kubernetes.api.builder.Visitor<V> visitor)
Issues a JSON patch against the item based upon the changes made to the object by the visitor.
|
T |
edit(UnaryOperator<T> function)
Issues a JSON patch against the item based upon the changes made to the object returned by the function.
|
T |
edit(io.fabric8.kubernetes.api.builder.Visitor... visitors)
Issues a JSON patch against the item based upon the changes made to the object by the visitors.
|
T |
editStatus(UnaryOperator<T> function)
Edit the status subresource
|
T |
patch()
Update field(s) of a resource using a JSON patch.
|
T |
patch(PatchContext patchContext)
Update field(s) of a resource using type specified in
PatchContext(defaults to strategic merge if not specified). |
T |
patch(PatchContext patchContext,
String patch)
Update field(s) of a resource using type specified in
PatchContext(defaults to strategic merge if not specified). |
T |
patch(PatchContext patchContext,
T item)
Update field(s) of a resource using type specified in
PatchContext(defaults to strategic merge if not specified). |
default T |
patch(String patch)
Update field(s) of a resource using strategic merge patch.
|
default T |
patch(T item)
Deprecated.
use resource(item).patch() or edit instead
|
T |
patchStatus()
Does a PATCH request to the /status subresource ignoring changes to anything except the status stanza.
|
replace, replaceStatusT edit(UnaryOperator<T> function)
It is generally convenient to use a Builder constructed off of the item.
function - to modify the itemT edit(io.fabric8.kubernetes.api.builder.Visitor... visitors)
visitors - to modify the Builder<V> T edit(Class<V> visitorType, io.fabric8.kubernetes.api.builder.Visitor<V> visitor)
visitorType - to create a TypedVisitorvisitor - to modify the BuilderT accept(Consumer<T> function)
function - to modify the item@Deprecated default T patch(T item)
It is the same as calling patch(PatchContext, Object) with PatchType.JSON specified.
WARNING: This may overwrite concurrent changes (between when you obtained your item and the current state) in an unexpected way.
Consider using edit, which allows for a known base, and a builder instead.
item - to be patched with patched valuesT patch(PatchContext patchContext, T item)
PatchContext(defaults to strategic merge if not specified).
PatchType.JSON - will create a JSON patch against the latest server state
PatchType.JSON_MERGE - will send the serialization of the item as a JSON MERGE patch.
Set the resourceVersion to null to prevent optimistic locking.
PatchType.STRATEGIC_MERGE - will send the serialization of the item as a STRATEGIC MERGE patch.
Set the resourceVersion to null to prevent optimistic locking.
PatchType.SERVER_SIDE_APPLY - will send the serialization of the item as a SERVER SIDE APPLY patch.
You may explicitly set the PatchContext.getFieldManager() as well to override the default.
item - to be patched with patched valuespatchContext - PatchContext for patch requestdefault T patch(String patch)
patch - The patch to be applied to the resource JSON file.T patch(PatchContext patchContext, String patch)
PatchContext(defaults to strategic merge if not specified).patchContext - PatchContext for patch requestpatch - The patch to be applied to the resource JSON file.T editStatus(UnaryOperator<T> function)
function - to produce a modified statusT patchStatus()
This method has the same patching behavior as patch(PatchContext, Object), with
PatchType.JSON_MERGE but against the status subresource.
Set the resourceVersion to null to prevent optimistic locking.
T patch()
It is the same as calling patch(PatchContext, Object) with PatchType.JSON specified.
WARNING: This may overwrite concurrent changes (between when you obtained your item and the current state) in an unexpected way.
Consider using edit instead.
T patch(PatchContext patchContext)
PatchContext(defaults to strategic merge if not specified).
For use when you are providing a complete object to be patched: resource(item).patch(PatchContext.of(PatchType.SERVER_SIDE_APPLY))
PatchType.JSON - will create a JSON patch against the latest server state
PatchType.JSON_MERGE - will send the serialization of the item as a JSON MERGE patch.
Set the resourceVersion to null to prevent optimistic locking.
PatchType.STRATEGIC_MERGE - will send the serialization of the item as a STRATEGIC MERGE patch.
Set the resourceVersion to null to prevent optimistic locking.
PatchType.SERVER_SIDE_APPLY - will send the serialization of the item as a SERVER SIDE APPLY patch.
You may explicitly set the PatchContext.getFieldManager() as well to override the default.
patchContext - PatchContext for patch requestCopyright © 2015–2022 Red Hat. All rights reserved.