Module stormpot

Class BSlotPadded<T extends Poolable>

java.lang.Object
stormpot.internal.BSlot<T>
stormpot.internal.BSlotPadded<T>
Type Parameters:
T - The concrete poolable type.
All Implemented Interfaces:
Slot, SlotInfo<T>

public class BSlotPadded<T extends Poolable> extends BSlot<T>
A BSlot type with extra padding to ensure each slot is on their own CPU cache line.
  • Constructor Details

    • BSlotPadded

      public BSlotPadded(BlockingQueue<BSlot<T>> live, AtomicLong poisonedSlots)
      Create a new BSlot instance, which will return to the given live queue when released from a claim, and update the given counter when poisoned.
      Parameters:
      live - The queue of live slots.
      poisonedSlots - The counter of poisoned slots.