public class MutationTask extends AbstractStepTask
action, indexManager, joinNexusFactory, log, step| Modifier | Constructor and Description | 
|---|---|
| protected  | MutationTask(ActionEnum action,
            IJoinNexusFactory joinNexusFactory,
            IStep step,
            IIndexManager indexManager,
            DataService dataService) | 
| Modifier and Type | Method and Description | 
|---|---|
| RuleStats | call()Run the task. | 
| protected void | flushBuffers(IJoinNexus joinNexus,
            Map<String,IBuffer<ISolution[]>> buffers)Flush the buffer(s) and aggregate the mutation count from each buffer. | 
| protected long | getMutationCountFromBuffers(RuleStats totals,
                           Map<String,IBuffer<ISolution[]>> buffers)This just reads off and aggregates the mutationCount from each buffer as
 reported by  IBuffer.flush(). | 
| protected List<Callable<RuleStats>> | newMutationTasks(IStep step,
                IJoinNexus joinNexus,
                Map<String,IBuffer<ISolution[]>> buffers)Builds a set of tasks for the program. | 
clone, getIndexNames, getMutationBuffers, getReadRelations, getWriteRelationNames, getWriteRelations, runOne, runParallel, runSequential, submit, toStringgetDataService, isDataService, setDataServicegetFederation, setFederationequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetFederation, setFederationprotected MutationTask(ActionEnum action, IJoinNexusFactory joinNexusFactory, IStep step, IIndexManager indexManager, DataService dataService)
public RuleStats call() throws Exception
Note: We can create the individual tasks that we need to execute now that we are in the correct execution context.
 Note: The mutation tasks write on IBuffers and those buffers
 flush to indices in the IMutableRelations. We have to defer the
 creation of those buffers until we are in the execution context and have
 access to the correct indices. In turn, this means that we can not create
 the tasks that we are going to execute until we have those buffers on
 hand. Hence everything gets deferred until we are in the correct
 execution context and have the actual IIndexManager with which
 the tasks will execute.
Exceptionprotected void flushBuffers(IJoinNexus joinNexus, Map<String,IBuffer<ISolution[]>> buffers) throws InterruptedException, ExecutionException
MutationTask (no double-counting).protected long getMutationCountFromBuffers(RuleStats totals, Map<String,IBuffer<ISolution[]>> buffers)
IBuffer.flush(). This is the actual mutation count
 for the step(s) executed by the MutationTask (no
 double-counting).
 
 Note: The buffers SHOULD already have been flushed as this does NOT
 parallelise the writes on the IMutableRelations. See
 #flushBuffers(IJoinNexus, RuleStats, Map), which does
 parallelize those writes.
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.