Interface IndexInfo
Captures information related to index
-
Method Summary
Modifier and TypeMethodDescription@Nullable StringReturns name of the async index lane to which this index is bound to or null if it's not an async indexlongTime in millis at which index definition was createdlongAn estimate of entry count in the index@Nullable StringIf the index definition has changed without doing any reindexing then this method can be used to determine the diff in the index definitionlongReturns time in millis of the repository state up to which index is up-to-date.Returns paths of index definition in the repositorylongTime in millis at which index was last updatedlongTime in millis at which index was last re indexedlongIndex data storage sizelongIndex suggest data storage sizegetType()Returns type of index definition like 'property' or 'lucene'booleanDetermines if a hidden oak libs mount node is presentbooleanDetermines if index definition has changed but no reindexing was done for that change.booleanDetermines if :property-index node is presentbooleanisActive()Determines if the index is active (can be used for queries)voidsetActive(boolean value) Sets whether an index is active (can be used for queries)
-
Method Details
-
getIndexPath
String getIndexPath()Returns paths of index definition in the repository -
getType
String getType()Returns type of index definition like 'property' or 'lucene' -
getAsyncLaneName
Returns name of the async index lane to which this index is bound to or null if it's not an async index -
getLastUpdatedTime
long getLastUpdatedTime()Time in millis at which index was last updated- Returns:
- time in millis or -1 if unknown, -2 if synchronous
-
getIndexedUpToTime
long getIndexedUpToTime()Returns time in millis of the repository state up to which index is up-to-date. This may or may not be same as#getLastUpdatedTime. For e.g. consider an index at /oak:index/fooIndex bound to async lane "async". The index might have got updated 2 cycle ago when async indexer traversed content node which were indexed by this index and it was not updated in last index cycle. ThenindexedUptoTimeis the time of last complete cycle whilelastUpdatedTimeis the time of 2nd last cycle- Returns:
- time in millis or -1 if unknown
-
getEstimatedEntryCount
long getEstimatedEntryCount()An estimate of entry count in the index -
getSizeInBytes
long getSizeInBytes()Index data storage size- Returns:
- storage size or -1 if unknown
-
hasIndexDefinitionChangedWithoutReindexing
boolean hasIndexDefinitionChangedWithoutReindexing()Determines if index definition has changed but no reindexing was done for that change. -
getIndexDefinitionDiff
If the index definition has changed without doing any reindexing then this method can be used to determine the diff in the index definition- Returns:
- diff if the definition change otherwise null
-
hasHiddenOakLibsMount
boolean hasHiddenOakLibsMount()Determines if a hidden oak libs mount node is present- Returns:
- true in case of composite node store with indexed content from read-only part of repository, false otherwise
-
hasPropertyIndexNode
boolean hasPropertyIndexNode()Determines if :property-index node is present- Returns:
- true if the index is hybrid and has :property-index node, false otherwise.
-
setActive
void setActive(boolean value) Sets whether an index is active (can be used for queries) -
isActive
boolean isActive()Determines if the index is active (can be used for queries)- Returns:
- true if yes
-
getSuggestSizeInBytes
long getSuggestSizeInBytes()Index suggest data storage size- Returns:
- storage size or -1 if unknown
-
getCreationTimestamp
long getCreationTimestamp()Time in millis at which index definition was created- Returns:
- time in millis or -1 if unknown
-
getReindexCompletionTimestamp
long getReindexCompletionTimestamp()Time in millis at which index was last re indexed- Returns:
- time in millis or -1 if unknown
-