org.intermine.dataloader
Class ParallelBatchingFetcher

java.lang.Object
  extended by org.intermine.dataloader.BaseEquivalentObjectFetcher
      extended by org.intermine.dataloader.HintingFetcher
          extended by org.intermine.dataloader.BatchingFetcher
              extended by org.intermine.dataloader.ParallelBatchingFetcher
All Implemented Interfaces:
EquivalentObjectFetcher

public class ParallelBatchingFetcher
extends BatchingFetcher

Class providing EquivalentObjectFetcher functionality that fetches batches of equivalent objects in parallel to improve performance.


Field Summary
 
Fields inherited from class org.intermine.dataloader.BatchingFetcher
batchQueried, cacheMisses, dataTracker, equivalents, source, timeSpentExecute, timeSpentPrefetchEquiv, timeSpentPrefetchTracker
 
Fields inherited from class org.intermine.dataloader.HintingFetcher
allPkClassesEmptyForClass, savedCounts, savedTimes
 
Fields inherited from class org.intermine.dataloader.BaseEquivalentObjectFetcher
idMap, lookupOs, model, summaryCallCounts, summaryCounts, summaryTimes
 
Constructor Summary
ParallelBatchingFetcher(BaseEquivalentObjectFetcher fetcher, DataTracker dataTracker, Source source)
          Constructor
 
Method Summary
 void close(Source source)
          Close method - prints out summary data.
protected  void doPks(java.util.Map<PrimaryKey,ClassDescriptor> pksToDo, java.util.Map<InterMineObject,java.util.Set<InterMineObject>> results, java.util.Map<ClassDescriptor,java.util.List<InterMineObject>> cldToObjectsForCld, long time1)
          Fetches data for the given primary keys.
 
Methods inherited from class org.intermine.dataloader.BatchingFetcher
canDoPkNow, doPk, getEquivalentsFor, getNoseyObjectStore, queryEquivalentObjects
 
Methods inherited from class org.intermine.dataloader.HintingFetcher
createPKQueriesForClass, createPKQueryForPK, getSummary
 
Methods inherited from class org.intermine.dataloader.BaseEquivalentObjectFetcher
createPKQuery, getIdMap, getLookupOs, getModel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParallelBatchingFetcher

public ParallelBatchingFetcher(BaseEquivalentObjectFetcher fetcher,
                               DataTracker dataTracker,
                               Source source)
Constructor

Parameters:
fetcher - another EquivalentObjectFetcher
dataTracker - a DataTracker object to pass prefetch instructions to
source - the data Source that is being loaded
Method Detail

close

public void close(Source source)
Close method - prints out summary data.

Overrides:
close in class BatchingFetcher
Parameters:
source - the Source used

doPks

protected void doPks(java.util.Map<PrimaryKey,ClassDescriptor> pksToDo,
                     java.util.Map<InterMineObject,java.util.Set<InterMineObject>> results,
                     java.util.Map<ClassDescriptor,java.util.List<InterMineObject>> cldToObjectsForCld,
                     long time1)
              throws ObjectStoreException
Fetches data for the given primary keys.

Overrides:
doPks in class BatchingFetcher
Parameters:
pksToDo - a Map of the primary keys to fetch
results - a Map to hold results that are to be added to the cache
cldToObjectsForCld - a Map of Lists of objects relevant to PrimaryKeys
time1 - the time that processing started
Throws:
ObjectStoreException - if something goes wrong