public void tierEntries(long tierEntries) { if (tier == 0) { segmentHeader.entries(segmentHeaderAddress, tierEntries); } else { TierCountersArea.entries(tierCountersAreaAddr(), tierEntries); } }
public long lowestPossiblyFreeChunk() { if (tier == 0) { return segmentHeader.lowestPossiblyFreeChunk(segmentHeaderAddress); } else { return TierCountersArea.lowestPossiblyFreeChunkTiered(tierCountersAreaAddr()); } }
public void nextTierIndex(long nextTierIndex) { if (tier == 0) { segmentHeader.nextTierIndex(segmentHeaderAddress, nextTierIndex); } else { TierCountersArea.nextTierIndex(tierCountersAreaAddr(), nextTierIndex); } }
public long tierEntries() { if (tier == 0) { return segmentHeader.entries(segmentHeaderAddress); } else { return TierCountersArea.entries(tierCountersAreaAddr()); } }
public long nextTierIndex() { if (tier == 0) { return segmentHeader.nextTierIndex(segmentHeaderAddress); } else { return TierCountersArea.nextTierIndex(tierCountersAreaAddr()); } }
public void tierDeleted(long tierDeleted) { if (tier == 0) { segmentHeader.deleted(segmentHeaderAddress, tierDeleted); } else { TierCountersArea.deleted(tierCountersAreaAddr(), tierDeleted); } }
public long tierDeleted() { if (tier == 0) { return segmentHeader.deleted(segmentHeaderAddress); } else { return TierCountersArea.deleted(tierCountersAreaAddr()); } }
public void lowestPossiblyFreeChunk(long lowestPossiblyFreeChunk) { if (tier == 0) { segmentHeader.lowestPossiblyFreeChunk(segmentHeaderAddress, lowestPossiblyFreeChunk); } else { TierCountersArea.lowestPossiblyFreeChunkTiered( tierCountersAreaAddr(), lowestPossiblyFreeChunk); } }
@Stage("Locks") private void closeRootLocks() { verifyInnermostContext(); switch (localLockState) { case UNLOCKED: return; case READ_LOCKED: segmentHeader.readUnlock(segmentHeaderAddress); return; case UPDATE_LOCKED: segmentHeader.updateUnlock(segmentHeaderAddress); return; case WRITE_LOCKED: segmentHeader.writeUnlock(segmentHeaderAddress); } }
@Stage("Locks") public void readUnlockAndDecrementCount() { switch (localLockState) { case UNLOCKED: return; case READ_LOCKED: if (decrementRead() == 0) { if (updateZero() && writeZero()) segmentHeader.readUnlock(segmentHeaderAddress); } return; case UPDATE_LOCKED: if (decrementUpdate() == 0) { if (writeZero()) { if (readZero()) { segmentHeader.updateUnlock(segmentHeaderAddress); } else { segmentHeader.downgradeUpdateToReadLock(segmentHeaderAddress); } } } return; case WRITE_LOCKED: if (decrementWrite() == 0) { if (!updateZero()) { segmentHeader.downgradeWriteToUpdateLock(segmentHeaderAddress); } else { if (!readZero()) { segmentHeader.downgradeWriteToReadLock(segmentHeaderAddress); } else { segmentHeader.writeUnlock(segmentHeaderAddress); } } } } }