Package cn.sliew.milky.common.context
Class ExecuteContext
- java.lang.Object
-
- cn.sliew.milky.common.context.ExecuteContext
-
public class ExecuteContext extends Object
Thread local context. Note: ExecuteContext is a temporary state holder.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedExecuteContext()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearAttachments()booleanexplain()StringgetAttachment(String key)get attachment.Map<String,String>getAttachments()get attachments.static ExecuteContextgetContext()voidopenExplain()voidopenProfile()booleanprofile()ExecuteContextremoveAttachment(String key)remove attachment.static voidremoveContext()ExecuteContextsetAttachment(String key, String value)set attachment.ExecuteContextsetAttachments(Map<String,String> attachment)set attachments
-
-
-
Method Detail
-
getContext
public static ExecuteContext getContext()
-
removeContext
public static void removeContext()
-
getAttachment
public String getAttachment(String key)
get attachment.- Parameters:
key-- Returns:
- attachment
-
setAttachment
public ExecuteContext setAttachment(String key, String value)
set attachment.- Parameters:
key-value-- Returns:
- context
-
removeAttachment
public ExecuteContext removeAttachment(String key)
remove attachment.- Parameters:
key-- Returns:
- context
-
setAttachments
public ExecuteContext setAttachments(Map<String,String> attachment)
set attachments- Parameters:
attachment-- Returns:
- context
-
clearAttachments
public void clearAttachments()
-
profile
public boolean profile()
-
openProfile
public void openProfile()
-
explain
public boolean explain()
-
openExplain
public void openExplain()
-
-