/** * Allocate a new slot and register it. * * This function chooses an empty slot, initializes it, and then returns * the relevant Slot object. * * @return The new slot. */ synchronized public final Slot allocAndRegisterSlot( ExtendedBlockId blockId) { int idx = allocatedSlots.nextClearBit(0); if (idx >= slots.length) { throw new RuntimeException(this + ": no more slots are available."); } allocatedSlots.set(idx, true); Slot slot = new Slot(calculateSlotAddress(idx), blockId); slot.clear(); slot.makeValid(); slots[idx] = slot; if (LOG.isTraceEnabled()) { LOG.trace(this + ": allocAndRegisterSlot " + idx + ": allocatedSlots=" + allocatedSlots + StringUtils.getStackTrace(Thread.currentThread())); } return slot; }
/** * Allocate a new slot and register it. * * This function chooses an empty slot, initializes it, and then returns * the relevant Slot object. * * @return The new slot. */ synchronized public final Slot allocAndRegisterSlot( ExtendedBlockId blockId) { int idx = allocatedSlots.nextClearBit(0); if (idx >= slots.length) { throw new RuntimeException(this + ": no more slots are available."); } allocatedSlots.set(idx, true); Slot slot = new Slot(calculateSlotAddress(idx), blockId); slot.clear(); slot.makeValid(); slots[idx] = slot; if (LOG.isTraceEnabled()) { LOG.trace(this + ": allocAndRegisterSlot " + idx + ": allocatedSlots=" + allocatedSlots + StringUtils.getStackTrace(Thread.currentThread())); } return slot; }
/** * Allocate a new slot and register it. * * This function chooses an empty slot, initializes it, and then returns * the relevant Slot object. * * @return The new slot. */ synchronized public final Slot allocAndRegisterSlot( ExtendedBlockId blockId) { int idx = allocatedSlots.nextClearBit(0); if (idx >= slots.length) { throw new RuntimeException(this + ": no more slots are available."); } allocatedSlots.set(idx, true); Slot slot = new Slot(calculateSlotAddress(idx), blockId); slot.clear(); slot.makeValid(); slots[idx] = slot; if (LOG.isTraceEnabled()) { LOG.trace(this + ": allocAndRegisterSlot " + idx + ": allocatedSlots=" + allocatedSlots + StringUtils.getStackTrace(Thread.currentThread())); } return slot; }
" is already in use."); Slot slot = new Slot(calculateSlotAddress(slotIdx), blockId); if (!slot.isValid()) { throw new InvalidRequestException(this + ": slot " + slotIdx +
" is already in use."); Slot slot = new Slot(calculateSlotAddress(slotIdx), blockId); if (!slot.isValid()) { throw new InvalidRequestException(this + ": slot " + slotIdx +
" is already in use."); Slot slot = new Slot(calculateSlotAddress(slotIdx), blockId); if (!slot.isValid()) { throw new InvalidRequestException(this + ": slot " + slotIdx +