ignite-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [ignite] nizhikov commented on a change in pull request #6923: IGNITE-12214: Continuous query system view.
Date Wed, 02 Oct 2019 15:46:35 GMT
nizhikov commented on a change in pull request #6923: IGNITE-12214: Continuous query system
view.
URL: https://github.com/apache/ignite/pull/6923#discussion_r330628217
 
 

 ##########
 File path: modules/core/src/main/java/org/apache/ignite/spi/systemview/view/ContinuousQueryView.java
 ##########
 @@ -0,0 +1,214 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.spi.systemview.view;
+
+import java.util.UUID;
+import javax.cache.configuration.Factory;
+import javax.cache.event.CacheEntryUpdatedListener;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.cache.CacheEntryEventSerializableFilter;
+import org.apache.ignite.cache.query.ContinuousQuery;
+import org.apache.ignite.cache.query.ContinuousQueryWithTransformer;
+import org.apache.ignite.internal.managers.systemview.walker.Order;
+import org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryHandler;
+import org.apache.ignite.internal.processors.continuous.GridContinuousHandler;
+import org.apache.ignite.internal.processors.continuous.GridContinuousProcessor.RoutineInfo;
+
+/**
+ * Continuous query representation for a {@link SystemView}.
+ */
+public class ContinuousQueryView {
+    /** Routine info. */
+    private final RoutineInfo qry;
+
+    /** Continuous query handler. */
+    private final GridContinuousHandler hnd;
+
+    /** Routine id. */
+    private final UUID routineId;
+
+    /**
+     * @param routineId Routine id.
+     * @param qry Query info.
+     */
+    public ContinuousQueryView(UUID routineId, RoutineInfo qry) {
+        this.qry = qry;
+        this.hnd = qry.handler();
+        this.routineId = routineId;
+    }
+
+    /** @return Continuous query id. */
+    public UUID routineId() {
+        return routineId;
+    }
+
+    /** @return Node id. */
+    public UUID nodeId() {
+        return qry.nodeId();
+    }
+
+    /** @return Cache name. */
+    @Order
+    public String cacheName() {
+        return hnd.cacheName();
+    }
+
+    /** @return Topic for continuous query messages. */
+    public String topic() {
+        return String.valueOf(hnd.orderedTopic());
 
 Review comment:
   Replaced with `Igniteutils#toStringSafe`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message