Class RunnableQueue.LockableLink

  • Enclosing class:
    RunnableQueue

    protected static class RunnableQueue.LockableLink
    extends RunnableQueue.Link
    To store a Runnable with an object waiting for him to be executed.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean locked
      Whether this link is actually locked.
    • Constructor Summary

      Constructors 
      Constructor Description
      LockableLink​(java.lang.Runnable r)
      Creates a new link.
    • Field Detail

      • locked

        private volatile boolean locked
        Whether this link is actually locked.
    • Constructor Detail

      • LockableLink

        public LockableLink​(java.lang.Runnable r)
        Creates a new link.
    • Method Detail

      • isLocked

        public boolean isLocked()
        Whether the link is actually locked.
      • lock

        public void lock()
                  throws java.lang.InterruptedException
        Locks this link.
        Throws:
        java.lang.InterruptedException