Package org.apache.flink.state.forst
Class ContextKey<K>
- java.lang.Object
-
- org.apache.flink.state.forst.ContextKey<K>
-
- Type Parameters:
K- The type of the raw key.
@ThreadSafe public class ContextKey<K> extends Object
The composite key which contains some context information, such as keyGroup, etc.
-
-
Constructor Summary
Constructors Constructor Description ContextKey(org.apache.flink.runtime.asyncprocessing.RecordContext<K> recordContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)intgetKeyGroup()byte[]getOrCreateSerializedKey(org.apache.flink.util.function.FunctionWithException<ContextKey<K>,byte[],IOException> serializeKeyFunc)Get the serialized key.KgetRawKey()inthashCode()
-
-
-
Constructor Detail
-
ContextKey
public ContextKey(org.apache.flink.runtime.asyncprocessing.RecordContext<K> recordContext)
-
-
Method Detail
-
getRawKey
public K getRawKey()
-
getKeyGroup
public int getKeyGroup()
-
getOrCreateSerializedKey
public byte[] getOrCreateSerializedKey(org.apache.flink.util.function.FunctionWithException<ContextKey<K>,byte[],IOException> serializeKeyFunc) throws IOException
Get the serialized key. If the cached serialized key withinRecordContext#payloadis null, the provided serialization function will be called, and the serialization result will be cached byRecordContext#payload.- Parameters:
serializeKeyFunc- the provided serialization function for this contextKey.- Returns:
- the serialized bytes.
- Throws:
IOException
-
-