Package java.util.concurrent.locks

Examples of java.util.concurrent.locks.Lock.unlock()


     * Unlocks a tag file path. Use this after loading it.
     * @param tagFilePath Tag file path
     */
    public void unlockTagFileLoading(final String tagFilePath) {
        final Lock lock = getTagFileLoadingLock(tagFilePath);
        lock.unlock();
    }

    /**
     * Process a "destroy" event for this web application context.
     */
 
View Full Code Here


        try {
            lock.lock();
            Dictionary loaded = ( Dictionary ) cache.get( pid );
            if ( loaded == null && !fullyLoaded )
            {
                lock.unlock();
                lock = globalLock.writeLock();
                lock.lock();
                loaded = ( Dictionary ) cache.get( pid );
                if ( loaded == null )
                {
View Full Code Here

                    cache.put(pid, loaded);
                }
            }
            return copy( loaded );
        } finally {
            lock.unlock();
        }
    }


    /**
 
View Full Code Here

        try {
            lock.lock();
            pm.store( pid, properties );
            cache.put( pid, copy( properties ) );
        } finally {
            lock.unlock();
        }
    }


    /**
 
View Full Code Here

        try {
            lock.lock();
            cache.remove( pid );
            pm.delete(pid);
        } finally {
            lock.unlock();
        }
    }


    /**
 
View Full Code Here

        Lock lock = globalLock.readLock();
        try {
            lock.lock();
            return cache.containsKey( pid ) || ( !fullyLoaded && pm.exists( pid ) );
        } finally {
            lock.unlock();
        }
    }


    /**
 
View Full Code Here

            lock.lock();
            // if not fully loaded, call back to the underlying persistence
            // manager and cach all dictionaries whose service.pid is set
            if ( !fullyLoaded )
            {
                lock.unlock();
                lock = globalLock.writeLock();
                lock.lock();
                if ( !fullyLoaded )
                {
                    Enumeration fromPm = pm.getDictionaries();
View Full Code Here

            {
                configs.add( copy( ( Dictionary ) o ) );
            }
            return configs.elements();
        } finally {
            lock.unlock();
        }
    }


    /**
 
View Full Code Here

            }
            catch (Throwable t)
            {
               if (lock != null)
               {
                  lock.unlock();
                  lock = null;
               }

               if (t instanceof HornetQException)
               {
View Full Code Here

            }
            finally
            {
               if (lock != null)
               {
                  lock.unlock();
               }

               // Execution has finished so notify any failover thread that may be waiting for us to be done
               inCreateSession = false;
               inCreateSessionLatch.countDown();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.