Interface Lifecycle
-
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
Lifecycle.Jsii$Proxy
@Generated(value="jsii-pacmak/1.75.0 (build 63bb957)", date="2023-02-20T02:42:02.246Z") @Stability(Stable) public interface Lifecycle extends software.amazon.jsii.JsiiSerializable
Lifecycle describes actions that the management system should take in response to container lifecycle events.For the PostStart and PreStop lifecycle handlers, management of the container blocks until the action is complete, unless the container process fails, in which case the handler is aborted.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Lifecycle.Builder
A builder forLifecycle
static class
Lifecycle.Jsii$Proxy
An implementation forLifecycle
-
Method Summary
All Methods Static Methods Instance Methods Default Methods Modifier and Type Method Description static Lifecycle.Builder
builder()
default LifecycleHandler
getPostStart()
PostStart is called immediately after a container is created.default LifecycleHandler
getPreStop()
PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc.
-
-
-
Method Detail
-
getPostStart
@Stability(Stable) @Nullable default LifecycleHandler getPostStart()
PostStart is called immediately after a container is created.If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks
-
getPreStop
@Stability(Stable) @Nullable default LifecycleHandler getPreStop()
PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc.The handler is not called if the container crashes or exits. The Pod's termination grace period countdown begins before the PreStop hook is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod's termination grace period (unless delayed by finalizers). Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks
-
builder
@Stability(Stable) static Lifecycle.Builder builder()
- Returns:
- a
Lifecycle.Builder
ofLifecycle
-
-