Class OLuceneSpatialIndexEngineDelegator
java.lang.Object
com.orientechnologies.spatial.engine.OLuceneSpatialIndexEngineDelegator
- All Implemented Interfaces:
OLuceneIndexEngine,OBaseIndexEngine,OIndexEngine,OFreezableStorageComponent,OLuceneSpatialIndexContainer
public class OLuceneSpatialIndexEngineDelegator
extends Object
implements OLuceneIndexEngine, OLuceneSpatialIndexContainer
Created by Enrico Risa on 04/09/15.
-
Field Summary
Fields inherited from interface com.orientechnologies.orient.core.index.engine.OIndexEngine
VERSION -
Constructor Summary
ConstructorsConstructorDescriptionOLuceneSpatialIndexEngineDelegator(int id, String name, OStorage storage, int version) -
Method Summary
Modifier and TypeMethodDescriptionbooleanAcquires exclusive lock in the active atomic operation running on the current thread for this index engine.org.apache.lucene.document.DocumentbuildDocument(Object key, OIdentifiable value) org.apache.lucene.search.QuerybuildQuery(Object query) voidclear(OAtomicOperation atomicOperation) voidclose()voidcreate(OAtomicOperation atomicOperation, IndexEngineData data) voiddelete(OAtomicOperation atomicOperation) org.apache.lucene.search.QuerydeleteQuery(Object key, OIdentifiable value) descStream(IndexEngineValuesTransformer valuesTransformer) voidflush()voidfreeze(boolean throwException) After this method finished it's execution, all threads that are going to perform data modifications in storage should wait tillOFreezableStorageComponent.release()method will be called.intgetId()getIndexNameByKey(Object key) getInTx(Object key, OLuceneTxChanges changes) getName()intbooleanorg.apache.lucene.analysis.Analyzervoidinit(OIndexMetadata im) booleanbooleanisLegacy()iterateEntriesBetween(Object rangeFrom, boolean fromInclusive, Object rangeTo, boolean toInclusive, boolean ascSortOrder, IndexEngineValuesTransformer transformer) iterateEntriesMajor(Object fromKey, boolean isInclusive, boolean ascSortOrder, IndexEngineValuesTransformer transformer) iterateEntriesMinor(Object toKey, boolean isInclusive, boolean ascSortOrder, IndexEngineValuesTransformer transformer) voidload(IndexEngineData data) voidonRecordAddedToResultSet(OLuceneQueryContext queryContext, OContextualRecordId recordId, org.apache.lucene.document.Document ret, org.apache.lucene.search.ScoreDoc score) voidput(OAtomicOperation atomicOperation, Object key, ORID value) voidput(OAtomicOperation atomicOperation, Object key, Object value) org.apache.lucene.analysis.Analyzervoidrelease()After this method finished execution all threads that are waiting to perform data modifications in storage will be awaken and will be allowed to continue their execution.voidrelease(org.apache.lucene.search.IndexSearcher searcher) booleanremove(OAtomicOperation atomicOperation, Object key) booleanremove(OAtomicOperation atomicOperation, Object key, ORID value) booleanbooleanremove(Object key, OIdentifiable value) org.apache.lucene.search.IndexSearchersearcher()longsize(IndexEngineValuesTransformer transformer) longsizeInTx(OLuceneTxChanges changes) org.apache.lucene.spatial.SpatialStrategystrategy()stream(IndexEngineValuesTransformer valuesTransformer) voidupdate(OAtomicOperation atomicOperation, Object key, OIndexKeyUpdater<Object> updater) voidbooleanvalidatedPut(OAtomicOperation atomicOperation, Object key, ORID value, IndexEngineValidator<Object, ORID> validator) Puts the given value under the given key into this index engine.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.orientechnologies.orient.core.index.engine.OBaseIndexEngine
applyTxChanges, hasRidBagTreesSupportMethods inherited from interface com.orientechnologies.orient.core.index.engine.OIndexEngine
getEngineAPIVersion
-
Constructor Details
-
OLuceneSpatialIndexEngineDelegator
-
-
Method Details
-
getId
public int getId()- Specified by:
getIdin interfaceOBaseIndexEngine
-
init
- Specified by:
initin interfaceOBaseIndexEngine
-
flush
public void flush()- Specified by:
flushin interfaceOBaseIndexEngine
-
create
- Specified by:
createin interfaceOBaseIndexEngine- Throws:
IOException
-
delete
- Specified by:
deletein interfaceOBaseIndexEngine
-
load
- Specified by:
loadin interfaceOBaseIndexEngine
-
remove
- Specified by:
removein interfaceOBaseIndexEngine- Specified by:
removein interfaceOIndexEngine
-
clear
- Specified by:
clearin interfaceOBaseIndexEngine
-
close
public void close()- Specified by:
closein interfaceOBaseIndexEngine
-
get
- Specified by:
getin interfaceOIndexEngine
-
put
- Specified by:
putin interfaceOIndexEngine
-
update
- Specified by:
updatein interfaceOIndexEngine
-
validatedPut
public boolean validatedPut(OAtomicOperation atomicOperation, Object key, ORID value, IndexEngineValidator<Object, ORID> validator) Description copied from interface:OIndexEnginePuts the given value under the given key into this index engine. Validates the operation using the provided validator.- Specified by:
validatedPutin interfaceOBaseIndexEngine- Specified by:
validatedPutin interfaceOIndexEnginekey- the key to put the value under.value- the value to put.validator- the operation validator.- Returns:
trueif the validator allowed the put,falseotherwise.- See Also:
-
iterateEntriesBetween
public Stream<ORawPair<Object,ORID>> iterateEntriesBetween(Object rangeFrom, boolean fromInclusive, Object rangeTo, boolean toInclusive, boolean ascSortOrder, IndexEngineValuesTransformer transformer) - Specified by:
iterateEntriesBetweenin interfaceOBaseIndexEngine
-
iterateEntriesMajor
public Stream<ORawPair<Object,ORID>> iterateEntriesMajor(Object fromKey, boolean isInclusive, boolean ascSortOrder, IndexEngineValuesTransformer transformer) - Specified by:
iterateEntriesMajorin interfaceOBaseIndexEngine
-
iterateEntriesMinor
public Stream<ORawPair<Object,ORID>> iterateEntriesMinor(Object toKey, boolean isInclusive, boolean ascSortOrder, IndexEngineValuesTransformer transformer) - Specified by:
iterateEntriesMinorin interfaceOBaseIndexEngine
-
stream
- Specified by:
streamin interfaceOBaseIndexEngine
-
descStream
- Specified by:
descStreamin interfaceOBaseIndexEngine
-
keyStream
- Specified by:
keyStreamin interfaceOBaseIndexEngine
-
size
- Specified by:
sizein interfaceOBaseIndexEngine
-
hasRangeQuerySupport
public boolean hasRangeQuerySupport()- Specified by:
hasRangeQuerySupportin interfaceOBaseIndexEngine
-
getName
- Specified by:
getNamein interfaceOBaseIndexEngine
-
indexName
- Specified by:
indexNamein interfaceOLuceneIndexEngine
-
onRecordAddedToResultSet
public void onRecordAddedToResultSet(OLuceneQueryContext queryContext, OContextualRecordId recordId, org.apache.lucene.document.Document ret, org.apache.lucene.search.ScoreDoc score) - Specified by:
onRecordAddedToResultSetin interfaceOLuceneIndexEngine
-
buildDocument
- Specified by:
buildDocumentin interfaceOLuceneIndexEngine
-
buildQuery
- Specified by:
buildQueryin interfaceOLuceneIndexEngine
-
indexAnalyzer
public org.apache.lucene.analysis.Analyzer indexAnalyzer()- Specified by:
indexAnalyzerin interfaceOLuceneIndexEngine
-
queryAnalyzer
public org.apache.lucene.analysis.Analyzer queryAnalyzer()- Specified by:
queryAnalyzerin interfaceOLuceneIndexEngine
-
remove
- Specified by:
removein interfaceOLuceneIndexEngine
-
remove
- Specified by:
removein interfaceOLuceneIndexEngine
-
searcher
public org.apache.lucene.search.IndexSearcher searcher()- Specified by:
searcherin interfaceOLuceneIndexEngine- Specified by:
searcherin interfaceOLuceneSpatialIndexContainer
-
release
public void release(org.apache.lucene.search.IndexSearcher searcher) - Specified by:
releasein interfaceOLuceneIndexEngine
-
strategy
public org.apache.lucene.spatial.SpatialStrategy strategy()- Specified by:
strategyin interfaceOLuceneSpatialIndexContainer
-
isLegacy
public boolean isLegacy()- Specified by:
isLegacyin interfaceOLuceneSpatialIndexContainer
-
getInTx
- Specified by:
getInTxin interfaceOLuceneIndexEngine
-
sizeInTx
- Specified by:
sizeInTxin interfaceOLuceneIndexEngine
-
buildTxChanges
- Specified by:
buildTxChangesin interfaceOLuceneIndexEngine- Throws:
IOException
-
deleteQuery
- Specified by:
deleteQueryin interfaceOLuceneIndexEngine
-
isCollectionIndex
public boolean isCollectionIndex()- Specified by:
isCollectionIndexin interfaceOLuceneIndexEngine
-
freeze
public void freeze(boolean throwException) Description copied from interface:OFreezableStorageComponentAfter this method finished it's execution, all threads that are going to perform data modifications in storage should wait tillOFreezableStorageComponent.release()method will be called. This method will wait till all ongoing modifications will be finished.- Specified by:
freezein interfaceOFreezableStorageComponent- Parameters:
throwException- IftrueOModificationOperationProhibitedExceptionexception will be thrown on call of methods that requires storage modification. Otherwise other threads will wait forOFreezableStorageComponent.release()method call.
-
release
public void release()Description copied from interface:OFreezableStorageComponentAfter this method finished execution all threads that are waiting to perform data modifications in storage will be awaken and will be allowed to continue their execution.- Specified by:
releasein interfaceOFreezableStorageComponent
-
acquireAtomicExclusiveLock
Description copied from interface:OBaseIndexEngineAcquires exclusive lock in the active atomic operation running on the current thread for this index engine.If this index engine supports a more narrow locking, for example key-based sharding, it may use the provided
keyto infer a more narrow lock scope, but that is not a requirement.- Specified by:
acquireAtomicExclusiveLockin interfaceOBaseIndexEngine- Parameters:
key- the index key to lock.- Returns:
trueif this index was locked entirely,falseif this index locking is sensitive to the providedkeyand only some subset of this index was locked.
-
getIndexNameByKey
- Specified by:
getIndexNameByKeyin interfaceOBaseIndexEngine
-
put
- Specified by:
putin interfaceOBaseIndexEngine- Specified by:
putin interfaceOIndexEngine
-
remove
- Specified by:
removein interfaceOBaseIndexEngine- Specified by:
removein interfaceOIndexEngine
-
updateUniqueIndexVersion
- Specified by:
updateUniqueIndexVersionin interfaceOBaseIndexEngine
-
getUniqueIndexVersion
- Specified by:
getUniqueIndexVersionin interfaceOBaseIndexEngine
-
getDelegate
-