public void mergeTail(WalProcedureMap other) { for (Entry p = other.replayOrderHead; p != null; p = p.replayNext) { int slotIndex = getMapSlot(p.getProcId()); p.hashNext = procedureMap[slotIndex]; procedureMap[slotIndex] = p;
public void mergeTail(WalProcedureMap other) { for (Entry p = other.replayOrderHead; p != null; p = p.replayNext) { int slotIndex = getMapSlot(p.getProcId()); p.hashNext = procedureMap[slotIndex]; procedureMap[slotIndex] = p;
private Entry removeFromMap(final long procId) { int slotIndex = getMapSlot(procId); Entry prev = null; Entry entry = procedureMap[slotIndex]; while (entry != null) { if (procId == entry.getProcId()) { if (prev != null) { prev.hashNext = entry.hashNext; } else { procedureMap[slotIndex] = entry.hashNext; } entry.hashNext = null; return entry; } prev = entry; entry = entry.hashNext; } return null; }
private Entry removeFromMap(final long procId) { int slotIndex = getMapSlot(procId); Entry prev = null; Entry entry = procedureMap[slotIndex]; while (entry != null) { if (procId == entry.getProcId()) { if (prev != null) { prev.hashNext = entry.hashNext; } else { procedureMap[slotIndex] = entry.hashNext; } entry.hashNext = null; return entry; } prev = entry; entry = entry.hashNext; } return null; }
private Entry getProcedure(final long procId) { return getProcedure(getMapSlot(procId), procId); }
private Entry getProcedure(final long procId) { return getProcedure(getMapSlot(procId), procId); }
private Entry addToMap(final long procId, final boolean hasParent) { int slotIndex = getMapSlot(procId); Entry entry = getProcedure(slotIndex, procId); if (entry != null) return entry; entry = new Entry(procedureMap[slotIndex]); procedureMap[slotIndex] = entry; return entry; }
private Entry addToMap(final long procId, final boolean hasParent) { int slotIndex = getMapSlot(procId); Entry entry = getProcedure(slotIndex, procId); if (entry != null) return entry; entry = new Entry(procedureMap[slotIndex]); procedureMap[slotIndex] = entry; return entry; }