|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.service.ndx.AbstractScaleOutClientIndexView
com.bigdata.service.ndx.AbstractScaleOutClientIndexView2
public abstract class AbstractScaleOutClientIndexView2
Abstract class encapsulating MOST of the logic for executing tasks
corresponding to client index operations. StaleLocatorExceptions are
handled by the recursive application of the various submit()
methods.
A concrete subclass must implement runTasks(boolean, ArrayList).
| Field Summary |
|---|
| Fields inherited from class com.bigdata.service.ndx.AbstractScaleOutClientIndexView |
|---|
batchOnly, ERR_ABORT_TX, ERR_NEW_TX, fed, log, name, NON_BATCH_API, readConsistent, taskTimeout, timestamp, WARN |
| Fields inherited from interface com.bigdata.btree.IRangeQuery |
|---|
ALL, CURSOR, DEFAULT, DELETED, FIXED_LENGTH_SUCCESSOR, KEYS, NONE, PARALLEL, READONLY, REMOVEALL, REVERSE, VALS |
| Constructor Summary | |
|---|---|
AbstractScaleOutClientIndexView2(AbstractScaleOutFederation fed,
String name,
long timestamp,
IMetadataIndex metadataIndex)
Create a view on a scale-out index. |
|
| Method Summary | |
|---|---|
AtomicInteger |
getRecursionDepth()
Return a ThreadLocal AtomicInteger whose value is the
recursion depth of the current Thread. |
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. |
| Methods inherited from class com.bigdata.service.ndx.AbstractScaleOutClientIndexView |
|---|
contains, contains, getCounter, getCounters, getDataService, getFederation, getIndexMetadata, getMetadataIndex, getMetadataIndexMetadata, getMetadataService, getName, getResourceMetadata, getThreadPool, getTimestamp, getTupleSerializer, insert, insert, locatorScan, lookup, lookup, newWriteBuffer, rangeCount, rangeCount, rangeCountExact, rangeCountExactWithDeleted, rangeIterator, rangeIterator, rangeIterator, remove, remove, splitKeys, splitKeys, staleLocator, submit, submit, submit, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public 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.| Method Detail |
|---|
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 -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||