Class PodHandler
- java.lang.Object
-
- io.fabric8.kubernetes.client.handlers.core.v1.PodHandler
-
- All Implemented Interfaces:
ResourceHandler<io.fabric8.kubernetes.api.model.Pod,io.fabric8.kubernetes.api.model.PodBuilder>
public class PodHandler extends Object implements ResourceHandler<io.fabric8.kubernetes.api.model.Pod,io.fabric8.kubernetes.api.model.PodBuilder>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.fabric8.kubernetes.client.ResourceHandler
ResourceHandler.Key
-
-
Constructor Summary
Constructors Constructor Description PodHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.fabric8.kubernetes.api.model.Pod
create(okhttp3.OkHttpClient client, Config config, String namespace, io.fabric8.kubernetes.api.model.Pod item, boolean dryRun)
Create the specified resourceBoolean
delete(okhttp3.OkHttpClient client, Config config, String namespace, io.fabric8.kubernetes.api.model.DeletionPropagation propagationPolicy, long gracePeriodSeconds, io.fabric8.kubernetes.api.model.Pod item, boolean dryRun)
Delete the specified resource (if exists).io.fabric8.kubernetes.api.model.PodBuilder
edit(io.fabric8.kubernetes.api.model.Pod item)
Edit the specified resource.String
getApiVersion()
String
getKind()
io.fabric8.kubernetes.api.model.Pod
reload(okhttp3.OkHttpClient client, Config config, String namespace, io.fabric8.kubernetes.api.model.Pod item)
Reload the specified resource (if exists).io.fabric8.kubernetes.api.model.Pod
replace(okhttp3.OkHttpClient client, Config config, String namespace, io.fabric8.kubernetes.api.model.Pod item, boolean dryRun)
Replace the specified resourceio.fabric8.kubernetes.api.model.Pod
waitUntilCondition(okhttp3.OkHttpClient client, Config config, String namespace, io.fabric8.kubernetes.api.model.Pod item, Predicate<io.fabric8.kubernetes.api.model.Pod> condition, long amount, TimeUnit timeUnit)
io.fabric8.kubernetes.api.model.Pod
waitUntilReady(okhttp3.OkHttpClient client, Config config, String namespace, io.fabric8.kubernetes.api.model.Pod item, long amount, TimeUnit timeUnit)
Waits until the specified resource is Ready.Watch
watch(okhttp3.OkHttpClient client, Config config, String namespace, io.fabric8.kubernetes.api.model.Pod item, io.fabric8.kubernetes.api.model.ListOptions options, Watcher<io.fabric8.kubernetes.api.model.Pod> watcher)
Watches the specified resource for changesWatch
watch(okhttp3.OkHttpClient client, Config config, String namespace, io.fabric8.kubernetes.api.model.Pod item, Watcher<io.fabric8.kubernetes.api.model.Pod> watcher)
Watches the specified resource for changes.Watch
watch(okhttp3.OkHttpClient client, Config config, String namespace, io.fabric8.kubernetes.api.model.Pod item, String resourceVersion, Watcher<io.fabric8.kubernetes.api.model.Pod> watcher)
Watches the specified resource for changes.
-
-
-
Method Detail
-
getKind
public String getKind()
- Specified by:
getKind
in interfaceResourceHandler<io.fabric8.kubernetes.api.model.Pod,io.fabric8.kubernetes.api.model.PodBuilder>
-
getApiVersion
public String getApiVersion()
- Specified by:
getApiVersion
in interfaceResourceHandler<io.fabric8.kubernetes.api.model.Pod,io.fabric8.kubernetes.api.model.PodBuilder>
-
create
public io.fabric8.kubernetes.api.model.Pod create(okhttp3.OkHttpClient client, Config config, String namespace, io.fabric8.kubernetes.api.model.Pod item, boolean dryRun)
Description copied from interface:ResourceHandler
Create the specified resource- Specified by:
create
in interfaceResourceHandler<io.fabric8.kubernetes.api.model.Pod,io.fabric8.kubernetes.api.model.PodBuilder>
- Parameters:
client
- An instance of the http client.config
- The client config.namespace
- The target namespace.item
- The resource to create.dryRun
- Enable dry run- Returns:
- The created resource.
-
replace
public io.fabric8.kubernetes.api.model.Pod replace(okhttp3.OkHttpClient client, Config config, String namespace, io.fabric8.kubernetes.api.model.Pod item, boolean dryRun)
Description copied from interface:ResourceHandler
Replace the specified resource- Specified by:
replace
in interfaceResourceHandler<io.fabric8.kubernetes.api.model.Pod,io.fabric8.kubernetes.api.model.PodBuilder>
- Parameters:
client
- An instance of the http client.config
- The client config.namespace
- The target namespace.item
- The resource to replace.dryRun
- Enable dry run- Returns:
- The replaced resource.
-
reload
public io.fabric8.kubernetes.api.model.Pod reload(okhttp3.OkHttpClient client, Config config, String namespace, io.fabric8.kubernetes.api.model.Pod item)
Description copied from interface:ResourceHandler
Reload the specified resource (if exists).- Specified by:
reload
in interfaceResourceHandler<io.fabric8.kubernetes.api.model.Pod,io.fabric8.kubernetes.api.model.PodBuilder>
- Parameters:
client
- An instance of the http client.config
- The client config.namespace
- The target namespace.item
- The resource to reload.- Returns:
- The reloaded resource.
-
edit
public io.fabric8.kubernetes.api.model.PodBuilder edit(io.fabric8.kubernetes.api.model.Pod item)
Description copied from interface:ResourceHandler
Edit the specified resource.- Specified by:
edit
in interfaceResourceHandler<io.fabric8.kubernetes.api.model.Pod,io.fabric8.kubernetes.api.model.PodBuilder>
- Parameters:
item
- The resource to edit.- Returns:
- The resource editor.
-
delete
public Boolean delete(okhttp3.OkHttpClient client, Config config, String namespace, io.fabric8.kubernetes.api.model.DeletionPropagation propagationPolicy, long gracePeriodSeconds, io.fabric8.kubernetes.api.model.Pod item, boolean dryRun)
Description copied from interface:ResourceHandler
Delete the specified resource (if exists).- Specified by:
delete
in interfaceResourceHandler<io.fabric8.kubernetes.api.model.Pod,io.fabric8.kubernetes.api.model.PodBuilder>
- Parameters:
client
- An instance of the http client.config
- The client config.namespace
- The target namespace.propagationPolicy
- Whether and how garbage collection will be performed.gracePeriodSeconds
- The duration in seconds before the object should be deleted.item
- The resource to delete.dryRun
- enable dry run- Returns:
- The true if the resource was successfully deleted.
-
watch
public Watch watch(okhttp3.OkHttpClient client, Config config, String namespace, io.fabric8.kubernetes.api.model.Pod item, Watcher<io.fabric8.kubernetes.api.model.Pod> watcher)
Description copied from interface:ResourceHandler
Watches the specified resource for changes.- Specified by:
watch
in interfaceResourceHandler<io.fabric8.kubernetes.api.model.Pod,io.fabric8.kubernetes.api.model.PodBuilder>
- Parameters:
client
- An instance of the http client.config
- The client config.namespace
- The target namespace.item
- The resource to delete.watcher
- TheWatcher
to use.- Returns:
- The
Watch
-
watch
public Watch watch(okhttp3.OkHttpClient client, Config config, String namespace, io.fabric8.kubernetes.api.model.Pod item, String resourceVersion, Watcher<io.fabric8.kubernetes.api.model.Pod> watcher)
Description copied from interface:ResourceHandler
Watches the specified resource for changes.- Specified by:
watch
in interfaceResourceHandler<io.fabric8.kubernetes.api.model.Pod,io.fabric8.kubernetes.api.model.PodBuilder>
- Parameters:
client
- An instance of the http client.config
- The client config.namespace
- The target namespace.item
- The resource to delete.resourceVersion
- The resourceVersion of objectwatcher
- TheWatcher
to use.- Returns:
- The
Watch
-
watch
public Watch watch(okhttp3.OkHttpClient client, Config config, String namespace, io.fabric8.kubernetes.api.model.Pod item, io.fabric8.kubernetes.api.model.ListOptions options, Watcher<io.fabric8.kubernetes.api.model.Pod> watcher)
Description copied from interface:ResourceHandler
Watches the specified resource for changes- Specified by:
watch
in interfaceResourceHandler<io.fabric8.kubernetes.api.model.Pod,io.fabric8.kubernetes.api.model.PodBuilder>
- Parameters:
client
- An instance of http client.config
- The client config.namespace
- The target namespace.item
- The resource to delete.options
- TheListOptions
for available optionswatcher
- TheWatcher
to use.- Returns:
- The
Watch
-
waitUntilReady
public io.fabric8.kubernetes.api.model.Pod waitUntilReady(okhttp3.OkHttpClient client, Config config, String namespace, io.fabric8.kubernetes.api.model.Pod item, long amount, TimeUnit timeUnit) throws InterruptedException
Description copied from interface:ResourceHandler
Waits until the specified resource is Ready. For resources that 'readiness' is not applicable the method is equivalent to get.- Specified by:
waitUntilReady
in interfaceResourceHandler<io.fabric8.kubernetes.api.model.Pod,io.fabric8.kubernetes.api.model.PodBuilder>
- Parameters:
client
- An instance of the http client.config
- The client config.namespace
- The target namespace.item
- The resource to wait.amount
- The amount of time to waittimeUnit
- The waitTimeUnit
.- Returns:
- The true if the resource was successfully deleted.
- Throws:
InterruptedException
- Interrupted Exception
-
waitUntilCondition
public io.fabric8.kubernetes.api.model.Pod waitUntilCondition(okhttp3.OkHttpClient client, Config config, String namespace, io.fabric8.kubernetes.api.model.Pod item, Predicate<io.fabric8.kubernetes.api.model.Pod> condition, long amount, TimeUnit timeUnit) throws InterruptedException
- Specified by:
waitUntilCondition
in interfaceResourceHandler<io.fabric8.kubernetes.api.model.Pod,io.fabric8.kubernetes.api.model.PodBuilder>
- Throws:
InterruptedException
-
-