Class IndexRebuildFutureStorage
- java.lang.Object
-
- org.apache.ignite.internal.processors.query.aware.IndexRebuildFutureStorage
-
public class IndexRebuildFutureStorage extends Object
Holder of up-to-date information of rebuild index futures for caches. Thread safe.
-
-
Constructor Summary
Constructors Constructor Description IndexRebuildFutureStorage()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcancelRebuildIndexesOnExchange(Set<Integer> cacheIds, AffinityTopologyVersion topVer)Canceling index rebuilding for caches on the exchange.@Nullable GridFutureAdapter<Void>indexRebuildFuture(int cacheId)Getting index rebuild future for the cache.voidonFinishRebuildIndexes(int cacheId, @Nullable Throwable err)Callback on finish of rebuilding indexes for the cache.Set<Integer>prepareRebuildIndexes(Set<Integer> cacheIds, @Nullable AffinityTopologyVersion topVer)Preparing futures of rebuilding indexes for caches.booleanrebuildIndexesOnExchange(int cacheId, AffinityTopologyVersion topVer)Checks that the indexes need to be rebuilt on the exchange.
-
-
-
Method Detail
-
indexRebuildFuture
@Nullable public @Nullable GridFutureAdapter<Void> indexRebuildFuture(int cacheId)
Getting index rebuild future for the cache.- Parameters:
cacheId- Cache id.- Returns:
- Future if rebuilding is in progress or
nullif not.
-
rebuildIndexesOnExchange
public boolean rebuildIndexesOnExchange(int cacheId, AffinityTopologyVersion topVer)Checks that the indexes need to be rebuilt on the exchange.- Parameters:
cacheId- Cache id.topVer- Topology version.- Returns:
Trueif need to rebuild.
-
cancelRebuildIndexesOnExchange
public void cancelRebuildIndexesOnExchange(Set<Integer> cacheIds, AffinityTopologyVersion topVer)
Canceling index rebuilding for caches on the exchange.- Parameters:
cacheIds- Cache ids.topVer- Topology version.
-
prepareRebuildIndexes
public Set<Integer> prepareRebuildIndexes(Set<Integer> cacheIds, @Nullable @Nullable AffinityTopologyVersion topVer)
Preparing futures of rebuilding indexes for caches. The future for the cache will be added only if the previous one is missing or completed.- Parameters:
cacheIds- Cache ids.topVer- Topology version if rebuilding indexes should be on exchange.- Returns:
- Cache ids for which features have not been added.
-
onFinishRebuildIndexes
public void onFinishRebuildIndexes(int cacheId, @Nullable @Nullable Throwable err)Callback on finish of rebuilding indexes for the cache.- Parameters:
cacheId- Cache id.err- Error.
-
-