Package org.apache.hadoop.ipc
Class CallerContext.Builder
java.lang.Object
org.apache.hadoop.ipc.CallerContext.Builder
- Enclosing class:
- CallerContext
The caller context builder.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAppend new field to the context.Append new field which contains key and value to the context.appendIfAbsent(String key, String value) Append new field which contains key and value to the context if the key("key:") is absent.build()Get the context.byte[]Get the signature.setSignature(byte[] signature)
-
Field Details
-
KEY_VALUE_SEPARATOR
- See Also:
-
-
Constructor Details
-
Builder
-
Builder
-
Builder
-
-
Method Details
-
setSignature
-
getContext
Get the context. For example, the context is "key1:value1,key2:value2".- Returns:
- the valid context or null.
-
getSignature
public byte[] getSignature()Get the signature.- Returns:
- the signature.
-
append
Append new field to the context.- Parameters:
field- one of fields to append.- Returns:
- the builder.
-
append
Append new field which contains key and value to the context.- Parameters:
key- the key of field.value- the value of field.- Returns:
- the builder.
-
appendIfAbsent
Append new field which contains key and value to the context if the key("key:") is absent.- Parameters:
key- the key of field.value- the value of field.- Returns:
- the builder.
-
build
-