1314151617181920212223
Sync rl, wl; protected void setUp() throws Exception { super.setUp(); ReadWriteLock l=new ReentrantWriterPreferenceReadWriteLock(); rl=l.readLock(); wl=l.writeLock(); } protected void tearDown() throws Exception { super.tearDown();
208209210211212213214215216217218
if ( lock == null ) { lock = new FIFOReadWriteLock(); this.locks.put(file.getAbsolutePath(), lock); } } Sync sync = lock.readLock(); try { sync.acquire(); try { String content = IOUtils.deserializeString(file); return content.getBytes();
240241242243244245246247248249250