Class OIndexRemote
java.lang.Object
com.orientechnologies.orient.core.index.OIndexRemote
- All Implemented Interfaces:
OIndex,Comparable<OIndex>
- Direct Known Subclasses:
OIndexRemoteMultiValue,OIndexRemoteOneValue
Proxied abstract index.
- Author:
- Luca Garulli (l.garulli--(at)--orientdb.com)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ODocumentprotected final Stringprotected OIndexDefinitionprotected Stringprotected static final Stringprotected static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
ConstructorsConstructorDescriptionOIndexRemote(String iName, String iWrappedType, String algorithm, ORID iRid, OIndexDefinition iIndexDefinition, ODocument iConfiguration, Set<String> clustersToIndex, String database) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears the index removing all the entries in one shot.intbooleanlongCounts the entries for the key.longcount(Object iRangeFrom, boolean iFromInclusive, Object iRangeTo, boolean iToInclusive, int maxValuesToFetch) create(OIndexMetadata indexMetadata, boolean rebuild, OProgressListener progressListener) cursor()delete()Delete the index.booleanvoidflush()Flushes in-memory changes to disk.Returns the engine of the index as string.Returns Names of clusters that will be indexed.Returns the index configuration.protected ODatabaseDocumentInternalgetEntries(Collection<?> iKeys) Returns the internal index used.longOType[]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.getName()Returns the index name.longlonggetSize()getType()Returns the type of the index as string.intReturns binary format version for this index.inthashCode()booleanTells if the index is automatic.booleanbooleanisUnique()iterateEntries(Collection<?> keys, boolean ascSortOrder) Returns cursor which presents data associated with passed in keys.iterateEntriesBetween(Object fromKey, boolean fromInclusive, Object toKey, boolean toInclusive, boolean ascOrder) Returns cursor which presents subset of index data between passed in keys.iterateEntriesMajor(Object fromKey, boolean fromInclusive, boolean ascOrder) Returns cursor which presents subset of data which associated with key which is greater than passed in key.iterateEntriesMinor(Object toKey, boolean toInclusive, boolean ascOrder) Returns cursor which presents subset of data which associated with key which is less than passed in key.put(Object key, OIdentifiable value) Inserts a new entry in the index.longrebuild()Rebuilds an automatic index.longrebuild(OProgressListener iProgressListener) Populate the index with all the existent records.booleanRemoves an entry by its key.booleanremove(Object key, OIdentifiable rid) Removes an entry by its key and value.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.orientechnologies.orient.core.index.OIndex
get, supportsOrderedIterations
-
Field Details
-
QUERY_GET_VALUES_BEETWEN_SELECT
- See Also:
-
QUERY_GET_VALUES_BEETWEN_INCLUSIVE_FROM_CONDITION
- See Also:
-
QUERY_GET_VALUES_BEETWEN_EXCLUSIVE_FROM_CONDITION
- See Also:
-
QUERY_GET_VALUES_BEETWEN_INCLUSIVE_TO_CONDITION
- See Also:
-
QUERY_GET_VALUES_BEETWEN_EXCLUSIVE_TO_CONDITION
- See Also:
-
QUERY_GET_VALUES_AND_OPERATOR
- See Also:
-
QUERY_GET_VALUES_LIMIT
- See Also:
-
QUERY_ENTRIES
- See Also:
-
QUERY_ENTRIES_DESC
- See Also:
-
databaseName
-
indexDefinition
-
name
-
configuration
-
clustersToIndex
-
-
Constructor Details
-
OIndexRemote
-
-
Method Details
-
create
public OIndexRemote create(OIndexMetadata indexMetadata, boolean rebuild, OProgressListener progressListener) -
delete
Description copied from interface:OIndexDelete the index. -
getDatabaseName
- Specified by:
getDatabaseNamein interfaceOIndex
-
getRebuildVersion
public long getRebuildVersion()- Specified by:
getRebuildVersionin interfaceOIndex
-
contains
-
count
Description copied from interface:OIndexCounts the entries for the key. -
count
-
put
Description copied from interface:OIndexInserts a new entry in the index. The behaviour depends by the index implementation. -
remove
Description copied from interface:OIndexRemoves an entry by its key. -
remove
Description copied from interface:OIndexRemoves an entry by its key and value. -
getVersion
public int getVersion()Description copied from interface:OIndexReturns binary format version for this index. Index format changes during system development but old formats are supported for binary compatibility. This method may be used to detect version of binary format which is used by current index and upgrade index to new one.- Specified by:
getVersionin interfaceOIndex- Returns:
- Returns binary format version for this index if possible, otherwise -1.
-
automaticRebuild
public void automaticRebuild() -
rebuild
public long rebuild()Description copied from interface:OIndexRebuilds an automatic index. -
clear
Description copied from interface:OIndexClears the index removing all the entries in one shot. -
getSize
public long getSize() -
getKeySize
public long getKeySize()- Specified by:
getKeySizein interfaceOIndex- Returns:
- Number of keys in index
-
isAutomatic
public boolean isAutomatic()Description copied from interface:OIndexTells if the index is automatic. Automatic means it's maintained automatically by OrientDB. This is the case of indexes created against schema properties. Automatic indexes can always been rebuilt.- Specified by:
isAutomaticin interfaceOIndex- Returns:
- True if the index is automatic, otherwise false
-
isUnique
public boolean isUnique() -
getName
Description copied from interface:OIndexReturns the index name. -
flush
public void flush()Description copied from interface:OIndexFlushes in-memory changes to disk. -
getType
Description copied from interface:OIndexReturns the type of the index as string. -
getAlgorithm
Description copied from interface:OIndexReturns the engine of the index as string.- Specified by:
getAlgorithmin interfaceOIndex
-
getConfiguration
Description copied from interface:OIndexReturns the index configuration.- Specified by:
getConfigurationin interfaceOIndex- Returns:
- An ODocument object containing all the index properties
-
getMetadata
- Specified by:
getMetadatain interfaceOIndex
-
getIdentity
-
getInternal
Description copied from interface:OIndexReturns the internal index used.- Specified by:
getInternalin interfaceOIndex
-
rebuild
Description copied from interface:OIndexPopulate the index with all the existent records. -
getKeyTypes
Description copied from interface:OIndexTypes 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.- Specified by:
getKeyTypesin interfaceOIndex
-
getEntries
-
getDefinition
- Specified by:
getDefinitionin interfaceOIndex
-
equals
-
hashCode
public int hashCode() -
getClusters
Description copied from interface:OIndexReturns Names of clusters that will be indexed.- Specified by:
getClustersin interfaceOIndex- Returns:
- Names of clusters that will be indexed.
-
isRebuilding
public boolean isRebuilding()- Specified by:
isRebuildingin interfaceOIndex- Returns:
- Indicates whether index is rebuilding at the moment.
- See Also:
-
getFirstKey
- Specified by:
getFirstKeyin interfaceOIndex
-
getLastKey
- Specified by:
getLastKeyin interfaceOIndex
-
iterateEntriesBetween
public OIndexCursor iterateEntriesBetween(Object fromKey, boolean fromInclusive, Object toKey, boolean toInclusive, boolean ascOrder) Description copied from interface:OIndexReturns cursor which presents subset of index data between passed in keys.- Specified by:
iterateEntriesBetweenin interfaceOIndex- Parameters:
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.- Returns:
- Cursor which presents subset of index data between passed in keys.
-
iterateEntriesMajor
Description copied from interface:OIndexReturns cursor which presents subset of data which associated with key which is greater than passed in key.- Specified by:
iterateEntriesMajorin interfaceOIndex- Parameters:
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.- Returns:
- cursor which presents subset of data which associated with key which is greater than passed in key.
-
iterateEntriesMinor
Description copied from interface:OIndexReturns cursor which presents subset of data which associated with key which is less than passed in key.- Specified by:
iterateEntriesMinorin interfaceOIndex- Parameters:
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.- Returns:
- cursor which presents subset of data which associated with key which is less than passed in key.
-
iterateEntries
Description copied from interface:OIndexReturns cursor which presents data associated with passed in keys.- Specified by:
iterateEntriesin interfaceOIndex- Parameters:
keys- Keys data of which should be returned.ascSortOrder- Flag which determines whether data iterated by cursor should be in ascending or descending order.- Returns:
- cursor which presents data associated with passed in keys.
-
cursor
-
descCursor
- Specified by:
descCursorin interfaceOIndex
-
keyCursor
-
compareTo
- Specified by:
compareToin interfaceComparable<OIndex>
-
getDatabase
-