mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
Update stage-compiler version removing limitation that stage names shouldn't be prefixes of each other
This commit is contained in:
@@ -114,13 +114,13 @@ public abstract class HashEntryStages<K> implements HashEntry<K> {
|
||||
return entryKey;
|
||||
}
|
||||
|
||||
@Stage("TheEntrySizeInChunks") public int entrySizeInChunks = 0;
|
||||
@Stage("EntrySizeInChunks") public int entrySizeInChunks = 0;
|
||||
|
||||
void initTheEntrySizeInChunks() {
|
||||
void initEntrySizeInChunks() {
|
||||
entrySizeInChunks = hh.h().inChunks(entrySize());
|
||||
}
|
||||
|
||||
public void initTheEntrySizeInChunks(int actuallyUsedChunks) {
|
||||
public void initEntrySizeInChunks(int actuallyUsedChunks) {
|
||||
entrySizeInChunks = actuallyUsedChunks;
|
||||
}
|
||||
|
||||
|
||||
@@ -42,20 +42,18 @@ public abstract class SegmentStages implements SegmentLock {
|
||||
@StageRef public VanillaChronicleHashHolder<?, ?, ?> hh;
|
||||
@StageRef public CheckOnEachPublicOperation checkOnEachPublicOperation;
|
||||
|
||||
@Stage("TheSegmentIndex") public int segmentIndex = -1;
|
||||
public int segmentIndex = -1;
|
||||
|
||||
public void initTheSegmentIndex(int segmentIndex) {
|
||||
public void initSegmentIndex(int segmentIndex) {
|
||||
this.segmentIndex = segmentIndex;
|
||||
}
|
||||
|
||||
// "SegHeader" because stage-generator doesn't support stage names - one is a prefix of another
|
||||
// there is a stage named "Segment"
|
||||
@Stage("SegHeader") long segmentHeaderAddress;
|
||||
@Stage("SegHeader") SegmentHeader segmentHeader = null;
|
||||
@Stage("SegmentHeader") long segmentHeaderAddress;
|
||||
@Stage("SegmentHeader") SegmentHeader segmentHeader = null;
|
||||
|
||||
abstract boolean segHeaderInit();
|
||||
abstract boolean segmentHeaderInit();
|
||||
|
||||
private void initSegHeader() {
|
||||
private void initSegmentHeader() {
|
||||
segmentHeaderAddress = hh.h().ms.address() + hh.h().segmentHeaderOffset(segmentIndex);
|
||||
segmentHeader = BigSegmentHeader.INSTANCE;
|
||||
}
|
||||
@@ -188,7 +186,7 @@ public abstract class SegmentStages implements SegmentLock {
|
||||
@Stage("Locks")
|
||||
boolean tryFindInitLocksOfThisSegment(Object thisContext, int index) {
|
||||
SegmentStages c = chaining.contextAtIndexInChain(index);
|
||||
if (c.segHeaderInit() &&
|
||||
if (c.segmentHeaderInit() &&
|
||||
c.segmentHeaderAddress == segmentHeaderAddress &&
|
||||
c.locksInit()) {
|
||||
SegmentStages root = c.rootContextOnThisSegment;
|
||||
|
||||
@@ -25,7 +25,7 @@ public abstract class QuerySegmentStages extends SegmentStages {
|
||||
|
||||
@StageRef HashQuery q;
|
||||
|
||||
void initTheSegmentIndex() {
|
||||
void initSegmentIndex() {
|
||||
segmentIndex = hh.h().hashSplitting.segmentIndex(q.hashOfKey);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user