Code example for ReentrantReadWriteLock.ReadLock

Methods: lock, unlock

0
        } 
 
        String version;
 
        ReadLock lock = dataLock.readLock();
        lock.lock();
        try { 
            checkLoaded(); 
            version = data.getVersion(packageKey);
        } finally { 
            lock.unlock();
        } 
 
        return version;
    } 
 
    /** 
     * For internal use only - Removes the static data object to simulate the first load in the system. This should 
     * not be called by production code and is only for testing purposes. 
     */