Class KeyAccountingUnit<K>
- java.lang.Object
-
- org.apache.flink.table.runtime.operators.join.lookup.keyordered.KeyAccountingUnit<K>
-
- Type Parameters:
K- the type of key
public class KeyAccountingUnit<K> extends Object
Key accounting unit holds the current in-flight key and tracks the corresponding ongoing records.
-
-
Constructor Summary
Constructors Constructor Description KeyAccountingUnit()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanifOccupy(K key)Check if a key is occupied for processing.booleanoccupy(Object record, K key)Occupy a key for processing, the subsequent records with the same key would be blocked until the previous key release.voidrelease(Object record, K key)
-
-
-
Method Detail
-
occupy
public boolean occupy(Object record, K key)
Occupy a key for processing, the subsequent records with the same key would be blocked until the previous key release.- Returns:
- true if no one is occupying this key, and this record succeeds to take it.
-
ifOccupy
public boolean ifOccupy(K key)
Check if a key is occupied for processing.- Returns:
- true if no one is occupying this key.
-
-