public class VfsAwareMapReduceIndex<Key,Value> extends MapReduceIndex<Key,Value,FileContent> implements UpdatableIndex<Key,Value,FileContent>
Modifier and Type | Field and Description |
---|---|
static int |
VERSION |
myExtension, myIndexer, myIndexId, myModificationStamp, myStorage, myValueExternalizer
ARE_COMPOSITE_INDEXERS_ENABLED
Constructor and Description |
---|
VfsAwareMapReduceIndex(IndexExtension<Key,Value,FileContent> extension,
IndexStorage<Key,Value> storage) |
VfsAwareMapReduceIndex(IndexExtension<Key,Value,FileContent> extension,
IndexStorage<Key,Value> storage,
ForwardIndex forwardIndexMap,
ForwardIndexAccessor<Key,Value> forwardIndexAccessor,
SnapshotInputMappings<Key,Value> snapshotInputMappings,
java.util.concurrent.locks.ReadWriteLock lock) |
VfsAwareMapReduceIndex(IndexExtension<Key,Value,FileContent> extension,
IndexStorage<Key,Value> storage,
SnapshotInputMappings<Key,Value> snapshotInputMappings) |
Modifier and Type | Method and Description |
---|---|
void |
checkCanceled() |
void |
cleanupForNextTest() |
void |
cleanupMemoryStorage() |
protected void |
doClear() |
protected void |
doDispose() |
protected void |
doFlush() |
java.util.Map<Key,Value> |
getIndexedFileData(int fileId) |
protected InputDataDiffBuilder<Key,Value> |
getKeysDiffBuilder(int inputId) |
protected InputDataDiffBuilder<Key,Value> |
getKeysDiffBuilderInMemoryMode(int inputId,
java.util.Map<Key,Value> keysAndValues) |
static boolean |
isCompositeIndexer(DataIndexer<?,?,?> indexer) |
protected boolean |
isIndexConfigurationUpToDate(int fileId,
IndexedFile file) |
boolean |
isIndexedStateForFile(int fileId,
IndexedFile file) |
protected InputData<Key,Value> |
mapInput(int inputId,
FileContent content) |
boolean |
processAllKeys(Processor<? super Key> processor,
GlobalSearchScope scope,
IdFilter idFilter) |
void |
removeTransientDataForFile(int inputId) |
protected void |
removeTransientDataForInMemoryKeys(int inputId,
java.util.Map<? extends Key,? extends Value> map) |
void |
removeTransientDataForKeys(int inputId,
java.util.Collection<? extends Key> keys) |
protected void |
requestRebuild(java.lang.Throwable ex) |
void |
resetIndexedStateForFile(int fileId) |
void |
setBufferingEnabled(boolean enabled) |
void |
setIndexedStateForFile(int fileId,
IndexedFile file) |
protected void |
updateForwardIndex(int inputId,
InputData<Key,Value> data) |
calculateUpdateData, checkValuesHaveProperEqualsAndHashCode, clear, createIndexUpdateComputation, dispose, flush, getData, getExtension, getForwardIndex, getForwardIndexAccessor, getLock, getModificationStamp, getReadLock, getStorage, getWriteLock, mapByIndexer, update, updateWithMap
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getExtension, getLock, getModificationStamp, getReadLock, getWriteLock, updateWithMap
public static final int VERSION
public VfsAwareMapReduceIndex(IndexExtension<Key,Value,FileContent> extension, IndexStorage<Key,Value> storage) throws java.io.IOException
java.io.IOException
public VfsAwareMapReduceIndex(IndexExtension<Key,Value,FileContent> extension, IndexStorage<Key,Value> storage, SnapshotInputMappings<Key,Value> snapshotInputMappings) throws java.io.IOException
java.io.IOException
public VfsAwareMapReduceIndex(IndexExtension<Key,Value,FileContent> extension, IndexStorage<Key,Value> storage, ForwardIndex forwardIndexMap, ForwardIndexAccessor<Key,Value> forwardIndexAccessor, SnapshotInputMappings<Key,Value> snapshotInputMappings, java.util.concurrent.locks.ReadWriteLock lock)
public static boolean isCompositeIndexer(DataIndexer<?,?,?> indexer)
protected InputData<Key,Value> mapInput(int inputId, FileContent content)
mapInput
in class MapReduceIndex<Key,Value,FileContent>
protected InputDataDiffBuilder<Key,Value> getKeysDiffBuilder(int inputId) throws java.io.IOException
getKeysDiffBuilder
in class MapReduceIndex<Key,Value,FileContent>
java.io.IOException
protected InputDataDiffBuilder<Key,Value> getKeysDiffBuilderInMemoryMode(int inputId, java.util.Map<Key,Value> keysAndValues)
protected void updateForwardIndex(int inputId, InputData<Key,Value> data) throws java.io.IOException
updateForwardIndex
in class MapReduceIndex<Key,Value,FileContent>
java.io.IOException
public void setIndexedStateForFile(int fileId, IndexedFile file)
setIndexedStateForFile
in interface UpdatableIndex<Key,Value,FileContent>
public void resetIndexedStateForFile(int fileId)
resetIndexedStateForFile
in interface UpdatableIndex<Key,Value,FileContent>
public boolean isIndexedStateForFile(int fileId, IndexedFile file)
isIndexedStateForFile
in interface UpdatableIndex<Key,Value,FileContent>
protected boolean isIndexConfigurationUpToDate(int fileId, IndexedFile file)
public void removeTransientDataForFile(int inputId)
removeTransientDataForFile
in interface UpdatableIndex<Key,Value,FileContent>
protected void removeTransientDataForInMemoryKeys(int inputId, java.util.Map<? extends Key,? extends Value> map)
public void removeTransientDataForKeys(int inputId, java.util.Collection<? extends Key> keys)
removeTransientDataForKeys
in interface UpdatableIndex<Key,Value,FileContent>
public void setBufferingEnabled(boolean enabled)
setBufferingEnabled
in interface UpdatableIndex<Key,Value,FileContent>
public void cleanupMemoryStorage()
cleanupMemoryStorage
in interface UpdatableIndex<Key,Value,FileContent>
public void cleanupForNextTest()
cleanupForNextTest
in interface UpdatableIndex<Key,Value,FileContent>
public boolean processAllKeys(Processor<? super Key> processor, GlobalSearchScope scope, IdFilter idFilter) throws StorageException
processAllKeys
in interface UpdatableIndex<Key,Value,FileContent>
StorageException
public java.util.Map<Key,Value> getIndexedFileData(int fileId) throws StorageException
getIndexedFileData
in interface UpdatableIndex<Key,Value,FileContent>
StorageException
public void checkCanceled()
checkCanceled
in class MapReduceIndex<Key,Value,FileContent>
protected void requestRebuild(java.lang.Throwable ex)
requestRebuild
in class MapReduceIndex<Key,Value,FileContent>
protected void doClear() throws StorageException, java.io.IOException
doClear
in class MapReduceIndex<Key,Value,FileContent>
StorageException
java.io.IOException
protected void doFlush() throws java.io.IOException, StorageException
doFlush
in class MapReduceIndex<Key,Value,FileContent>
java.io.IOException
StorageException
protected void doDispose() throws StorageException
doDispose
in class MapReduceIndex<Key,Value,FileContent>
StorageException