public class CompactionMap
extends java.lang.Object
CompactionMap is a composite of multiple PartialCompactionMap
instances. Operations performed on this map are delegated back to the individual
maps.| Modifier and Type | Field and Description |
|---|---|
static CompactionMap |
EMPTY
An empty map.
|
| Modifier and Type | Method and Description |
|---|---|
CompactionMap |
cons(PartialCompactionMap head)
Create a new
CompactionMap containing all maps
of this instances and additional the passed map head. |
RecordId |
get(RecordId before)
Retrieve the record id
before maps to or null
if no such id exists. |
int |
getDepth()
The depth of the compaction map is the number of partial compaction maps
this map consists of.
|
long[] |
getEstimatedWeights()
The weight of the compaction map is its memory consumption bytes
|
int |
getGeneration() |
long[] |
getRecordCounts()
Number of records referenced by the keys in this map.
|
long[] |
getSegmentCounts()
Number of segments referenced by the keys in this map.
|
void |
remove(java.util.Set<java.util.UUID> uuids)
Remove all keys from this map where
keys.contains(key.asUUID()). |
static long |
sum(long[] longs)
Java's lacking libraries...
|
boolean |
wasCompacted(java.util.UUID id)
Checks whether content in the segment with the given identifier was
compacted to new segments.
|
boolean |
wasCompactedTo(RecordId before,
RecordId after)
Checks whether the record with the given
before identifier was
compacted to a new record with the given after identifier. |
public static final CompactionMap EMPTY
public boolean wasCompactedTo(RecordId before, RecordId after)
before identifier was
compacted to a new record with the given after identifier.before - before record identifierafter - after record identifierbefore was compacted to afterpublic boolean wasCompacted(java.util.UUID id)
id - segment identifierpublic RecordId get(RecordId before)
before maps to or null
if no such id exists.before - before record idnullpublic void remove(java.util.Set<java.util.UUID> uuids)
keys.contains(key.asUUID()).uuids - uuids of the keys to removepublic CompactionMap cons(PartialCompactionMap head)
CompactionMap containing all maps
of this instances and additional the passed map head.head - CompactionMap instancepublic static long sum(long[] longs)
longs - longspublic int getDepth()
cons(PartialCompactionMap)public int getGeneration()
public long[] getEstimatedWeights()
public long[] getSegmentCounts()
public long[] getRecordCounts()
"Copyright © 2010 - 2018 Adobe Systems Incorporated. All Rights Reserved"