Class Lifecycle

java.lang.Object
com.antithesis.sdk.Lifecycle

public final class Lifecycle extends Object
The Lifecycle class contains methods which inform the Antithesis environment that particular test phases or milestones have been reached.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    sendEvent(String name, com.fasterxml.jackson.databind.node.ObjectNode details)
    Indicates to Antithesis that a certain event has been reached.
    static void
    setupComplete(com.fasterxml.jackson.databind.node.ObjectNode details)
    Indicates to Antithesis that setup has completed.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Lifecycle

      public Lifecycle()
      Default constructor
  • Method Details

    • setupComplete

      public static void setupComplete(com.fasterxml.jackson.databind.node.ObjectNode details)
      Indicates to Antithesis that setup has completed. Call this function when your system and workload are fully initialized. After this function is called, Antithesis will take a snapshot of your system and begin injecting faults.

      Calling this function multiple times or from multiple processes will have no effect. Antithesis will treat the first time any process called this function as the moment that the setup was completed.

      Parameters:
      details - additional details that provide greater context for system setup. Evaluated at runtime.
    • sendEvent

      public static void sendEvent(String name, com.fasterxml.jackson.databind.node.ObjectNode details)
      Indicates to Antithesis that a certain event has been reached. It sends a structured log message to Antithesis that you may later use to aid debugging.

      In addition to details, you also provide rawName, which is the name of the event that you are logging.

      Parameters:
      name - the name of the event that is being logged
      details - additional details that provide greater context for the lifecycle event. Evaluated at runtime.