List of usage examples for java.util.concurrent.locks ReentrantReadWriteLock writeLock
public ReentrantReadWriteLock.WriteLock writeLock()
From source file:org.pentaho.di.trans.step.BaseStep.java
/** * Adds the result file.//from ww w .j a v a 2s . c o m * * @param resultFile the result file */ public void addResultFile(ResultFile resultFile) { ReentrantReadWriteLock.WriteLock lock = resultFilesLock.writeLock(); lock.lock(); try { resultFiles.put(resultFile.getFile().toString(), resultFile); } finally { lock.unlock(); } }