Class ReaderWriterLock.ReaderWriterNode

  • Enclosing class:
    ReaderWriterLock

    private static class ReaderWriterLock.ReaderWriterNode
    extends java.lang.Object
    A node for the waiting list.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int nAcquires
      The number of acquires.
      protected static int READER
      A reader.
      protected int state
      The state.
      protected java.lang.Thread t
      The thread.
      protected static int WRITER
      A writer.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private ReaderWriterNode​(java.lang.Thread t, int state)
      Creates a new node.
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • t

        protected java.lang.Thread t
        The thread.
      • state

        protected int state
        The state.
      • nAcquires

        protected int nAcquires
        The number of acquires.
    • Constructor Detail

      • ReaderWriterNode

        private ReaderWriterNode​(java.lang.Thread t,
                                 int state)
        Creates a new node.
        Parameters:
        t - the thread.
        state - the state.