-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
165 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
...rc/main/java/com/netflix/hollow/core/read/engine/map/HollowMapTypeDataElementsJoiner.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.netflix.hollow.core.read.engine.map; | ||
|
||
import com.netflix.hollow.core.read.engine.AbstractHollowTypeDataElementsJoiner; | ||
|
||
|
||
/** | ||
* Join multiple {@code HollowMapTypeDataElements}s into 1 {@code HollowMapTypeDataElements}. | ||
* Ordinals are remapped and corresponding data is copied over. | ||
* The original data elements are not destroyed. | ||
* The no. of passed data elements must be a power of 2. | ||
*/ | ||
class HollowMapTypeDataElementsJoiner extends AbstractHollowTypeDataElementsJoiner<HollowMapTypeDataElements> { | ||
|
||
public HollowMapTypeDataElementsJoiner(HollowMapTypeDataElements[] from) { | ||
super(from); | ||
} | ||
|
||
@Override | ||
public void init() { | ||
this.to = new HollowMapTypeDataElements(from[0].memoryMode, from[0].memoryRecycler); | ||
} | ||
|
||
@Override | ||
public void populateStats() { | ||
} | ||
|
||
@Override | ||
public void copyRecords() { | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
.../main/java/com/netflix/hollow/core/read/engine/map/HollowMapTypeDataElementsSplitter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package com.netflix.hollow.core.read.engine.map; | ||
|
||
import com.netflix.hollow.core.read.engine.AbstractHollowTypeDataElementsSplitter; | ||
|
||
/** | ||
* Split a {@code HollowMapTypeDataElements} into multiple {@code HollowMapTypeDataElements}s. | ||
* Ordinals are remapped and corresponding data is copied over. | ||
* The original data elements are not destroyed. | ||
* {@code numSplits} must be a power of 2. | ||
*/ | ||
public class HollowMapTypeDataElementsSplitter extends AbstractHollowTypeDataElementsSplitter<HollowMapTypeDataElements> { | ||
|
||
public HollowMapTypeDataElementsSplitter(HollowMapTypeDataElements from, int numSplits) { | ||
super(from, numSplits); | ||
} | ||
|
||
@Override | ||
public void init() { | ||
this.to = new HollowMapTypeDataElements[numSplits]; | ||
for(int i=0;i<to.length;i++) { | ||
to[i] = new HollowMapTypeDataElements(from.memoryMode, from.memoryRecycler); | ||
} | ||
} | ||
|
||
@Override | ||
public void populateStats() { | ||
|
||
} | ||
|
||
@Override | ||
public void copyRecords() { | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
...rc/main/java/com/netflix/hollow/core/read/engine/set/HollowSetTypeDataElementsJoiner.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.netflix.hollow.core.read.engine.set; | ||
|
||
import com.netflix.hollow.core.read.engine.AbstractHollowTypeDataElementsJoiner; | ||
|
||
|
||
/** | ||
* Join multiple {@code HollowSetTypeDataElements}s into 1 {@code HollowSetTypeDataElements}. | ||
* Ordinals are remapped and corresponding data is copied over. | ||
* The original data elements are not destroyed. | ||
* The no. of passed data elements must be a power of 2. | ||
*/ | ||
class HollowSetTypeDataElementsJoiner extends AbstractHollowTypeDataElementsJoiner<HollowSetTypeDataElements> { | ||
|
||
public HollowSetTypeDataElementsJoiner(HollowSetTypeDataElements[] from) { | ||
super(from); | ||
} | ||
|
||
@Override | ||
public void init() { | ||
this.to = new HollowSetTypeDataElements(from[0].memoryMode, from[0].memoryRecycler); | ||
} | ||
|
||
@Override | ||
public void populateStats() { | ||
} | ||
|
||
@Override | ||
public void copyRecords() { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters