You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by pt...@apache.org on 2017/09/06 14:28:32 UTC
[16/23] ignite git commit: IGNITE-6119: Fixes for style and DSN.
IGNITE-6119: Fixes for style and DSN.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/6c9bb890
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/6c9bb890
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/6c9bb890
Branch: refs/heads/ignite-5896
Commit: 6c9bb8902dce828d45a6a547e8266fb1cbbcf267
Parents: 56860d2
Author: Igor Sapego <is...@gridgain.com>
Authored: Wed Sep 6 13:42:04 2017 +0300
Committer: Igor Sapego <is...@gridgain.com>
Committed: Wed Sep 6 13:42:04 2017 +0300
----------------------------------------------------------------------
.../odbc/SqlListenerConnectionContext.java | 5 +-
.../processors/odbc/SqlListenerNioListener.java | 2 +-
.../odbc/jdbc/JdbcConnectionContext.java | 61 +++++++++++++-------
.../odbc/odbc/OdbcConnectionContext.java | 61 +++++++++++++-------
.../odbc/odbc/OdbcRequestHandler.java | 4 +-
.../src/system/ui/dsn_configuration_window.cpp | 7 +++
6 files changed, 91 insertions(+), 49 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/6c9bb890/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/SqlListenerConnectionContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/SqlListenerConnectionContext.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/SqlListenerConnectionContext.java
index 144e978..a459a1f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/SqlListenerConnectionContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/SqlListenerConnectionContext.java
@@ -35,11 +35,12 @@ public interface SqlListenerConnectionContext {
SqlListenerProtocolVersion currentVersion();
/**
- * Init from handshake message.
+ * Initialize from handshake message.
+ *
* @param ver Protocol version.
* @param reader Reader set to the configuration part of the handshake message.
*/
- void initFromHandshake(SqlListenerProtocolVersion ver, BinaryReaderExImpl reader);
+ void initializeFromHandshake(SqlListenerProtocolVersion ver, BinaryReaderExImpl reader);
/**
* Handler getter.
http://git-wip-us.apache.org/repos/asf/ignite/blob/6c9bb890/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/SqlListenerNioListener.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/SqlListenerNioListener.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/SqlListenerNioListener.java
index ec7d4eb..e2d444b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/SqlListenerNioListener.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/SqlListenerNioListener.java
@@ -189,7 +189,7 @@ public class SqlListenerNioListener extends GridNioServerListenerAdapter<byte[]>
String errMsg = null;
if (connCtx.isVersionSupported(ver)) {
- connCtx.initFromHandshake(ver, reader);
+ connCtx.initializeFromHandshake(ver, reader);
ses.addMeta(CONN_CTX_META_KEY, connCtx);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/6c9bb890/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcConnectionContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcConnectionContext.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcConnectionContext.java
index 89f90f0..035cb77 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcConnectionContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcConnectionContext.java
@@ -1,3 +1,20 @@
+/*
+ * 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.processors.odbc.jdbc;
import java.util.HashSet;
@@ -46,18 +63,30 @@ public class JdbcConnectionContext implements SqlListenerConnectionContext {
SUPPORTED_VERS.add(VER_2_1_0);
}
- @Override
- public boolean isVersionSupported(SqlListenerProtocolVersion ver) {
+ /**
+ * Constructor.
+ * @param ctx Kernal Context.
+ * @param busyLock Shutdown busy lock.
+ * @param maxCursors Maximum allowed cursors.
+ */
+ public JdbcConnectionContext(GridKernalContext ctx, GridSpinBusyLock busyLock, int maxCursors) {
+ this.ctx = ctx;
+ this.busyLock = busyLock;
+ this.maxCursors = maxCursors;
+ }
+
+ /** {@inheritDoc} */
+ @Override public boolean isVersionSupported(SqlListenerProtocolVersion ver) {
return SUPPORTED_VERS.contains(ver);
}
- @Override
- public SqlListenerProtocolVersion currentVersion() {
+ /** {@inheritDoc} */
+ @Override public SqlListenerProtocolVersion currentVersion() {
return CURRENT_VER;
}
- @Override
- public void initFromHandshake(SqlListenerProtocolVersion ver, BinaryReaderExImpl reader) {
+ /** {@inheritDoc} */
+ @Override public void initializeFromHandshake(SqlListenerProtocolVersion ver, BinaryReaderExImpl reader) {
assert SUPPORTED_VERS.contains(ver): "Unsupported JDBC protocol version.";
boolean distributedJoins = reader.readBoolean();
@@ -77,25 +106,13 @@ public class JdbcConnectionContext implements SqlListenerConnectionContext {
parser = new JdbcMessageParser(ctx);
}
- /**
- * Constructor.
- * @param ctx Kernal Context.
- * @param busyLock Shutdown busy lock.
- * @param maxCursors Maximum allowed cursors.
- */
- public JdbcConnectionContext(GridKernalContext ctx, GridSpinBusyLock busyLock, int maxCursors) {
- this.ctx = ctx;
- this.busyLock = busyLock;
- this.maxCursors = maxCursors;
- }
-
- @Override
- public SqlListenerRequestHandler handler() {
+ /** {@inheritDoc} */
+ @Override public SqlListenerRequestHandler handler() {
return handler;
}
- @Override
- public SqlListenerMessageParser parser() {
+ /** {@inheritDoc} */
+ @Override public SqlListenerMessageParser parser() {
return parser;
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/6c9bb890/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcConnectionContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcConnectionContext.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcConnectionContext.java
index 4e9dfbb..5e8a514 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcConnectionContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcConnectionContext.java
@@ -1,3 +1,20 @@
+/*
+ * 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.processors.odbc.odbc;
import java.util.HashSet;
@@ -46,18 +63,30 @@ public class OdbcConnectionContext implements SqlListenerConnectionContext {
SUPPORTED_VERS.add(VER_2_1_0);
}
- @Override
- public boolean isVersionSupported(SqlListenerProtocolVersion ver) {
+ /**
+ * Constructor.
+ * @param ctx Kernal Context.
+ * @param busyLock Shutdown busy lock.
+ * @param maxCursors Maximum allowed cursors.
+ */
+ public OdbcConnectionContext(GridKernalContext ctx, GridSpinBusyLock busyLock, int maxCursors) {
+ this.ctx = ctx;
+ this.busyLock = busyLock;
+ this.maxCursors = maxCursors;
+ }
+
+ /** {@inheritDoc} */
+ @Override public boolean isVersionSupported(SqlListenerProtocolVersion ver) {
return SUPPORTED_VERS.contains(ver);
}
- @Override
- public SqlListenerProtocolVersion currentVersion() {
+ /** {@inheritDoc} */
+ @Override public SqlListenerProtocolVersion currentVersion() {
return CURRENT_VER;
}
- @Override
- public void initFromHandshake(SqlListenerProtocolVersion ver, BinaryReaderExImpl reader) {
+ /** {@inheritDoc} */
+ @Override public void initializeFromHandshake(SqlListenerProtocolVersion ver, BinaryReaderExImpl reader) {
assert SUPPORTED_VERS.contains(ver): "Unsupported ODBC protocol version.";
boolean distributedJoins = reader.readBoolean();
@@ -75,25 +104,13 @@ public class OdbcConnectionContext implements SqlListenerConnectionContext {
parser = new OdbcMessageParser(ctx);
}
- /**
- * Constructor.
- * @param ctx Kernal Context.
- * @param busyLock Shutdown busy lock.
- * @param maxCursors Maximum allowed cursors.
- */
- public OdbcConnectionContext(GridKernalContext ctx, GridSpinBusyLock busyLock, int maxCursors) {
- this.ctx = ctx;
- this.busyLock = busyLock;
- this.maxCursors = maxCursors;
- }
-
- @Override
- public SqlListenerRequestHandler handler() {
+ /** {@inheritDoc} */
+ @Override public SqlListenerRequestHandler handler() {
return handler;
}
- @Override
- public SqlListenerMessageParser parser() {
+ /** {@inheritDoc} */
+ @Override public SqlListenerMessageParser parser() {
return parser;
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/6c9bb890/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcRequestHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcRequestHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcRequestHandler.java
index 1aa4309..7677c03 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcRequestHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcRequestHandler.java
@@ -104,8 +104,8 @@ public class OdbcRequestHandler implements SqlListenerRequestHandler {
* @param lazy Lazy flag.
*/
public OdbcRequestHandler(GridKernalContext ctx, GridSpinBusyLock busyLock, int maxCursors,
- boolean distributedJoins, boolean enforceJoinOrder, boolean replicatedOnly,
- boolean collocated, boolean lazy) {
+ boolean distributedJoins, boolean enforceJoinOrder, boolean replicatedOnly,
+ boolean collocated, boolean lazy) {
this.ctx = ctx;
this.busyLock = busyLock;
this.maxCursors = maxCursors;
http://git-wip-us.apache.org/repos/asf/ignite/blob/6c9bb890/modules/platforms/cpp/odbc/os/win/src/system/ui/dsn_configuration_window.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/os/win/src/system/ui/dsn_configuration_window.cpp b/modules/platforms/cpp/odbc/os/win/src/system/ui/dsn_configuration_window.cpp
index 9b13481..b544fa7 100644
--- a/modules/platforms/cpp/odbc/os/win/src/system/ui/dsn_configuration_window.cpp
+++ b/modules/platforms/cpp/odbc/os/win/src/system/ui/dsn_configuration_window.cpp
@@ -264,6 +264,13 @@ namespace ignite
break;
}
+ case ChildId::LAZY_CHECK_BOX:
+ {
+ lazyCheckBox->SetChecked(!lazyCheckBox->IsChecked());
+
+ break;
+ }
+
case ChildId::PROTOCOL_VERSION_COMBO_BOX:
{
std::string versionStr;