Output stream management fixes. I completely screwed up the output stream management system, but cleverly masked this fact by breaking some other stream management functionality that masked the problem.

Sigh.


git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@1630 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
hanna 2009-09-15 21:06:45 +00:00
parent 17758b381c
commit 9f7cf73411
1 changed files with 3 additions and 11 deletions

View File

@ -29,26 +29,18 @@ import org.broadinstitute.sting.gatk.io.stubs.Stub;
import org.broadinstitute.sting.gatk.io.storage.StorageFactory; import org.broadinstitute.sting.gatk.io.storage.StorageFactory;
import org.broadinstitute.sting.gatk.io.storage.Storage; import org.broadinstitute.sting.gatk.io.storage.Storage;
import java.util.Map;
import java.util.HashMap;
/** /**
* Javadoc goes here. * Maps creation of storage directly to output streams in parent.
* *
* @author mhanna * @author mhanna
* @version 0.1 * @version 0.1
*/ */
public class DirectOutputTracker extends OutputTracker { public class DirectOutputTracker extends OutputTracker {
/**
* Direct storage for output streams.
*/
private final Map<Stub, Storage> storage = new HashMap<Stub,Storage>();
public <T> T getStorage( Stub<T> stub ) { public <T> T getStorage( Stub<T> stub ) {
Storage target = storage.get(stub); Storage target = outputs.get(stub);
if( target == null ) { if( target == null ) {
target = StorageFactory.createStorage(stub); target = StorageFactory.createStorage(stub);
storage.put(stub, target); outputs.put(stub, target);
} }
return (T)target; return (T)target;
} }