public interface IScaleOutClientIndex extends IClientIndex, ISplitter, IAsynchronousWriteBufferFactory
Modifier and Type | Method and Description |
---|---|
IDataService |
getDataService(PartitionLocator pmd)
Resolve the data service to which the index partition is mapped.
|
AbstractScaleOutFederation |
getFederation()
Return the object used to access the services in the connected
federation.
|
AtomicInteger |
getRecursionDepth()
|
Iterator<PartitionLocator> |
locatorScan(long ts,
byte[] fromKey,
byte[] toKey,
boolean reverseScan)
Returns an iterator that will visit the
PartitionLocator s for
the specified scale-out index key range. |
void |
staleLocator(long ts,
PartitionLocator locator,
StaleLocatorException cause)
Notifies the client that a
StaleLocatorException was received. |
getCounter, getName, getTimestamp
getCounters, getIndexMetadata, getResourceMetadata, submit, submit, submit
contains, insert, lookup, putIfAbsent, remove
contains, insert, lookup, remove
rangeCount, rangeCount, rangeCountExact, rangeCountExactWithDeleted, rangeIterator, rangeIterator, rangeIterator
newWriteBuffer
IDataService getDataService(PartitionLocator pmd)
pmd
- The index partition locator.null
.RuntimeException
- if none of the data services identified in the index
partition locator record could be discovered.Iterator<PartitionLocator> locatorScan(long ts, byte[] fromKey, byte[] toKey, boolean reverseScan)
PartitionLocator
s for
the specified scale-out index key range.ts
- The timestamp that will be used to visit the locators.fromKey
- The scale-out index first key that will be visited
(inclusive). When null
there is no lower bound.toKey
- The first scale-out index key that will NOT be visited
(exclusive). When null
there is no upper bound.reverseScan
- true
if you need to visit the index partitions
in reverse key order (this is done when the partitioned
iterator is scanning backwards).ITuple.getValue()
will be a serialized PartitionLocator
object.AbstractScaleOutFederation.locatorScan(String, long, byte[], byte[],
boolean)
void staleLocator(long ts, PartitionLocator locator, StaleLocatorException cause)
StaleLocatorException
was received.
The client will use this information to refresh the
IMetadataIndex
.ts
- The timestamp of the metadata index view from which the
locator was obtained.locator
- The locator that was stale.cause
- The reason why the locator became stale (split, join, or
move).RuntimeException
- unless the timestamp given is ITx.UNISOLATED
or
ITx.READ_COMMITTED
since stale locators do not occur
for other views.AtomicInteger getRecursionDepth()
ThreadLocal
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:
StaleLocatorException
s 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.AbstractScaleOutFederation getFederation()
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.