public interface OIndex extends Comparable<OIndex>
Modifier and Type | Field and Description |
---|---|
static String |
MERGE_KEYS |
Modifier and Type | Method and Description |
---|---|
OIndex |
clear()
Deprecated.
Manual indexes are deprecated and will be removed
|
long |
count(Object iKey)
Deprecated.
Use
index.getInternal().getRids(key).count() instead. This API only
for internal use !. |
OIndex |
create(String name,
OIndexDefinition indexDefinition,
String clusterIndexName,
Set<String> clustersToIndex,
boolean rebuild,
OProgressListener progressListener) |
OIndexCursor |
cursor()
Deprecated.
Use
index.getInternal().stream() instead. This API only for internal
use ! |
OIndex |
delete()
Delete the index.
|
OIndexCursor |
descCursor()
Deprecated.
Use
index.getInternal().descStream() instead. This API only for
internal use ! |
void |
flush()
Deprecated.
|
Object |
get(Object key)
Deprecated.
Use
OIndexInternal.getRids(Object) instead, but only as internal (not
public) API. |
String |
getAlgorithm()
Returns the engine of the index as string.
|
Set<String> |
getClusters()
Returns Names of clusters that will be indexed.
|
ODocument |
getConfiguration()
Returns the index configuration.
|
String |
getDatabaseName() |
OIndexDefinition |
getDefinition() |
Object |
getFirstKey()
Deprecated.
Use
index.getInternal().stream().findFirst().map(pair->pair.first)
instead. This API only for internal use ! |
int |
getIndexId() |
OIndexInternal |
getInternal()
Returns the internal index used.
|
long |
getKeySize()
Deprecated.
Use
index.getInternal().getRids(key).distinct().count() instead. This
API only for internal use !. |
OType[] |
getKeyTypes()
Types of the keys that index can accept, if index contains composite key, list of types of
elements from which this index consist will be returned, otherwise single element (key type
obviously) will be returned.
|
Object |
getLastKey()
Deprecated.
Use
index.getInternal().descStream().findFirst().map(pair->pair.first)
instead. This API only for internal use ! |
ODocument |
getMetadata() |
String |
getName()
Returns the index name.
|
long |
getRebuildVersion()
Deprecated.
|
long |
getSize()
Deprecated.
Use
OIndexInternal.size() instead. This API only for internal use !. |
String |
getType()
Returns the type of the index as string.
|
int |
getVersion()
Returns binary format version for this index.
|
boolean |
isAutomatic()
Tells if the index is automatic.
|
boolean |
isRebuilding()
Deprecated.
|
boolean |
isUnique() |
OIndexCursor |
iterateEntries(Collection<?> keys,
boolean ascSortOrder)
Deprecated.
Use
OIndexInternal.streamEntries(Collection, boolean) instead. This API
only for internal use ! |
OIndexCursor |
iterateEntriesBetween(Object fromKey,
boolean fromInclusive,
Object toKey,
boolean toInclusive,
boolean ascOrder)
Deprecated.
Use
OIndexInternal.streamEntriesBetween(Object, boolean, Object, boolean,
boolean) instead. This API only * for internal use ! |
OIndexCursor |
iterateEntriesMajor(Object fromKey,
boolean fromInclusive,
boolean ascOrder)
Deprecated.
Use
OIndexInternal.streamEntriesMajor(Object, boolean, boolean) instead.
This API only for internal use ! |
OIndexCursor |
iterateEntriesMinor(Object toKey,
boolean toInclusive,
boolean ascOrder)
Deprecated.
Use
OIndexInternal.streamEntriesMinor(Object, boolean, boolean) instead.
This API only for internal use ! |
OIndexKeyCursor |
keyCursor()
Deprecated.
Use
index.getInternal().keyStream() instead. This API only for
internal use ! |
OIndex |
put(Object key,
OIdentifiable value)
Inserts a new entry in the index.
|
long |
rebuild()
Rebuilds an automatic index.
|
long |
rebuild(OProgressListener iProgressListener)
Populate the index with all the existent records.
|
boolean |
remove(Object key)
Removes an entry by its key.
|
boolean |
remove(Object key,
OIdentifiable rid)
Removes an entry by its key and value.
|
boolean |
supportsOrderedIterations() |
compareTo
static final String MERGE_KEYS
OIndex create(String name, OIndexDefinition indexDefinition, String clusterIndexName, Set<String> clustersToIndex, boolean rebuild, OProgressListener progressListener)
String getDatabaseName()
OType[] getKeyTypes()
@Deprecated Object get(Object key)
OIndexInternal.getRids(Object)
instead, but only as internal (not
public) API.key
- The key to searchOIndex put(Object key, OIdentifiable value)
key
- Entry's keyvalue
- Entry's value as OIdentifiable instanceboolean remove(Object key)
key
- The entry's key to removeboolean remove(Object key, OIdentifiable rid)
key
- The entry's key to remove@Deprecated OIndex clear()
@Deprecated long getSize()
OIndexInternal.size()
instead. This API only for internal use !.@Deprecated long count(Object iKey)
index.getInternal().getRids(key).count()
instead. This API only
for internal use !.@Deprecated long getKeySize()
index.getInternal().getRids(key).distinct().count()
instead. This
API only for internal use !.@Deprecated void flush()
@Deprecated long getRebuildVersion()
@Deprecated boolean isRebuilding()
getRebuildVersion()
@Deprecated Object getFirstKey()
index.getInternal().stream().findFirst().map(pair->pair.first)
instead. This API only for internal use !@Deprecated Object getLastKey()
index.getInternal().descStream().findFirst().map(pair->pair.first)
instead. This API only for internal use !@Deprecated OIndexCursor cursor()
index.getInternal().stream()
instead. This API only for internal
use !@Deprecated OIndexCursor descCursor()
index.getInternal().descStream()
instead. This API only for
internal use !@Deprecated OIndexKeyCursor keyCursor()
index.getInternal().keyStream()
instead. This API only for
internal use !OIndex delete()
String getName()
String getType()
String getAlgorithm()
int getVersion()
boolean isAutomatic()
long rebuild()
long rebuild(OProgressListener iProgressListener)
ODocument getConfiguration()
OIndexInternal getInternal()
OIndexDefinition getDefinition()
Set<String> getClusters()
@Deprecated OIndexCursor iterateEntries(Collection<?> keys, boolean ascSortOrder)
OIndexInternal.streamEntries(Collection, boolean)
instead. This API
only for internal use !keys
- Keys data of which should be returned.ascSortOrder
- Flag which determines whether data iterated by cursor should be in
ascending or descending order.@Deprecated OIndexCursor iterateEntriesBetween(Object fromKey, boolean fromInclusive, Object toKey, boolean toInclusive, boolean ascOrder)
OIndexInternal.streamEntriesBetween(Object, boolean, Object, boolean,
boolean)
instead. This API only * for internal use !fromKey
- Lower border of index data.fromInclusive
- Indicates whether lower border should be inclusive or exclusive.toKey
- Upper border of index data.toInclusive
- Indicates whether upper border should be inclusive or exclusive.ascOrder
- Flag which determines whether data iterated by cursor should be in ascending or
descending order.@Deprecated OIndexCursor iterateEntriesMajor(Object fromKey, boolean fromInclusive, boolean ascOrder)
OIndexInternal.streamEntriesMajor(Object, boolean, boolean)
instead.
This API only for internal use !fromKey
- Lower border of index data.fromInclusive
- Indicates whether lower border should be inclusive or exclusive.ascOrder
- Flag which determines whether data iterated by cursor should be in ascending or
descending order.@Deprecated OIndexCursor iterateEntriesMinor(Object toKey, boolean toInclusive, boolean ascOrder)
OIndexInternal.streamEntriesMinor(Object, boolean, boolean)
instead.
This API only for internal use !toKey
- Upper border of index data.toInclusive
- Indicates Indicates whether upper border should be inclusive or exclusive.ascOrder
- Flag which determines whether data iterated by cursor should be in ascending or
descending order.ODocument getMetadata()
boolean supportsOrderedIterations()
int getIndexId()
boolean isUnique()
Copyright © 2009–2020 OrientDB. All rights reserved.