public class IndexProcedureTask<T> extends AbstractTask<T>
IIndexProcedure
to be executed
on an IConcurrencyManager
.AbstractTask.DelegateTask<T>, AbstractTask.InnerReadWriteTxServiceCallable<T>, AbstractTask.InnerWriteServiceCallable<T>, AbstractTask.ResubmitException
checkpointNanoTime, concurrencyManager, isReadWriteTx, log, nanoTime_assignedWorker, nanoTime_beginWork, nanoTime_finishedWork, nanoTime_submitTask, readOnly, resourceManager, taskCounters, timestamp, transactionManager, tx
Constructor and Description |
---|
IndexProcedureTask(ConcurrencyManager concurrencyManager,
long startTime,
String name,
IIndexProcedure<T> proc) |
Modifier and Type | Method and Description |
---|---|
T |
doTask()
Implement the task behavior here.
|
protected String |
getTaskName()
Returns the name of the
IIndexProcedure that is being executed. |
assertResource, assertRunning, assertUnisolated, call, clearLoggingContext, dropIndex, getCommitTime, getIndex, getJournal, getOnlyResource, getResource, getResourceManager, getTaskCounters, getTimestamp, isResource, registerIndex, setupLoggingContext, toString
public IndexProcedureTask(ConcurrencyManager concurrencyManager, long startTime, String name, IIndexProcedure<T> proc)
public final T doTask() throws Exception
AbstractTask
Note: Long-running implementations MUST periodically test
Thread.interrupted()
and MUST throw an exception, such as
InterruptedException
, if they are interrupted. This behavior
allows tasks to be canceled in a timely manner.
If you ignore or fail to test Thread.interrupted()
then your task
CAN NOT be aborted. If it is Future.cancel(boolean)
with
false
then the task will run to completion even though it
has been cancelled (but the Future
will appear to have been
cancelled).
If you simply return
rather than throwing an exception
then the WriteExecutorService
will assume that your task
completed and your (partial) results will be made restart-safe at the
next commit!
doTask
in class AbstractTask<T>
AbstractTask.call()
iff the
operation succeeds.Exception
- The exception that will be thrown by AbstractTask.call()
iff the
operation fails.InterruptedException
- This exception SHOULD be thrown if
Thread.interrupted()
becomes true during
execution.protected final String getTaskName()
IIndexProcedure
that is being executed.getTaskName
in class AbstractTask<T>
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.