Search in sources :

Example 1 with FinishPreloadingTask

use of org.apache.ignite.internal.processors.cache.distributed.dht.preloader.FinishPreloadingTask in project ignite by apache.

the class GridCacheProcessor method processCustomExchangeTask.

/**
 * Process custom exchange task.
 *
 * @param task Task.
 */
void processCustomExchangeTask(CachePartitionExchangeWorkerTask task) {
    if (task instanceof SchemaExchangeWorkerTask) {
        SchemaAbstractDiscoveryMessage msg = ((SchemaExchangeWorkerTask) task).message();
        if (msg instanceof SchemaProposeDiscoveryMessage) {
            SchemaProposeDiscoveryMessage msg0 = (SchemaProposeDiscoveryMessage) msg;
            ctx.query().onSchemaPropose(msg0);
        } else
            U.warn(log, "Unsupported schema discovery message: " + msg);
    } else if (task instanceof SchemaNodeLeaveExchangeWorkerTask) {
        SchemaNodeLeaveExchangeWorkerTask task0 = (SchemaNodeLeaveExchangeWorkerTask) task;
        ctx.query().onNodeLeave(task0.node());
    } else if (task instanceof ClientCacheChangeDummyDiscoveryMessage) {
        ClientCacheChangeDummyDiscoveryMessage task0 = (ClientCacheChangeDummyDiscoveryMessage) task;
        sharedCtx.affinity().processClientCachesRequests(task0);
    } else if (task instanceof ClientCacheUpdateTimeout) {
        ClientCacheUpdateTimeout task0 = (ClientCacheUpdateTimeout) task;
        sharedCtx.affinity().sendClientCacheChangesMessage(task0);
    } else if (task instanceof CacheStatisticsModeChangeTask) {
        CacheStatisticsModeChangeTask task0 = (CacheStatisticsModeChangeTask) task;
        processStatisticsModeChange(task0.message());
    } else if (task instanceof TxTimeoutOnPartitionMapExchangeChangeTask) {
        TxTimeoutOnPartitionMapExchangeChangeTask task0 = (TxTimeoutOnPartitionMapExchangeChangeTask) task;
        sharedCtx.tm().processTxTimeoutOnPartitionMapExchangeChange(task0.message());
    } else if (task instanceof StopCachesOnClientReconnectExchangeTask) {
        StopCachesOnClientReconnectExchangeTask task0 = (StopCachesOnClientReconnectExchangeTask) task;
        stopCachesOnClientReconnect(task0.stoppedCaches());
        task0.onDone();
    } else if (task instanceof WalStateNodeLeaveExchangeTask) {
        WalStateNodeLeaveExchangeTask task0 = (WalStateNodeLeaveExchangeTask) task;
        sharedCtx.walState().onNodeLeft(task0.node().id());
    } else if (task instanceof FinishPreloadingTask) {
        FinishPreloadingTask task0 = (FinishPreloadingTask) task;
        CacheGroupContext grp = cacheGroup(task0.groupId());
        if (grp != null)
            grp.preloader().finishPreloading(task0.topologyVersion(), task0.rebalanceId());
    } else
        U.warn(log, "Unsupported custom exchange task: " + task);
}
Also used : StopCachesOnClientReconnectExchangeTask(org.apache.ignite.internal.processors.cache.distributed.dht.preloader.StopCachesOnClientReconnectExchangeTask) SchemaExchangeWorkerTask(org.apache.ignite.internal.processors.query.schema.SchemaExchangeWorkerTask) FinishPreloadingTask(org.apache.ignite.internal.processors.cache.distributed.dht.preloader.FinishPreloadingTask) SchemaProposeDiscoveryMessage(org.apache.ignite.internal.processors.query.schema.message.SchemaProposeDiscoveryMessage) SchemaNodeLeaveExchangeWorkerTask(org.apache.ignite.internal.processors.query.schema.SchemaNodeLeaveExchangeWorkerTask) SchemaAbstractDiscoveryMessage(org.apache.ignite.internal.processors.query.schema.message.SchemaAbstractDiscoveryMessage)

Aggregations

FinishPreloadingTask (org.apache.ignite.internal.processors.cache.distributed.dht.preloader.FinishPreloadingTask)1 StopCachesOnClientReconnectExchangeTask (org.apache.ignite.internal.processors.cache.distributed.dht.preloader.StopCachesOnClientReconnectExchangeTask)1 SchemaExchangeWorkerTask (org.apache.ignite.internal.processors.query.schema.SchemaExchangeWorkerTask)1 SchemaNodeLeaveExchangeWorkerTask (org.apache.ignite.internal.processors.query.schema.SchemaNodeLeaveExchangeWorkerTask)1 SchemaAbstractDiscoveryMessage (org.apache.ignite.internal.processors.query.schema.message.SchemaAbstractDiscoveryMessage)1 SchemaProposeDiscoveryMessage (org.apache.ignite.internal.processors.query.schema.message.SchemaProposeDiscoveryMessage)1