com.bigdata.resources
Class AbstractAtomicUpdateTask<T>

java.lang.Object
  extended by com.bigdata.journal.AbstractTask<T>
      extended by com.bigdata.resources.AbstractResourceManagerTask<T>
          extended by com.bigdata.resources.AbstractAtomicUpdateTask<T>
All Implemented Interfaces:
ITask<T>, Callable<T>
Direct Known Subclasses:
CompactingMergeTask.AtomicUpdateCompactingMergeTask, IncrementalBuildTask.AtomicUpdateIncrementalBuildTask, JoinIndexPartitionTask.AtomicUpdateJoinIndexPartition, MoveTask.AtomicUpdate, SplitIndexPartitionTask.AtomicUpdateSplitIndexPartitionTask

public abstract class AbstractAtomicUpdateTask<T>
extends AbstractResourceManagerTask<T>

Abstract base class for tasks responsible for the atomic update of the view of an index partition.

Version:
$Id: AbstractAtomicUpdateTask.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson

Nested Class Summary
 
Nested classes/interfaces inherited from class com.bigdata.journal.AbstractTask
AbstractTask.DelegateTask<T>, AbstractTask.InnerReadWriteTxServiceCallable, AbstractTask.InnerWriteServiceCallable<T>, AbstractTask.ResubmitException
 
Field Summary
 
Fields inherited from class com.bigdata.resources.AbstractResourceManagerTask
DEBUG, INFO, log, resourceManager
 
Fields inherited from class com.bigdata.journal.AbstractTask
checkpointNanoTime, concurrencyManager, isReadWriteTx, nanoTime_assignedWorker, nanoTime_beginWork, nanoTime_finishedWork, nanoTime_submitTask, readOnly, taskCounters, timestamp, transactionManager, tx
 
Constructor Summary
AbstractAtomicUpdateTask(ResourceManager resourceManager, long timestamp, String resource)
           
AbstractAtomicUpdateTask(ResourceManager resourceManager, long timestamp, String[] resource)
           
 
Method Summary
protected  void assertSameIndex(UUID expectedIndexUUID, BTree view)
          Verifies that the view is a view of the expected scale-out index.
 
Methods inherited from class com.bigdata.resources.AbstractResourceManagerTask
toString
 
Methods inherited from class com.bigdata.journal.AbstractTask
assertResource, assertRunning, assertUnisolated, call, clearLoggingContext, doTask, dropIndex, getCommitTime, getIndex, getJournal, getOnlyResource, getResource, getResourceManager, getTaskCounters, getTaskName, getTimestamp, isResource, registerIndex, setupLoggingContext, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractAtomicUpdateTask

public AbstractAtomicUpdateTask(ResourceManager resourceManager,
                                long timestamp,
                                String[] resource)
Parameters:
resourceManager -
timestamp -
resource -

AbstractAtomicUpdateTask

public AbstractAtomicUpdateTask(ResourceManager resourceManager,
                                long timestamp,
                                String resource)
Parameters:
resourceManager -
timestamp -
resource -
indexUUID - The UUID associated with the scale-out index.
Method Detail

assertSameIndex

protected void assertSameIndex(UUID expectedIndexUUID,
                               BTree view)
Verifies that the view is a view of the expected scale-out index.

This is used to detect drop/add sequences where a scale-out index exists with the same name but a different index UUID. Atomic update tasks check for this and disallow the update in order to prevent incorporation of the old index state into the new index.

Parameters:
expectedIndexUUID - The expected index UUID.
view - BTree whose view will be re-defined (must be part of the same scale-out index).
Throws:
IllegalStateException - if the index UUID does not agree. FIXME make sure that everyone tests this.


Copyright © 2006-2009 SYSTAP, LLC. All Rights Reserved.