public class OLuceneSpatialIndexEngineDelegator extends Object implements OLuceneIndexEngine, OLuceneSpatialIndexContainer
OBaseIndexEngine.Validator<K,V>, OBaseIndexEngine.ValuesTransformer
VERSION
Constructor and Description |
---|
OLuceneSpatialIndexEngineDelegator(int id,
String name,
Boolean durableInNonTxMode,
OStorage storage,
int version) |
Modifier and Type | Method and Description |
---|---|
boolean |
acquireAtomicExclusiveLock(Object key)
Acquires exclusive lock in the active atomic operation running on the current thread for this
index engine.
|
org.apache.lucene.document.Document |
buildDocument(Object key,
OIdentifiable value) |
org.apache.lucene.search.Query |
buildQuery(Object query) |
OLuceneTxChanges |
buildTxChanges() |
void |
clear(OAtomicOperation atomicOperation) |
void |
close() |
void |
create(OAtomicOperation atomicOperation,
OBinarySerializer valueSerializer,
boolean isAutomatic,
OType[] keyTypes,
boolean nullPointerSupport,
OBinarySerializer keySerializer,
int keySize,
Map<String,String> engineProperties,
OEncryption encryption) |
void |
delete(OAtomicOperation atomicOperation) |
org.apache.lucene.search.Query |
deleteQuery(Object key,
OIdentifiable value) |
Stream<ORawPair<Object,ORID>> |
descStream(OBaseIndexEngine.ValuesTransformer valuesTransformer) |
void |
flush() |
void |
freeze(boolean throwException)
After this method finished it's execution, all threads that are going to perform data
modifications in storage should wait till
OFreezableStorageComponent.release() method will be called. |
Object |
get(Object key) |
OLuceneIndexEngine |
getDelegate() |
int |
getId() |
String |
getIndexNameByKey(Object key) |
Set<OIdentifiable> |
getInTx(Object key,
OLuceneTxChanges changes) |
String |
getName() |
boolean |
hasRangeQuerySupport() |
org.apache.lucene.analysis.Analyzer |
indexAnalyzer() |
String |
indexName() |
void |
init(String indexName,
String indexType,
OIndexDefinition indexDefinition,
boolean isAutomatic,
ODocument metadata) |
boolean |
isCollectionIndex() |
boolean |
isLegacy() |
Stream<ORawPair<Object,ORID>> |
iterateEntriesBetween(Object rangeFrom,
boolean fromInclusive,
Object rangeTo,
boolean toInclusive,
boolean ascSortOrder,
OBaseIndexEngine.ValuesTransformer transformer) |
Stream<ORawPair<Object,ORID>> |
iterateEntriesMajor(Object fromKey,
boolean isInclusive,
boolean ascSortOrder,
OBaseIndexEngine.ValuesTransformer transformer) |
Stream<ORawPair<Object,ORID>> |
iterateEntriesMinor(Object toKey,
boolean isInclusive,
boolean ascSortOrder,
OBaseIndexEngine.ValuesTransformer transformer) |
Stream<Object> |
keyStream() |
void |
load(String indexName,
OBinarySerializer valueSerializer,
boolean isAutomatic,
OBinarySerializer keySerializer,
OType[] keyTypes,
boolean nullPointerSupport,
int keySize,
Map<String,String> engineProperties,
OEncryption encryption) |
void |
onRecordAddedToResultSet(OLuceneQueryContext queryContext,
OContextualRecordId recordId,
org.apache.lucene.document.Document ret,
org.apache.lucene.search.ScoreDoc score) |
void |
put(OAtomicOperation atomicOperation,
Object key,
Object value) |
org.apache.lucene.analysis.Analyzer |
queryAnalyzer() |
void |
release()
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.
|
void |
release(org.apache.lucene.search.IndexSearcher searcher) |
boolean |
remove(OAtomicOperation atomicOperation,
Object key) |
boolean |
remove(Object key,
OIdentifiable value) |
org.apache.lucene.search.IndexSearcher |
searcher() |
long |
size(OBaseIndexEngine.ValuesTransformer transformer) |
long |
sizeInTx(OLuceneTxChanges changes) |
org.apache.lucene.spatial.SpatialStrategy |
strategy() |
Stream<ORawPair<Object,ORID>> |
stream(OBaseIndexEngine.ValuesTransformer valuesTransformer) |
void |
update(OAtomicOperation atomicOperation,
Object key,
OIndexKeyUpdater<Object> updater) |
boolean |
validatedPut(OAtomicOperation atomicOperation,
Object key,
ORID value,
OBaseIndexEngine.Validator<Object,ORID> validator)
Puts the given value under the given key into this index engine.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getEngineAPIVersion
public int getId()
getId
in interface OBaseIndexEngine
public void init(String indexName, String indexType, OIndexDefinition indexDefinition, boolean isAutomatic, ODocument metadata)
init
in interface OBaseIndexEngine
public void flush()
flush
in interface OBaseIndexEngine
public void create(OAtomicOperation atomicOperation, OBinarySerializer valueSerializer, boolean isAutomatic, OType[] keyTypes, boolean nullPointerSupport, OBinarySerializer keySerializer, int keySize, Map<String,String> engineProperties, OEncryption encryption)
create
in interface OBaseIndexEngine
public void delete(OAtomicOperation atomicOperation)
delete
in interface OBaseIndexEngine
public void load(String indexName, OBinarySerializer valueSerializer, boolean isAutomatic, OBinarySerializer keySerializer, OType[] keyTypes, boolean nullPointerSupport, int keySize, Map<String,String> engineProperties, OEncryption encryption)
load
in interface OIndexEngine
public boolean remove(OAtomicOperation atomicOperation, Object key)
remove
in interface OIndexEngine
public void clear(OAtomicOperation atomicOperation)
clear
in interface OBaseIndexEngine
public void close()
close
in interface OBaseIndexEngine
public Object get(Object key)
get
in interface OIndexEngine
public void put(OAtomicOperation atomicOperation, Object key, Object value)
put
in interface OIndexEngine
public void update(OAtomicOperation atomicOperation, Object key, OIndexKeyUpdater<Object> updater)
update
in interface OIndexEngine
public boolean validatedPut(OAtomicOperation atomicOperation, Object key, ORID value, OBaseIndexEngine.Validator<Object,ORID> validator)
OIndexEngine
validatedPut
in interface OIndexEngine
key
- the key to put the value under.value
- the value to put.validator
- the operation validator.true
if the validator allowed the put, false
otherwise.Validator#validate(Object, Object, Object)
public Stream<ORawPair<Object,ORID>> iterateEntriesBetween(Object rangeFrom, boolean fromInclusive, Object rangeTo, boolean toInclusive, boolean ascSortOrder, OBaseIndexEngine.ValuesTransformer transformer)
iterateEntriesBetween
in interface OBaseIndexEngine
public Stream<ORawPair<Object,ORID>> iterateEntriesMajor(Object fromKey, boolean isInclusive, boolean ascSortOrder, OBaseIndexEngine.ValuesTransformer transformer)
iterateEntriesMajor
in interface OBaseIndexEngine
public Stream<ORawPair<Object,ORID>> iterateEntriesMinor(Object toKey, boolean isInclusive, boolean ascSortOrder, OBaseIndexEngine.ValuesTransformer transformer)
iterateEntriesMinor
in interface OBaseIndexEngine
public Stream<ORawPair<Object,ORID>> stream(OBaseIndexEngine.ValuesTransformer valuesTransformer)
stream
in interface OBaseIndexEngine
public Stream<ORawPair<Object,ORID>> descStream(OBaseIndexEngine.ValuesTransformer valuesTransformer)
descStream
in interface OBaseIndexEngine
public Stream<Object> keyStream()
keyStream
in interface OBaseIndexEngine
public long size(OBaseIndexEngine.ValuesTransformer transformer)
size
in interface OBaseIndexEngine
public boolean hasRangeQuerySupport()
hasRangeQuerySupport
in interface OBaseIndexEngine
public String getName()
getName
in interface OBaseIndexEngine
public String indexName()
indexName
in interface OLuceneIndexEngine
public void onRecordAddedToResultSet(OLuceneQueryContext queryContext, OContextualRecordId recordId, org.apache.lucene.document.Document ret, org.apache.lucene.search.ScoreDoc score)
onRecordAddedToResultSet
in interface OLuceneIndexEngine
public org.apache.lucene.document.Document buildDocument(Object key, OIdentifiable value)
buildDocument
in interface OLuceneIndexEngine
public org.apache.lucene.search.Query buildQuery(Object query)
buildQuery
in interface OLuceneIndexEngine
public org.apache.lucene.analysis.Analyzer indexAnalyzer()
indexAnalyzer
in interface OLuceneIndexEngine
public org.apache.lucene.analysis.Analyzer queryAnalyzer()
queryAnalyzer
in interface OLuceneIndexEngine
public boolean remove(Object key, OIdentifiable value)
remove
in interface OLuceneIndexEngine
public org.apache.lucene.search.IndexSearcher searcher()
searcher
in interface OLuceneIndexEngine
searcher
in interface OLuceneSpatialIndexContainer
public void release(org.apache.lucene.search.IndexSearcher searcher)
release
in interface OLuceneIndexEngine
public org.apache.lucene.spatial.SpatialStrategy strategy()
strategy
in interface OLuceneSpatialIndexContainer
public boolean isLegacy()
isLegacy
in interface OLuceneSpatialIndexContainer
public Set<OIdentifiable> getInTx(Object key, OLuceneTxChanges changes)
getInTx
in interface OLuceneIndexEngine
public long sizeInTx(OLuceneTxChanges changes)
sizeInTx
in interface OLuceneIndexEngine
public OLuceneTxChanges buildTxChanges() throws IOException
buildTxChanges
in interface OLuceneIndexEngine
IOException
public org.apache.lucene.search.Query deleteQuery(Object key, OIdentifiable value)
deleteQuery
in interface OLuceneIndexEngine
public boolean isCollectionIndex()
isCollectionIndex
in interface OLuceneIndexEngine
public void freeze(boolean throwException)
OFreezableStorageComponent
OFreezableStorageComponent.release()
method will be called. This method
will wait till all ongoing modifications will be finished.freeze
in interface OFreezableStorageComponent
throwException
- If true
OModificationOperationProhibitedException
exception will be thrown on call of methods that requires storage modification. Otherwise
other threads will wait for OFreezableStorageComponent.release()
method call.public void release()
OFreezableStorageComponent
release
in interface OFreezableStorageComponent
public boolean acquireAtomicExclusiveLock(Object key)
OBaseIndexEngine
If this index engine supports a more narrow locking, for example key-based sharding, it may
use the provided key
to infer a more narrow lock scope, but that is not a requirement.
acquireAtomicExclusiveLock
in interface OBaseIndexEngine
key
- the index key to lock.true
if this index was locked entirely, false
if this index locking is
sensitive to the provided key
and only some subset of this index was locked.public String getIndexNameByKey(Object key)
getIndexNameByKey
in interface OBaseIndexEngine
public OLuceneIndexEngine getDelegate()
Copyright © 2009–2020 OrientDB. All rights reserved.