public final class OAutoShardingIndexEngine extends Object implements OIndexEngine
OBaseIndexEngine.Validator<K,V>, OBaseIndexEngine.ValuesTransformer
Modifier and Type | Field and Description |
---|---|
static 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.
|
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) |
Stream<ORawPair<Object,ORID>> |
descStream(OBaseIndexEngine.ValuesTransformer valuesTransformer) |
void |
flush() |
Object |
get(Object key) |
int |
getId() |
String |
getIndexNameByKey(Object key) |
String |
getName() |
OAutoShardingStrategy |
getStrategy() |
boolean |
hasRangeQuerySupport() |
void |
init(String indexName,
String indexType,
OIndexDefinition indexDefinition,
boolean isAutomatic,
ODocument metadata) |
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 |
put(OAtomicOperation atomicOperation,
Object key,
Object value) |
boolean |
remove(OAtomicOperation atomicOperation,
Object key) |
long |
size(OBaseIndexEngine.ValuesTransformer transformer) |
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 static final int VERSION
public int getId()
getId
in interface OBaseIndexEngine
public String getName()
getName
in interface OBaseIndexEngine
public OAutoShardingStrategy getStrategy()
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 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 void flush()
flush
in interface OBaseIndexEngine
public void delete(OAtomicOperation atomicOperation)
delete
in interface OBaseIndexEngine
public void init(String indexName, String indexType, OIndexDefinition indexDefinition, boolean isAutomatic, ODocument metadata)
init
in interface OBaseIndexEngine
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 long size(OBaseIndexEngine.ValuesTransformer transformer)
size
in interface OBaseIndexEngine
public boolean hasRangeQuerySupport()
hasRangeQuerySupport
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 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 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
Copyright © 2009–2020 OrientDB. All rights reserved.