Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,6 @@ public void testGetTableTypes() throws Exception {
}
}


/**
* @throws Exception If failed.
*/
Expand All @@ -338,7 +337,8 @@ public void testGetAllView() throws Exception {
"TRANSACTIONS",
"VIEWS",
"TABLE_COLUMNS",
"VIEW_COLUMNS"
"VIEW_COLUMNS",
"QUERY_CONTINUOUS"
));

Set<String> actViews = new HashSet<>();
Expand All @@ -364,7 +364,6 @@ public void testGetAllView() throws Exception {
}
}


/**
* @throws Exception If failed.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,8 @@ public void testGetAllView() throws Exception {
"SYS.TRANSACTIONS",
"SYS.VIEWS",
"SYS.TABLE_COLUMNS",
"SYS.VIEW_COLUMNS"
"SYS.VIEW_COLUMNS",
"SYS.QUERY_CONTINUOUS"
))
);
}
Expand Down Expand Up @@ -787,7 +788,6 @@ public void testGetAllColumns() throws Exception {
"SYS.TRANSACTIONS.TOP_VER.null.2147483647",
"SYS.TRANSACTIONS.KEYS_COUNT.null.10",
"SYS.TRANSACTIONS.CACHE_IDS.null.2147483647",
"SYS.CLIENT_CONNECTIONS.VERSION.null.2147483647",
"SYS.SCHEMAS.NAME.null.2147483647",
"SYS.SCHEMAS.PREDEFINED.null.1",
"SYS.VIEWS.NAME.null.2147483647",
Expand All @@ -811,7 +811,26 @@ public void testGetAllColumns() throws Exception {
"SYS.VIEW_COLUMNS.PRECISION.null.19",
"SYS.VIEW_COLUMNS.DEFAULT_VALUE.null.2147483647",
"SYS.VIEW_COLUMNS.SCALE.null.10",
"SYS.VIEW_COLUMNS.VIEW_NAME.null.2147483647"
"SYS.VIEW_COLUMNS.VIEW_NAME.null.2147483647",
"SYS.QUERY_CONTINUOUS.NOTIFY_EXISTING.null.1",
"SYS.QUERY_CONTINUOUS.OLD_VALUE_REQUIRED.null.1",
"SYS.QUERY_CONTINUOUS.KEEP_BINARY.null.1",
"SYS.QUERY_CONTINUOUS.IS_MESSAGING.null.1",
"SYS.QUERY_CONTINUOUS.AUTO_UNSUBSCRIBE.null.1",
"SYS.QUERY_CONTINUOUS.LAST_SEND_TIME.null.19",
"SYS.QUERY_CONTINUOUS.LOCAL_TRANSFORMED_LISTENER.null.2147483647",
"SYS.QUERY_CONTINUOUS.TOPIC.null.2147483647",
"SYS.QUERY_CONTINUOUS.BUFFER_SIZE.null.10",
"SYS.QUERY_CONTINUOUS.REMOTE_TRANSFORMER.null.2147483647",
"SYS.QUERY_CONTINUOUS.DELAYED_REGISTER.null.1",
"SYS.QUERY_CONTINUOUS.IS_QUERY.null.1",
"SYS.QUERY_CONTINUOUS.NODE_ID.null.2147483647",
"SYS.QUERY_CONTINUOUS.INTERVAL.null.19",
"SYS.QUERY_CONTINUOUS.IS_EVENTS.null.1",
"SYS.QUERY_CONTINUOUS.ROUTINE_ID.null.2147483647",
"SYS.QUERY_CONTINUOUS.REMOTE_FILTER.null.2147483647",
"SYS.QUERY_CONTINUOUS.CACHE_NAME.null.2147483647",
"SYS.QUERY_CONTINUOUS.LOCAL_LISTENER.null.2147483647"
));

Assert.assertEquals(expectedCols, actualSystemCols);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
import org.apache.ignite.spi.systemview.view.SqlViewColumnView;
import org.apache.ignite.spi.systemview.view.SqlViewView;
import org.apache.ignite.spi.systemview.view.ClientConnectionView;
import org.apache.ignite.spi.systemview.view.ContinuousQueryView;
import org.apache.ignite.spi.systemview.view.SystemView;
import org.apache.ignite.spi.systemview.view.SystemViewRowAttributeWalker;
import org.apache.ignite.spi.systemview.view.CacheGroupView;
Expand Down Expand Up @@ -84,6 +85,7 @@ public static void main(String[] args) throws Exception {
gen.generateAndWrite(ComputeTaskView.class, DFLT_SRC_DIR);
gen.generateAndWrite(ClientConnectionView.class, DFLT_SRC_DIR);
gen.generateAndWrite(TransactionView.class, DFLT_SRC_DIR);
gen.generateAndWrite(ContinuousQueryView.class, DFLT_SRC_DIR);

gen.generateAndWrite(SqlSchemaView.class, INDEXING_SRC_DIR);
gen.generateAndWrite(SqlTableView.class, INDEXING_SRC_DIR);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import org.apache.ignite.internal.managers.systemview.walker.CacheViewWalker;
import org.apache.ignite.internal.managers.systemview.walker.ClientConnectionViewWalker;
import org.apache.ignite.internal.managers.systemview.walker.ComputeTaskViewWalker;
import org.apache.ignite.internal.managers.systemview.walker.ContinuousQueryViewWalker;
import org.apache.ignite.internal.managers.systemview.walker.ServiceViewWalker;
import org.apache.ignite.internal.managers.systemview.walker.TransactionViewWalker;
import org.apache.ignite.spi.systemview.ReadOnlySystemViewRegistry;
Expand All @@ -43,6 +44,7 @@
import org.apache.ignite.spi.systemview.view.CacheView;
import org.apache.ignite.spi.systemview.view.ClientConnectionView;
import org.apache.ignite.spi.systemview.view.ComputeTaskView;
import org.apache.ignite.spi.systemview.view.ContinuousQueryView;
import org.apache.ignite.spi.systemview.view.ServiceView;
import org.apache.ignite.spi.systemview.view.SystemView;
import org.apache.ignite.spi.systemview.view.SystemViewRowAttributeWalker;
Expand Down Expand Up @@ -81,6 +83,7 @@ public GridSystemViewManager(GridKernalContext ctx) {
registerWalker(ComputeTaskView.class, new ComputeTaskViewWalker());
registerWalker(ClientConnectionView.class, new ClientConnectionViewWalker());
registerWalker(TransactionView.class, new TransactionViewWalker());
registerWalker(ContinuousQueryView.class, new ContinuousQueryViewWalker());
}

/** {@inheritDoc} */
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
/*
* 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.internal.managers.systemview.walker;

import java.util.UUID;
import org.apache.ignite.spi.systemview.view.ContinuousQueryView;
import org.apache.ignite.spi.systemview.view.SystemViewRowAttributeWalker;

/**
* Generated by {@code org.apache.ignite.codegen.SystemViewRowAttributeWalkerGenerator}.
* {@link ContinuousQueryView} attributes walker.
*
* @see ContinuousQueryView
*/
public class ContinuousQueryViewWalker implements SystemViewRowAttributeWalker<ContinuousQueryView> {
/** {@inheritDoc} */
@Override public void visitAll(AttributeVisitor v) {
v.accept(0, "cacheName", String.class);
v.accept(1, "localListener", String.class);
v.accept(2, "remoteFilter", String.class);
v.accept(3, "remoteTransformer", String.class);
v.accept(4, "localTransformedListener", String.class);
v.accept(5, "lastSendTime", long.class);
v.accept(6, "autoUnsubscribe", boolean.class);
v.accept(7, "bufferSize", int.class);
v.accept(8, "delayedRegister", boolean.class);
v.accept(9, "interval", long.class);
v.accept(10, "isEvents", boolean.class);
v.accept(11, "isMessaging", boolean.class);
v.accept(12, "isQuery", boolean.class);
v.accept(13, "keepBinary", boolean.class);
v.accept(14, "nodeId", UUID.class);
v.accept(15, "notifyExisting", boolean.class);
v.accept(16, "oldValueRequired", boolean.class);
v.accept(17, "routineId", UUID.class);
v.accept(18, "topic", String.class);
}

/** {@inheritDoc} */
@Override public void visitAll(ContinuousQueryView row, AttributeWithValueVisitor v) {
v.accept(0, "cacheName", String.class, row.cacheName());
v.accept(1, "localListener", String.class, row.localListener());
v.accept(2, "remoteFilter", String.class, row.remoteFilter());
v.accept(3, "remoteTransformer", String.class, row.remoteTransformer());
v.accept(4, "localTransformedListener", String.class, row.localTransformedListener());
v.acceptLong(5, "lastSendTime", row.lastSendTime());
v.acceptBoolean(6, "autoUnsubscribe", row.autoUnsubscribe());
v.acceptInt(7, "bufferSize", row.bufferSize());
v.acceptBoolean(8, "delayedRegister", row.delayedRegister());
v.acceptLong(9, "interval", row.interval());
v.acceptBoolean(10, "isEvents", row.isEvents());
v.acceptBoolean(11, "isMessaging", row.isMessaging());
v.acceptBoolean(12, "isQuery", row.isQuery());
v.acceptBoolean(13, "keepBinary", row.keepBinary());
v.accept(14, "nodeId", UUID.class, row.nodeId());
v.acceptBoolean(15, "notifyExisting", row.notifyExisting());
v.acceptBoolean(16, "oldValueRequired", row.oldValueRequired());
v.accept(17, "routineId", UUID.class, row.routineId());
v.accept(18, "topic", String.class, row.topic());
}

/** {@inheritDoc} */
@Override public int count() {
return 19;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -260,13 +260,33 @@ public void notifyExisting(boolean notifyExisting) {
this.notifyExisting = notifyExisting;
}

/** @return {@code True} if handler should obtain existing entries,{@code false} otherwise. */
public boolean notifyExisting() {
return notifyExisting;
}

/** @return {@code True} if old value required for handler, {@code false} otherwise. */
public boolean oldValueRequired() {
return oldValRequired;
}

/** @return Local listener. */
public CacheEntryUpdatedListener<K, V> localListener() {
return locLsnr;
}

/**
* @param locOnly Local only.
*/
public void localOnly(boolean locOnly) {
this.locOnly = locOnly;
}

/** @return {@code True} if handler are local only, {@code false} otherwise. */
public boolean localOnly() {
return locOnly;
}

/**
* @param taskHash Task hash.
*/
Expand Down Expand Up @@ -737,14 +757,14 @@ protected CacheEntryEventFilter getEventFilter0() {
/**
* @return Cache entry event transformer.
*/
@Nullable protected IgniteClosure<CacheEntryEvent<? extends K, ? extends V>, ?> getTransformer() {
@Nullable public IgniteClosure<CacheEntryEvent<? extends K, ? extends V>, ?> getTransformer() {
return null;
}

/**
* @return Local listener of transformed events.
*/
@Nullable protected EventListener<?> localTransformedEventListener() {
@Nullable public EventListener<?> localTransformedEventListener() {
return null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,15 @@ public CacheContinuousQueryHandlerV3(
}

/** {@inheritDoc} */
@Override protected IgniteClosure<CacheEntryEvent<? extends K, ? extends V>, ?> getTransformer() {
@Override public IgniteClosure<CacheEntryEvent<? extends K, ? extends V>, ?> getTransformer() {
if (rmtTrans == null && rmtTransFactory != null)
rmtTrans = rmtTransFactory.create();

return rmtTrans;
}

/** {@inheritDoc} */
@Override protected EventListener<?> localTransformedEventListener() {
@Override public EventListener<?> localTransformedEventListener() {
return locTransLsnr;
}

Expand Down
Loading