Class OperationInfo

java.lang.Object
de.hybris.platform.core.threadregistry.OperationInfo

public final class OperationInfo extends Object
A map wrapper for all meta data for a given thread in a thread registry.

Used to store information like category, status and additional attributes of a thread.

The information is stored in String key value pairs.

Contains information if a thread can have a suspended database.

  • Method Details

    • empty

      public static OperationInfo empty()
      Creates an empty OperationInfo.
      Returns:
      empty OperationInfo
    • builder

      public static OperationInfo.OperationInfoBuilder builder()
      Creates a OperationInfoBuilder.
      Returns:
      new OperationInfoBuilder
    • updateThread

      public static RevertibleUpdate updateThread(@Nonnull OperationInfo info)
      Updates current Thread info with a new one (previous and new one are merged together). Returns a RevertibleUpdate object that allows to revert to previous operation info.

      WARNING if a thread was not registered before this method won't do anything. The returned RevertibleObject will also do nothing when his RevertibleUpdate.revert() method will be called.

      Parameters:
      info - - operationInfo that will be merged with current operation info
      Returns:
      RevertibleUpdate object with previous operation info
      Throws:
      NullPointerException - if updateInfo is null
    • current

      @Beta public static OperationInfo current()
      Returns current Thread's OperationInfo. If there is no info attached, the result of empty() will be returned. PLEASE NOTE: This API is in the beta stage, it can be changed or even removed in a future release. Compatibility with other features is not guaranteed.
    • isJunitOperation

      @Beta public boolean isJunitOperation()
      PLEASE NOTE: This API is in the beta stage, it can be changed or even removed in a future release. Compatibility with other features is not guaranteed.
    • isInitOrUpdate

      @Beta public boolean isInitOrUpdate()
      PLEASE NOTE: This API is in the beta stage, it can be changed or even removed in a future release. Compatibility with other features is not guaranteed.
    • getCategory

      @Beta public String getCategory()
      PLEASE NOTE: This API is in the beta stage, it can be changed or even removed in a future release. Compatibility with other features is not guaranteed.
    • getTenantId

      @Beta public String getTenantId()
      PLEASE NOTE: This API is in the beta stage, it can be changed or even removed in a future release. Compatibility with other features is not guaranteed.
    • getCronJobCode

      @Beta public String getCronJobCode()
      PLEASE NOTE: This API is in the beta stage, it can be changed or even removed in a future release. Compatibility with other features is not guaranteed.
    • getBusinessProcessCode

      @Beta public String getBusinessProcessCode()
      PLEASE NOTE: This API is in the beta stage, it can be changed or even removed in a future release. Compatibility with other features is not guaranteed.
    • getAspectName

      @Beta public String getAspectName()
      PLEASE NOTE: This API is in the beta stage, it can be changed or even removed in a future release. Compatibility with other features is not guaranteed.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object