public class SlotAllocatorForSequences<T>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.util.Map<T,java.lang.Long> |
slotMaps
Each element has one slot map attached to it.
|
Constructor and Description |
---|
SlotAllocatorForSequences()
Constructor
|
Modifier and Type | Method and Description |
---|---|
int |
allocateSlot(java.util.List<T> elements)
Allocate slot
|
int |
getMaxSlot()
Get maximum number of slots allocated
|
private long |
mergeAllSlots()
Get merged slot bitmap (combine allocations for all elements into synthetic bitmap)
|
private long |
mergeSlots(java.util.List<T> elements)
Get merged slot bitmap (combine allocations for some elements into synthetic bitmap)
|
private final java.util.Map<T,java.lang.Long> slotMaps
public int allocateSlot(java.util.List<T> elements)
elements
- elements in rangepublic int getMaxSlot()
private long mergeAllSlots()
private long mergeSlots(java.util.List<T> elements)
elements
- elements in range