Package org.apache.iceberg.util
Class PartitionMap<V>
- Type Parameters:
- V- the type of values
- All Implemented Interfaces:
- Map<Pair<Integer,- StructLike>, - V> 
A map that uses a pair of spec ID and partition tuple as keys.
 
This implementation internally stores provided partition tuples in StructLikeMap for
 consistent hashing and equals behavior. This ensures that objects of different types that
 represent the same structs are treated as equal keys in the map.
 
Note: This map is not designed for concurrent modification by multiple threads. However, it supports safe concurrent reads, assuming there are no concurrent writes.
Note: This map does not support null pairs but supports null as partition tuples.
- 
Nested Class SummaryNested classes/interfaces inherited from class java.util.AbstractMapAbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> 
- 
Method SummaryModifier and TypeMethodDescriptionvoidclear()computeIfAbsent(int specId, StructLike struct, Supplier<V> valueSupplier) booleancontainsKey(int specId, StructLike struct) booleancontainsKey(Object key) booleancontainsValue(Object value) static <T> PartitionMap<T> create(Map<Integer, PartitionSpec> specs) entrySet()get(int specId, StructLike struct) booleanisEmpty()keySet()put(int specId, StructLike struct, V value) put(Pair<Integer, StructLike> key, V value) voidremoveKey(int specId, StructLike struct) intsize()toString()values()Methods inherited from class java.util.AbstractMapclone, equals, hashCodeMethods inherited from class java.lang.Objectfinalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Mapcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
- 
Method Details- 
create
- 
sizepublic int size()- Specified by:
- sizein interface- Map<Pair<Integer,- StructLike>, - V> 
- Overrides:
- sizein class- AbstractMap<Pair<Integer,- StructLike>, - V> 
 
- 
isEmptypublic boolean isEmpty()- Specified by:
- isEmptyin interface- Map<Pair<Integer,- StructLike>, - V> 
- Overrides:
- isEmptyin class- AbstractMap<Pair<Integer,- StructLike>, - V> 
 
- 
containsKey- Specified by:
- containsKeyin interface- Map<Pair<Integer,- StructLike>, - V> 
- Overrides:
- containsKeyin class- AbstractMap<Pair<Integer,- StructLike>, - V> 
 
- 
containsKey
- 
containsValue- Specified by:
- containsValuein interface- Map<Pair<Integer,- StructLike>, - V> 
- Overrides:
- containsValuein class- AbstractMap<Pair<Integer,- StructLike>, - V> 
 
- 
get- Specified by:
- getin interface- Map<Pair<Integer,- StructLike>, - V> 
- Overrides:
- getin class- AbstractMap<Pair<Integer,- StructLike>, - V> 
 
- 
get
- 
put- Specified by:
- putin interface- Map<Pair<Integer,- StructLike>, - V> 
- Overrides:
- putin class- AbstractMap<Pair<Integer,- StructLike>, - V> 
 
- 
put
- 
putAll- Specified by:
- putAllin interface- Map<Pair<Integer,- StructLike>, - V> 
- Overrides:
- putAllin class- AbstractMap<Pair<Integer,- StructLike>, - V> 
 
- 
remove- Specified by:
- removein interface- Map<Pair<Integer,- StructLike>, - V> 
- Overrides:
- removein class- AbstractMap<Pair<Integer,- StructLike>, - V> 
 
- 
removeKey
- 
clearpublic void clear()- Specified by:
- clearin interface- Map<Pair<Integer,- StructLike>, - V> 
- Overrides:
- clearin class- AbstractMap<Pair<Integer,- StructLike>, - V> 
 
- 
keySet- Specified by:
- keySetin interface- Map<Pair<Integer,- StructLike>, - V> 
- Overrides:
- keySetin class- AbstractMap<Pair<Integer,- StructLike>, - V> 
 
- 
values- Specified by:
- valuesin interface- Map<Pair<Integer,- StructLike>, - V> 
- Overrides:
- valuesin class- AbstractMap<Pair<Integer,- StructLike>, - V> 
 
- 
entrySet- Specified by:
- entrySetin interface- Map<Pair<Integer,- StructLike>, - V> 
- Specified by:
- entrySetin class- AbstractMap<Pair<Integer,- StructLike>, - V> 
 
- 
computeIfAbsent
- 
toString- Overrides:
- toStringin class- AbstractMap<Pair<Integer,- StructLike>, - V> 
 
 
-