Class IndexBuildStatusHolder
- java.lang.Object
-
- org.apache.ignite.internal.processors.query.aware.IndexBuildStatusHolder
-
public class IndexBuildStatusHolder extends Object
Cache index build status. The following operations affect the status: rebuilding indexes and building a new index. If the operation starts executing, then the status isINIT. If all operations are completed, then the status isCOMPLETED. StatusDELETEis used for persistent cache to mark at the beginning of a checkpoint that all operations have been completed and they will be committed to it.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classIndexBuildStatusHolder.StatusEnumeration of statuses.
-
Constructor Summary
Constructors Constructor Description IndexBuildStatusHolder(boolean persistent, boolean rebuild, boolean recreate)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intbuildNewIndexes()Getting the count of new indexes that are currently being built.booleandelete()Change of status toIndexBuildStatusHolder.Status.DELETEif the current status isIndexBuildStatusHolder.Status.COMPLETE.IndexBuildStatusHolder.StatusonFinishOperation(boolean rebuild)Callback on the finish of the operation.voidonStartOperation(boolean rebuild, boolean recreate)Callback on the start of of the operation.booleanpersistent()Checking if the cache is persistent.booleanrebuild()Checking whether rebuilding indexes is in progress.booleanrecreate()IndexBuildStatusHolder.Statusstatus()Getting the current status.StringtoString()
-
-
-
Constructor Detail
-
IndexBuildStatusHolder
public IndexBuildStatusHolder(boolean persistent, boolean rebuild, boolean recreate)Constructor.- Parameters:
persistent- Persistent cache.rebuild-Trueif rebuilding indexes, otherwise building a new index.recreate-Trueif index.bin recreating, otherwise building a new index.
-
-
Method Detail
-
onStartOperation
public void onStartOperation(boolean rebuild, boolean recreate)Callback on the start of of the operation.- Parameters:
rebuild-Trueif rebuilding indexes, otherwise building a new index.recreate-Trueif index.bin recreating,falseotherwise.- See Also:
onFinishOperation(boolean)
-
onFinishOperation
public IndexBuildStatusHolder.Status onFinishOperation(boolean rebuild)
Callback on the finish of the operation.- Parameters:
rebuild-Trueif rebuilding indexes, otherwise building a new index.- Returns:
- Current status.
- See Also:
onStartOperation(boolean, boolean)
-
delete
public boolean delete()
Change of status toIndexBuildStatusHolder.Status.DELETEif the current status isIndexBuildStatusHolder.Status.COMPLETE. Note that this will only be for persistent cache.- Returns:
Trueif successful.
-
status
public IndexBuildStatusHolder.Status status()
Getting the current status.- Returns:
- Current status.
-
rebuild
public boolean rebuild()
Checking whether rebuilding indexes is in progress.- Returns:
Trueif in progress.
-
recreate
public boolean recreate()
- Returns:
Trueif index.bin recreating, otherwise building a new index.
-
buildNewIndexes
public int buildNewIndexes()
Getting the count of new indexes that are currently being built.- Returns:
- Count of new indexes being built.
-
persistent
public boolean persistent()
Checking if the cache is persistent.- Returns:
Trueif persistent.
-
-