public abstract class AbstractScaleOutClientIndexView2 extends AbstractScaleOutClientIndexView
StaleLocatorExceptions are
handled by the recursive application of the various submit()
methods.
A concrete subclass must implement runTasks(boolean, ArrayList).
batchOnly, ERR_ABORT_TX, ERR_NEW_TX, fed, log, name, NON_BATCH_API, readConsistent, taskTimeout, timestamp, WARN| Constructor and Description |
|---|
AbstractScaleOutClientIndexView2(AbstractScaleOutFederation fed,
String name,
long timestamp,
IMetadataIndex metadataIndex)
Create a view on a scale-out index.
|
| Modifier and Type | Method and Description |
|---|---|
AtomicInteger |
getRecursionDepth()
|
protected abstract void |
runTasks(boolean parallel,
ArrayList<com.bigdata.service.ndx.AbstractDataServiceProcedureTask> tasks)
Runs set of tasks.
|
protected void |
submit(long ts,
byte[] fromKey,
byte[] toKey,
IKeyRangeIndexProcedure proc,
IResultHandler resultHandler)
Variant uses the caller's timestamp.
|
protected Object |
submit(long ts,
byte[] key,
ISimpleIndexProcedure proc)
Variant uses the caller's timestamp.
|
protected void |
submit(long ts,
int fromIndex,
int toIndex,
byte[][] keys,
byte[][] vals,
AbstractKeyArrayIndexProcedureConstructor ctor,
IResultHandler aggregator)
Variant uses the caller's timestamp.
|
contains, contains, getCounter, getCounters, getDataService, getFederation, getIndexMetadata, getMetadataIndex, getMetadataIndexMetadata, getMetadataService, getName, getResourceMetadata, getThreadPool, getTimestamp, getTupleSerializer, insert, insert, locatorScan, lookup, lookup, newWriteBuffer, putIfAbsent, rangeCount, rangeCount, rangeCountExact, rangeCountExactWithDeleted, rangeIterator, rangeIterator, rangeIterator, remove, remove, splitKeys, splitKeys, staleLocator, submit, submit, submit, toStringpublic AbstractScaleOutClientIndexView2(AbstractScaleOutFederation fed, String name, long timestamp, IMetadataIndex metadataIndex)
fed - The federation containing the index.name - The index name.timestamp - A transaction identifier, ITx.UNISOLATED for the
unisolated index view, ITx.READ_COMMITTED, or
timestamp for a historical view no later than
the specified timestamp.metadataIndex - The IMetadataIndex for the named scale-out index as of
that timestamp. Note that the IndexMetadata on this
object contains the template IndexMetadata for the
scale-out index partitions.public final AtomicInteger getRecursionDepth()
IScaleOutClientIndexThreadLocal AtomicInteger whose value is the
recursion depth of the current Thread. This is initially zero
when the task is submitted by the application. The value incremented when
a task results in a StaleLocatorException and is decremented when
returning from the recursive handling of the
StaleLocatorException.
The recursion depth is used:
StaleLocatorExceptions for
a split of a task submitted by the applicationthread pool then all threads in the pool can
rapidly become busy awaiting retry tasks with the result that the client
is essentially deadlocked.protected abstract void runTasks(boolean parallel,
ArrayList<com.bigdata.service.ndx.AbstractDataServiceProcedureTask> tasks)
parallel - true iff the tasks MAY be run in parallel.tasks - The tasks to be executed.protected Object submit(long ts, byte[] key, ISimpleIndexProcedure proc)
submit in class AbstractScaleOutClientIndexViewts - key - proc - protected void submit(long ts,
byte[] fromKey,
byte[] toKey,
IKeyRangeIndexProcedure proc,
IResultHandler resultHandler)
submit in class AbstractScaleOutClientIndexViewts - fromKey - toKey - proc - resultHandler - protected void submit(long ts,
int fromIndex,
int toIndex,
byte[][] keys,
byte[][] vals,
AbstractKeyArrayIndexProcedureConstructor ctor,
IResultHandler aggregator)
submit in class AbstractScaleOutClientIndexViewts - fromIndex - toIndex - keys - vals - ctor - aggregator - Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.