Search in sources :

Example 1 with SchemaExchangeWorkerTask

use of org.apache.ignite.internal.processors.query.schema.SchemaExchangeWorkerTask in project ignite by apache.

the class GridCacheProcessor method processCustomExchangeTask.

/**
     * Process custom exchange task.
     *
     * @param task Task.
     */
public 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
        U.warn(log, "Unsupported custom exchange task: " + task);
}
Also used : SchemaExchangeWorkerTask(org.apache.ignite.internal.processors.query.schema.SchemaExchangeWorkerTask) 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

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