Package org.intermine.dataloader
Class ParallelBatchingFetcher
- java.lang.Object
-
- org.intermine.dataloader.BaseEquivalentObjectFetcher
-
- org.intermine.dataloader.HintingFetcher
-
- org.intermine.dataloader.BatchingFetcher
-
- 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.- Author:
- Matthew Wakeling
-
-
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
Constructors Constructor Description ParallelBatchingFetcher(BaseEquivalentObjectFetcher fetcher, DataTracker dataTracker, Source source)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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, getEquivalentsForObjects, 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
-
-
-
-
Constructor Detail
-
ParallelBatchingFetcher
public ParallelBatchingFetcher(BaseEquivalentObjectFetcher fetcher, DataTracker dataTracker, Source source)
Constructor- Parameters:
fetcher
- another EquivalentObjectFetcherdataTracker
- a DataTracker object to pass prefetch instructions tosource
- the data Source that is being loaded
-
-
Method Detail
-
close
public void close(Source source)
Close method - prints out summary data.- Overrides:
close
in classBatchingFetcher
- 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 classBatchingFetcher
- Parameters:
pksToDo
- a Map of the primary keys to fetchresults
- a Map to hold results that are to be added to the cachecldToObjectsForCld
- a Map of Lists of objects relevant to PrimaryKeystime1
- the time that processing started- Throws:
ObjectStoreException
- if something goes wrong
-
-