Search in sources :

Example 1 with SchemaFinishDiscoveryMessage

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

the class GridQueryProcessor method onDiscovery.

/**
     * Handle custom discovery message.
     *
     * @param msg Message.
     */
public void onDiscovery(SchemaAbstractDiscoveryMessage msg) {
    IgniteUuid id = msg.id();
    if (!dscoMsgIdHist.add(id)) {
        U.warn(log, "Received duplicate schema custom discovery message (will ignore) [opId=" + msg.operation().id() + ", msg=" + msg + ']');
        return;
    }
    if (msg instanceof SchemaProposeDiscoveryMessage) {
        SchemaProposeDiscoveryMessage msg0 = (SchemaProposeDiscoveryMessage) msg;
        boolean exchange = onSchemaProposeDiscovery(msg0);
        msg0.exchange(exchange);
    } else if (msg instanceof SchemaFinishDiscoveryMessage) {
        SchemaFinishDiscoveryMessage msg0 = (SchemaFinishDiscoveryMessage) msg;
        onSchemaFinishDiscovery(msg0);
    } else
        U.warn(log, "Received unsupported schema custom discovery message (will ignore) [opId=" + msg.operation().id() + ", msg=" + msg + ']');
}
Also used : IgniteUuid(org.apache.ignite.lang.IgniteUuid) SchemaProposeDiscoveryMessage(org.apache.ignite.internal.processors.query.schema.message.SchemaProposeDiscoveryMessage) SchemaFinishDiscoveryMessage(org.apache.ignite.internal.processors.query.schema.message.SchemaFinishDiscoveryMessage)

Aggregations

SchemaFinishDiscoveryMessage (org.apache.ignite.internal.processors.query.schema.message.SchemaFinishDiscoveryMessage)1 SchemaProposeDiscoveryMessage (org.apache.ignite.internal.processors.query.schema.message.SchemaProposeDiscoveryMessage)1 IgniteUuid (org.apache.ignite.lang.IgniteUuid)1