Package EDU.oswego.cs.dl.util.concurrent

Examples of EDU.oswego.cs.dl.util.concurrent.ReentrantLock


        super(name);
    }

    public void setUp() throws Exception {
        super.setUp();
        lock=new ReentrantLock();
    }
View Full Code Here


   public Lock( LockManager lockManager,
                Object      key )
   {
      m_lockManager    = lockManager;
      m_key            = key;
      m_lock           = new ReentrantLock(  );
   }
View Full Code Here

   public Lock( LockManager lockManager,
                Object      key )
   {
      m_lockManager    = lockManager;
      m_key            = key;
      m_lock           = new ReentrantLock(  );
   }
View Full Code Here

    {
        if( size < 1 )
            throw new IllegalArgumentException( "Cannot specify an unbounded Queue" );

        m_elements = new Object[ size + 1 ];
        m_mutex = new ReentrantLock();
    }
View Full Code Here

    public DefaultQueue( EnqueuePredicate predicate )
    {
        setEnqueuePredicate( predicate );

        m_mutex = new ReentrantLock();
        m_elements = new UnboundedFifoBuffer();
        m_reserve = 0;
        m_maxSize = -1;
    }
View Full Code Here

     * Create the CommandManager
     */
    public CommandManager() {
        m_queue = new DefaultQueue();
        m_signalHandlers = new HashMap();
        m_mutex = new ReentrantLock();
        m_eventHandler = new CommandEventHandler(Collections.unmodifiableMap(m_signalHandlers));
        m_sources = new Source[]{m_queue};
        m_failureHandler = NullCommandFailureHandler.SHARED_INSTANCE;
        m_queue.setEnqueuePredicate(this);
        m_isAccepting = true;
View Full Code Here

    {
        if( size < 1 )
            throw new IllegalArgumentException( "Cannot specify an unbounded Queue" );

        m_elements = new Object[ size + 1 ];
        m_mutex = new ReentrantLock();
    }
View Full Code Here

    public DefaultQueue( EnqueuePredicate predicate )
    {
        setEnqueuePredicate( predicate );

        m_mutex = new ReentrantLock();
        m_elements = new UnboundedFifoBuffer();
        m_reserve = 0;
        m_maxSize = -1;
    }
View Full Code Here

     */
    public CommandManager()
    {
        m_queue = new DefaultQueue();
        m_signalHandlers = new HashMap();
        m_mutex = new ReentrantLock();
        m_eventHandler = new CommandEventHandler( Collections.unmodifiableMap( m_signalHandlers ) );
        m_sources = new Source[]{m_queue};
    }
View Full Code Here

/*      */
/*      */ class RlockRNG extends SyncDelegatedRNG
/*      */ {
/*      */   public RlockRNG()
/*      */   {
/* 1971 */     super(new ReentrantLock());
/*      */   }
View Full Code Here

TOP

Related Classes of EDU.oswego.cs.dl.util.concurrent.ReentrantLock

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.