mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
Remove unused methods in CompactOffHeapLinearHashTable and HashLookupPos
This commit is contained in:
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user