public abstract class OIndexRemote extends Object implements OIndex
Modifier and Type | Field and Description |
---|---|
protected Set<String> |
clustersToIndex |
protected ODocument |
configuration |
protected String |
databaseName |
protected OIndexDefinition |
indexDefinition |
protected String |
name |
protected static String |
QUERY_ENTRIES |
protected static String |
QUERY_ENTRIES_DESC |
static String |
QUERY_GET_VALUES_AND_OPERATOR |
static String |
QUERY_GET_VALUES_BEETWEN_EXCLUSIVE_FROM_CONDITION |
static String |
QUERY_GET_VALUES_BEETWEN_EXCLUSIVE_TO_CONDITION |
static String |
QUERY_GET_VALUES_BEETWEN_INCLUSIVE_FROM_CONDITION |
static String |
QUERY_GET_VALUES_BEETWEN_INCLUSIVE_TO_CONDITION |
static String |
QUERY_GET_VALUES_BEETWEN_SELECT |
static String |
QUERY_GET_VALUES_LIMIT |
MERGE_KEYS
Constructor and Description |
---|
OIndexRemote(String iName,
String iWrappedType,
String algorithm,
ORID iRid,
OIndexDefinition iIndexDefinition,
ODocument iConfiguration,
Set<String> clustersToIndex,
String database) |
Modifier and Type | Method and Description |
---|---|
void |
automaticRebuild() |
OIndexRemote |
clear()
Clears the index removing all the entries in one shot.
|
int |
compareTo(OIndex index) |
boolean |
contains(Object iKey) |
long |
count(Object iKey)
Counts the entries for the key.
|
long |
count(Object iRangeFrom,
boolean iFromInclusive,
Object iRangeTo,
boolean iToInclusive,
int maxValuesToFetch) |
OIndexRemote |
create(String name,
OIndexDefinition indexDefinition,
String clusterIndexName,
Set<String> clustersToIndex,
boolean rebuild,
OProgressListener progressListener) |
OIndexCursor |
cursor() |
OIndexRemote |
delete()
Delete the index.
|
OIndexCursor |
descCursor() |
boolean |
equals(Object o) |
void |
flush()
Flushes in-memory changes to disk.
|
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.
|
protected ODatabaseDocumentInternal |
getDatabase() |
String |
getDatabaseName() |
OIndexDefinition |
getDefinition() |
Collection<ODocument> |
getEntries(Collection<?> iKeys) |
Object |
getFirstKey() |
ORID |
getIdentity() |
int |
getIndexId() |
OIndexInternal |
getInternal()
Returns the internal index used.
|
long |
getKeySize() |
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() |
ODocument |
getMetadata() |
String |
getName()
Returns the index name.
|
long |
getRebuildVersion() |
long |
getSize() |
String |
getType()
Returns the type of the index as string.
|
int |
getVersion()
Returns binary format version for this index.
|
int |
hashCode() |
boolean |
isAutomatic()
Tells if the index is automatic.
|
boolean |
isRebuilding() |
boolean |
isUnique() |
OIndexCursor |
iterateEntries(Collection<?> keys,
boolean ascSortOrder)
Returns cursor which presents data associated with passed in keys.
|
OIndexCursor |
iterateEntriesBetween(Object fromKey,
boolean fromInclusive,
Object toKey,
boolean toInclusive,
boolean ascOrder)
Returns cursor which presents subset of index data between passed in keys.
|
OIndexCursor |
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.
|
OIndexCursor |
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.
|
OIndexKeyCursor |
keyCursor() |
OIndexRemote |
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.
|
int |
remove(OIdentifiable iRecord) |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
get, supportsOrderedIterations
public static final String QUERY_GET_VALUES_BEETWEN_SELECT
public static final String QUERY_GET_VALUES_BEETWEN_INCLUSIVE_FROM_CONDITION
public static final String QUERY_GET_VALUES_BEETWEN_EXCLUSIVE_FROM_CONDITION
public static final String QUERY_GET_VALUES_BEETWEN_INCLUSIVE_TO_CONDITION
public static final String QUERY_GET_VALUES_BEETWEN_EXCLUSIVE_TO_CONDITION
public static final String QUERY_GET_VALUES_AND_OPERATOR
public static final String QUERY_GET_VALUES_LIMIT
protected static final String QUERY_ENTRIES
protected static final String QUERY_ENTRIES_DESC
protected final String databaseName
protected OIndexDefinition indexDefinition
protected String name
protected ODocument configuration
public OIndexRemote create(String name, OIndexDefinition indexDefinition, String clusterIndexName, Set<String> clustersToIndex, boolean rebuild, OProgressListener progressListener)
public OIndexRemote delete()
OIndex
public String getDatabaseName()
getDatabaseName
in interface OIndex
public long getRebuildVersion()
getRebuildVersion
in interface OIndex
public boolean contains(Object iKey)
public long count(Object iKey)
OIndex
public long count(Object iRangeFrom, boolean iFromInclusive, Object iRangeTo, boolean iToInclusive, int maxValuesToFetch)
public OIndexRemote put(Object key, OIdentifiable value)
OIndex
public boolean remove(Object key)
OIndex
public boolean remove(Object key, OIdentifiable rid)
OIndex
public int remove(OIdentifiable iRecord)
public int getVersion()
OIndex
getVersion
in interface OIndex
public void automaticRebuild()
public long rebuild()
OIndex
public OIndexRemote clear()
OIndex
public long getSize()
public long getKeySize()
getKeySize
in interface OIndex
public boolean isAutomatic()
OIndex
isAutomatic
in interface OIndex
public void flush()
OIndex
public String getType()
OIndex
public String getAlgorithm()
OIndex
getAlgorithm
in interface OIndex
public ODocument getConfiguration()
OIndex
getConfiguration
in interface OIndex
public ODocument getMetadata()
getMetadata
in interface OIndex
public ORID getIdentity()
public OIndexInternal getInternal()
OIndex
getInternal
in interface OIndex
public long rebuild(OProgressListener iProgressListener)
OIndex
public OType[] getKeyTypes()
OIndex
getKeyTypes
in interface OIndex
public Collection<ODocument> getEntries(Collection<?> iKeys)
public OIndexDefinition getDefinition()
getDefinition
in interface OIndex
public Set<String> getClusters()
OIndex
getClusters
in interface OIndex
public boolean isRebuilding()
isRebuilding
in interface OIndex
OIndex.getRebuildVersion()
public Object getFirstKey()
getFirstKey
in interface OIndex
public Object getLastKey()
getLastKey
in interface OIndex
public OIndexCursor iterateEntriesBetween(Object fromKey, boolean fromInclusive, Object toKey, boolean toInclusive, boolean ascOrder)
OIndex
iterateEntriesBetween
in interface OIndex
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.public OIndexCursor iterateEntriesMajor(Object fromKey, boolean fromInclusive, boolean ascOrder)
OIndex
iterateEntriesMajor
in interface OIndex
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.public OIndexCursor iterateEntriesMinor(Object toKey, boolean toInclusive, boolean ascOrder)
OIndex
iterateEntriesMinor
in interface OIndex
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.public OIndexCursor iterateEntries(Collection<?> keys, boolean ascSortOrder)
OIndex
iterateEntries
in interface OIndex
keys
- Keys data of which should be returned.ascSortOrder
- Flag which determines whether data iterated by cursor should be in
ascending or descending order.public int getIndexId()
getIndexId
in interface OIndex
public OIndexCursor cursor()
public OIndexCursor descCursor()
descCursor
in interface OIndex
public OIndexKeyCursor keyCursor()
public int compareTo(OIndex index)
compareTo
in interface Comparable<OIndex>
protected ODatabaseDocumentInternal getDatabase()
Copyright © 2009–2020 OrientDB. All rights reserved.