Java Thread Lock lock(Lock lock)

Here you can find the source of lock(Lock lock)

Description

Simply locks passed Lock object

License

Open Source License

Parameter

Parameter Description
lock a parameter

Declaration

public static void lock(Lock lock) 

Method Source Code

//package com.java2s;
/*/*ww  w .  j a v  a 2s  .  co m*/
 * Lightmare, Lightweight embedded EJB container (works for stateless session beans) with JPA / Hibernate support
 *
 * Copyright (c) 2013, Levan Tsinadze, or third-party contributors as
 * indicated by the @author tags or express copyright attribution
 * statements applied by the authors.
 *
 * This copyrighted material is made available to anyone wishing to use, modify,
 * copy, or redistribute it subject to the terms and conditions of the GNU
 * Lesser General Public License, as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
 * for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this distribution; if not, write to:
 * Free Software Foundation, Inc.
 * 51 Franklin Street, Fifth Floor
 * Boston, MA  02110-1301  USA
 */

import java.util.concurrent.locks.Lock;

public class Main {
    /**
     * Simply locks passed {@link Lock} object
     * 
     * @param lock
     */
    public static void lock(Lock lock) {
        lock.lock();
    }
}

Related

  1. getInstance()
  2. getLocaleProperties(Locale locale)
  3. getPropLock(String s)
  4. loadClass(String className)
  5. loadClassWithRegisteredClassLoaders(String className)
  6. lock(Lock lock)
  7. lockAll(List locks)
  8. lockedSleep(Lock l, long time)
  9. newLinkedBlockingDeque(Collection collection)