Class GridStripedSpinBusyLock


  • public class GridStripedSpinBusyLock
    extends Object
    Striped spin busy lock. Aimed to provide efficient "read" lock semantics while still maintaining safety when entering "busy" state.
    • Constructor Detail

      • GridStripedSpinBusyLock

        public GridStripedSpinBusyLock()
        Default constructor.
      • GridStripedSpinBusyLock

        public GridStripedSpinBusyLock​(int stripeCnt)
        Constructor.
        Parameters:
        stripeCnt - Amount of stripes.
    • Method Detail

      • enterBusy

        public boolean enterBusy()
        Enter busy state.
        Returns:
        True if entered busy state.
      • leaveBusy

        public void leaveBusy()
        Leave busy state.
      • block

        public void block()
        Block.