Remove unused methods in CompactOffHeapLinearHashTable and HashLookupPos

This commit is contained in:
leventov
2016-02-20 16:13:27 +07:00
parent 7b55f3aefd
commit 1ab147667d
2 changed files with 1 additions and 30 deletions
@@ -136,12 +136,6 @@ public abstract class CompactOffHeapLinearHashTable {
public abstract long readEntry(long addr, long pos);
public abstract void writeEntryVolatile(long addr, long pos, long key, long value);
public void putValueVolatile(long addr, long pos, long value) {
checkValueForPut(value);
long currentEntry = readEntry(addr, pos);
writeEntryVolatile(addr, pos, key(currentEntry), value);
}
public abstract void writeEntry(long addr, long pos, long newEntry);
@@ -176,17 +170,4 @@ public abstract class CompactOffHeapLinearHashTable {
clearEntry(addr, posToRemove);
return posToRemove;
}
public void insert(long addr, long key, long value) {
long startPos = hlPos(key);
long pos = startPos;
do {
if (empty(readEntry(addr, pos))) {
writeEntry(addr, pos, entry(key, value));
return;
}
pos = step(pos);
} while (pos != startPos);
throw new AssertionError("HashLookup overflow should never occur");
}
}
@@ -16,8 +16,6 @@
package net.openhft.chronicle.hash.impl.stage.entry;
import net.openhft.chronicle.hash.impl.CompactOffHeapLinearHashTable;
import net.openhft.chronicle.hash.impl.VanillaChronicleHashHolder;
import net.openhft.sg.Stage;
import net.openhft.sg.StageRef;
import net.openhft.sg.Staged;
@@ -26,6 +24,7 @@ import net.openhft.sg.Staged;
public abstract class HashLookupPos {
@StageRef HashLookupSearch hls;
@StageRef SegmentStages s;
public long hashLookupPos = -1;
@@ -52,13 +51,4 @@ public abstract class HashLookupPos {
}
public abstract void closeHashLookupPos();
@StageRef VanillaChronicleHashHolder<?> hh;
@StageRef SegmentStages s;
public void putValueVolatile(long newValue) {
CompactOffHeapLinearHashTable hashLookup = hh.h().hashLookup;
hashLookup.checkValueForPut(newValue);
hashLookup.putValueVolatile(s.tierBaseAddr, hashLookupPos, newValue);
}
}