Package org.apache.flink.state.forst
Class ContextKey<K,N>
java.lang.Object
org.apache.flink.state.forst.ContextKey<K,N>
- Type Parameters:
K- The type of the raw key.
The composite key which contains some context information, such as keyGroup, etc.
-
Constructor Summary
ConstructorsConstructorDescriptionContextKey(org.apache.flink.runtime.asyncprocessing.RecordContext<K> recordContext, N namespace) ContextKey(org.apache.flink.runtime.asyncprocessing.RecordContext<K> recordContext, N namespace, Object userKey) -
Method Summary
Modifier and TypeMethodDescriptionbooleanintbyte[]getOrCreateSerializedKey(org.apache.flink.util.function.FunctionWithException<ContextKey<K, N>, byte[], IOException> serializeKeyFunc) Get the serialized key.inthashCode()voidvoidsetUserKey(Object userKey) toString()
-
Constructor Details
-
ContextKey
-
ContextKey
-
-
Method Details
-
getRawKey
-
getKeyGroup
public int getKeyGroup() -
getNamespace
-
getUserKey
-
setUserKey
-
resetExtra
public void resetExtra() -
getOrCreateSerializedKey
public byte[] getOrCreateSerializedKey(org.apache.flink.util.function.FunctionWithException<ContextKey<K, N>, throws IOExceptionbyte[], IOException> serializeKeyFunc) 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
-
hashCode
public int hashCode() -
equals
-
toString
-