Class OperationInfo
- java.lang.Object
-
- de.hybris.platform.core.threadregistry.OperationInfo
-
public final class OperationInfo extends java.lang.ObjectA 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
Stringkey value pairs.Contains information if a thread can have a suspended database.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOperationInfo.Categorystatic classOperationInfo.OperationInfoBuilderBuilder forOperationInfo.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OperationInfo.OperationInfoBuilderbuilder()Creates aOperationInfoBuilder.static OperationInfocurrent()Returns currentThread'sOperationInfo.static OperationInfoempty()Creates an emptyOperationInfo.booleanequals(java.lang.Object o)java.lang.StringgetAspectName()PLEASE NOTE: This API is in the beta stage, it can be changed or even removed in a future release.java.lang.StringgetBusinessProcessCode()PLEASE NOTE: This API is in the beta stage, it can be changed or even removed in a future release.java.lang.StringgetCategory()PLEASE NOTE: This API is in the beta stage, it can be changed or even removed in a future release.java.lang.StringgetCronJobCode()PLEASE NOTE: This API is in the beta stage, it can be changed or even removed in a future release.java.lang.StringgetTenantId()PLEASE NOTE: This API is in the beta stage, it can be changed or even removed in a future release.inthashCode()booleanisInitOrUpdate()PLEASE NOTE: This API is in the beta stage, it can be changed or even removed in a future release.booleanisJunitOperation()PLEASE NOTE: This API is in the beta stage, it can be changed or even removed in a future release.java.lang.StringtoString()static RevertibleUpdateupdateThread(OperationInfo info)Updates currentThreadinfo with a new one (previous and new one are merged together).
-
-
-
Method Detail
-
empty
public static OperationInfo empty()
Creates an emptyOperationInfo.- Returns:
- empty OperationInfo
-
builder
public static OperationInfo.OperationInfoBuilder builder()
Creates aOperationInfoBuilder.- Returns:
- new OperationInfoBuilder
-
updateThread
public static RevertibleUpdate updateThread(@Nonnull OperationInfo info)
Updates currentThreadinfo with a new one (previous and new one are merged together). Returns aRevertibleUpdateobject 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:
java.lang.NullPointerException- if updateInfo is null
-
current
@Beta public static OperationInfo current()
Returns currentThread'sOperationInfo. If there is no info attached, the result ofempty()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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-