#ignite-128: Moving tests.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/94cf4f01 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/94cf4f01 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/94cf4f01 Branch: refs/heads/ignite-176 Commit: 94cf4f01901f54286b5e7965fad13d83b63182ea Parents: 756034f Author: vozerov-gridgain <voze...@gridgain.com> Authored: Tue Feb 3 16:47:02 2015 +0300 Committer: vozerov-gridgain <voze...@gridgain.com> Committed: Tue Feb 3 16:47:02 2015 +0300 ---------------------------------------------------------------------- .../config/grid-client-spring-config.xml | 2 +- .../internal/TaskEventSubjectIdSelfTest.java | 1 - .../ClientAbstractMultiThreadedSelfTest.java | 2 - .../client/ClientDefaultCacheSelfTest.java | 2 - .../client/ClientReconnectionSelfTest.java | 1 - .../ClientTcpSslAuthenticationSelfTest.java | 2 - ...skExecutionAfterTopologyRestartSelfTest.java | 1 - .../client/ClientTopologyCacheSelfTest.java | 2 - .../ClientPropertiesConfigurationSelfTest.java | 3 +- .../ClientAbstractConnectivitySelfTest.java | 1 - .../ClientAbstractMultiNodeSelfTest.java | 1 - .../integration/ClientAbstractSelfTest.java | 1 - .../integration/ClientPreferDirectSelfTest.java | 1 - .../ClientTcpDirectMultiNodeSelfTest.java | 1 - .../integration/ClientTcpDirectSelfTest.java | 1 - .../ClientTcpSslDirectMultiNodeSelfTest.java | 1 - .../integration/ClientTcpSslDirectSelfTest.java | 1 - .../ClientTcpUnreachableMultiNodeSelfTest.java | 1 - .../client/router/ClientFailedInitSelfTest.java | 1 - .../router/TcpRouterAbstractSelfTest.java | 1 - .../router/TcpRouterMultiNodeSelfTest.java | 1 - .../rest/RestProcessorStartSelfTest.java | 1 - .../rest/TaskCommandHandlerSelfTest.java | 1 - .../loadtests/client/ClientCacheBenchmark.java | 1 - .../src/test/resources/spring-server-node.xml | 4 +- .../ignite/client/GridClientConfiguration.java | 868 ------------------- .../java/org/apache/ignite/client/package.html | 23 - .../ignite/internal/client/GridClient.java | 8 +- .../internal/client/GridClientCompute.java | 66 +- .../client/GridClientConfiguration.java | 867 ++++++++++++++++++ .../ignite/internal/client/GridClientData.java | 2 +- .../internal/client/GridClientFactory.java | 1 - .../internal/client/GridClientNodeMetrics.java | 2 +- .../client/GridClientTopologyListener.java | 2 +- .../client/balancer/GridClientLoadBalancer.java | 2 +- .../internal/client/impl/GridClientImpl.java | 1 - .../GridClientConnectionManagerAdapter.java | 1 - .../GridClientConnectionManagerOsImpl.java | 1 - .../impl/connection/GridClientTopology.java | 1 - .../internal/client/router/GridTcpRouter.java | 4 +- .../router/impl/GridRouterClientImpl.java | 1 - .../ignite/jdbc/IgniteJdbcConnection.java | 1 - .../GridHadoopClientProtocolProvider.java | 1 - 43 files changed, 914 insertions(+), 973 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/94cf4f01/modules/clients/config/grid-client-spring-config.xml ---------------------------------------------------------------------- diff --git a/modules/clients/config/grid-client-spring-config.xml b/modules/clients/config/grid-client-spring-config.xml index 8c6772a..473d920 100644 --- a/modules/clients/config/grid-client-spring-config.xml +++ b/modules/clients/config/grid-client-spring-config.xml @@ -39,7 +39,7 @@ <!-- Configuration below demonstrates how to setup caches within grid nodes. --> - <bean id="grid.client.cfg" class="org.apache.ignite.client.GridClientConfiguration"> + <bean id="grid.client.cfg" class="org.apache.ignite.internal.client.GridClientConfiguration"> <!-- Data configurations. --> <property name="dataConfigurations"> <list> http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/94cf4f01/modules/clients/src/test/java/org/apache/ignite/internal/TaskEventSubjectIdSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/TaskEventSubjectIdSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/TaskEventSubjectIdSelfTest.java index cc36411..d1d21d7 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/TaskEventSubjectIdSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/TaskEventSubjectIdSelfTest.java @@ -18,7 +18,6 @@ package org.apache.ignite.internal; import org.apache.ignite.*; -import org.apache.ignite.client.*; import org.apache.ignite.compute.*; import org.apache.ignite.configuration.*; import org.apache.ignite.events.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/94cf4f01/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientAbstractMultiThreadedSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientAbstractMultiThreadedSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientAbstractMultiThreadedSelfTest.java index e2f7ad1..64361d3 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientAbstractMultiThreadedSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientAbstractMultiThreadedSelfTest.java @@ -20,12 +20,10 @@ package org.apache.ignite.internal.client; import org.apache.ignite.*; import org.apache.ignite.cache.*; import org.apache.ignite.cache.affinity.*; -import org.apache.ignite.client.*; import org.apache.ignite.cluster.*; import org.apache.ignite.compute.*; import org.apache.ignite.configuration.*; import org.apache.ignite.internal.*; -import org.apache.ignite.internal.client.*; import org.apache.ignite.internal.client.balancer.*; import org.apache.ignite.internal.client.impl.*; import org.apache.ignite.internal.client.ssl.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/94cf4f01/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientDefaultCacheSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientDefaultCacheSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientDefaultCacheSelfTest.java index 68dd143..80a0248 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientDefaultCacheSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientDefaultCacheSelfTest.java @@ -17,9 +17,7 @@ package org.apache.ignite.internal.client; -import org.apache.ignite.client.*; import org.apache.ignite.configuration.*; -import org.apache.ignite.internal.client.*; import org.apache.ignite.lang.*; import org.apache.ignite.spi.discovery.tcp.*; import org.apache.ignite.spi.discovery.tcp.ipfinder.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/94cf4f01/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientReconnectionSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientReconnectionSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientReconnectionSelfTest.java index ab584b4..8b82a3c 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientReconnectionSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientReconnectionSelfTest.java @@ -18,7 +18,6 @@ package org.apache.ignite.internal.client; import org.apache.ignite.*; -import org.apache.ignite.client.*; import org.apache.ignite.internal.client.impl.connection.*; import org.apache.ignite.internal.util.typedef.*; import org.apache.ignite.testframework.junits.common.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/94cf4f01/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientTcpSslAuthenticationSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientTcpSslAuthenticationSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientTcpSslAuthenticationSelfTest.java index 859d3d6..1e0f0ce 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientTcpSslAuthenticationSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientTcpSslAuthenticationSelfTest.java @@ -17,9 +17,7 @@ package org.apache.ignite.internal.client; -import org.apache.ignite.client.*; import org.apache.ignite.configuration.*; -import org.apache.ignite.internal.client.*; import org.apache.ignite.internal.client.balancer.*; import org.apache.ignite.internal.client.impl.*; import org.apache.ignite.internal.client.ssl.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/94cf4f01/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientTcpTaskExecutionAfterTopologyRestartSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientTcpTaskExecutionAfterTopologyRestartSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientTcpTaskExecutionAfterTopologyRestartSelfTest.java index 948354f..8b437d6 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientTcpTaskExecutionAfterTopologyRestartSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientTcpTaskExecutionAfterTopologyRestartSelfTest.java @@ -17,7 +17,6 @@ package org.apache.ignite.internal.client; -import org.apache.ignite.client.*; import org.apache.ignite.configuration.*; import org.apache.ignite.testframework.junits.common.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/94cf4f01/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientTopologyCacheSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientTopologyCacheSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientTopologyCacheSelfTest.java index 6821209..54940a2 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientTopologyCacheSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientTopologyCacheSelfTest.java @@ -18,9 +18,7 @@ package org.apache.ignite.internal.client; import org.apache.ignite.cache.*; -import org.apache.ignite.client.*; import org.apache.ignite.configuration.*; -import org.apache.ignite.internal.client.*; import org.apache.ignite.spi.discovery.tcp.*; import org.apache.ignite.spi.discovery.tcp.ipfinder.*; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/94cf4f01/modules/clients/src/test/java/org/apache/ignite/internal/client/impl/ClientPropertiesConfigurationSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/impl/ClientPropertiesConfigurationSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/impl/ClientPropertiesConfigurationSelfTest.java index 4b6c1ca..8353f4c 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/client/impl/ClientPropertiesConfigurationSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/impl/ClientPropertiesConfigurationSelfTest.java @@ -18,7 +18,6 @@ package org.apache.ignite.internal.client.impl; import org.apache.commons.io.*; -import org.apache.ignite.client.*; import org.apache.ignite.internal.client.*; import org.apache.ignite.internal.client.balancer.*; import org.apache.ignite.internal.util.*; @@ -30,7 +29,7 @@ import java.io.*; import java.net.*; import java.util.*; -import static org.apache.ignite.client.GridClientConfiguration.*; +import static org.apache.ignite.internal.client.GridClientConfiguration.*; /** * Properties-based configuration self test. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/94cf4f01/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractConnectivitySelfTest.java ---------------------------------------------------------------------- diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractConnectivitySelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractConnectivitySelfTest.java index a7b7d8b..7272b2c 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractConnectivitySelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractConnectivitySelfTest.java @@ -18,7 +18,6 @@ package org.apache.ignite.internal.client.integration; import org.apache.ignite.*; -import org.apache.ignite.client.*; import org.apache.ignite.internal.client.*; import org.apache.ignite.lang.*; import org.apache.ignite.internal.util.typedef.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/94cf4f01/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractMultiNodeSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractMultiNodeSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractMultiNodeSelfTest.java index c6cedaa..5991ecc 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractMultiNodeSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractMultiNodeSelfTest.java @@ -19,7 +19,6 @@ package org.apache.ignite.internal.client.integration; import org.apache.ignite.*; import org.apache.ignite.cache.*; -import org.apache.ignite.client.*; import org.apache.ignite.cluster.*; import org.apache.ignite.compute.*; import org.apache.ignite.configuration.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/94cf4f01/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractSelfTest.java index bc79484..c5a3e8f 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractSelfTest.java @@ -24,7 +24,6 @@ import org.apache.ignite.cache.*; import org.apache.ignite.cache.GridCache; import org.apache.ignite.cache.affinity.consistenthash.*; import org.apache.ignite.cache.store.*; -import org.apache.ignite.client.*; import org.apache.ignite.compute.*; import org.apache.ignite.configuration.*; import org.apache.ignite.internal.client.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/94cf4f01/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientPreferDirectSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientPreferDirectSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientPreferDirectSelfTest.java index f8cb7cb..4267e1a 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientPreferDirectSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientPreferDirectSelfTest.java @@ -18,7 +18,6 @@ package org.apache.ignite.internal.client.integration; import org.apache.ignite.*; -import org.apache.ignite.client.*; import org.apache.ignite.compute.*; import org.apache.ignite.configuration.*; import org.apache.ignite.internal.client.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/94cf4f01/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientTcpDirectMultiNodeSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientTcpDirectMultiNodeSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientTcpDirectMultiNodeSelfTest.java index bfcfbfe..ed374dc 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientTcpDirectMultiNodeSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientTcpDirectMultiNodeSelfTest.java @@ -17,7 +17,6 @@ package org.apache.ignite.internal.client.integration; -import org.apache.ignite.client.*; import org.apache.ignite.internal.client.*; import java.util.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/94cf4f01/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientTcpDirectSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientTcpDirectSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientTcpDirectSelfTest.java index 1bc5850..8752538 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientTcpDirectSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientTcpDirectSelfTest.java @@ -17,7 +17,6 @@ package org.apache.ignite.internal.client.integration; -import org.apache.ignite.client.*; import org.apache.ignite.internal.client.*; import org.apache.ignite.internal.client.ssl.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/94cf4f01/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientTcpSslDirectMultiNodeSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientTcpSslDirectMultiNodeSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientTcpSslDirectMultiNodeSelfTest.java index 31456d6..12d49e3 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientTcpSslDirectMultiNodeSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientTcpSslDirectMultiNodeSelfTest.java @@ -17,7 +17,6 @@ package org.apache.ignite.internal.client.integration; -import org.apache.ignite.client.*; import org.apache.ignite.internal.client.*; import org.apache.ignite.internal.client.ssl.*; import org.apache.ignite.testframework.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/94cf4f01/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientTcpSslDirectSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientTcpSslDirectSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientTcpSslDirectSelfTest.java index e4fe621..aec7b22 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientTcpSslDirectSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientTcpSslDirectSelfTest.java @@ -17,7 +17,6 @@ package org.apache.ignite.internal.client.integration; -import org.apache.ignite.client.*; import org.apache.ignite.internal.client.*; import org.apache.ignite.internal.client.ssl.*; import org.apache.ignite.testframework.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/94cf4f01/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientTcpUnreachableMultiNodeSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientTcpUnreachableMultiNodeSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientTcpUnreachableMultiNodeSelfTest.java index 975a16a..07cafee 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientTcpUnreachableMultiNodeSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientTcpUnreachableMultiNodeSelfTest.java @@ -17,7 +17,6 @@ package org.apache.ignite.internal.client.integration; -import org.apache.ignite.client.*; import org.apache.ignite.internal.client.*; import org.apache.ignite.internal.client.balancer.*; import org.apache.ignite.internal.util.typedef.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/94cf4f01/modules/clients/src/test/java/org/apache/ignite/internal/client/router/ClientFailedInitSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/router/ClientFailedInitSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/router/ClientFailedInitSelfTest.java index 7a2d7eb..8f7d5b7 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/client/router/ClientFailedInitSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/router/ClientFailedInitSelfTest.java @@ -18,7 +18,6 @@ package org.apache.ignite.internal.client.router; import org.apache.ignite.*; -import org.apache.ignite.client.*; import org.apache.ignite.compute.*; import org.apache.ignite.configuration.*; import org.apache.ignite.internal.client.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/94cf4f01/modules/clients/src/test/java/org/apache/ignite/internal/client/router/TcpRouterAbstractSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/router/TcpRouterAbstractSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/router/TcpRouterAbstractSelfTest.java index e31a08d..1c71097 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/client/router/TcpRouterAbstractSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/router/TcpRouterAbstractSelfTest.java @@ -18,7 +18,6 @@ package org.apache.ignite.internal.client.router; import org.apache.ignite.*; -import org.apache.ignite.client.*; import org.apache.ignite.internal.client.*; import org.apache.ignite.internal.client.integration.*; import org.apache.ignite.internal.client.router.impl.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/94cf4f01/modules/clients/src/test/java/org/apache/ignite/internal/client/router/TcpRouterMultiNodeSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/router/TcpRouterMultiNodeSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/router/TcpRouterMultiNodeSelfTest.java index c48cf9a..e59b082 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/client/router/TcpRouterMultiNodeSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/router/TcpRouterMultiNodeSelfTest.java @@ -18,7 +18,6 @@ package org.apache.ignite.internal.client.router; import org.apache.ignite.*; -import org.apache.ignite.client.*; import org.apache.ignite.internal.client.*; import org.apache.ignite.internal.client.integration.*; import org.apache.ignite.internal.client.router.impl.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/94cf4f01/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/RestProcessorStartSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/RestProcessorStartSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/RestProcessorStartSelfTest.java index bf9b044..8db093a 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/RestProcessorStartSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/RestProcessorStartSelfTest.java @@ -17,7 +17,6 @@ package org.apache.ignite.internal.processors.rest; -import org.apache.ignite.client.*; import org.apache.ignite.configuration.*; import org.apache.ignite.internal.*; import org.apache.ignite.internal.client.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/94cf4f01/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/TaskCommandHandlerSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/TaskCommandHandlerSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/TaskCommandHandlerSelfTest.java index 3b7bf5f..b899566 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/TaskCommandHandlerSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/TaskCommandHandlerSelfTest.java @@ -19,7 +19,6 @@ package org.apache.ignite.internal.processors.rest; import org.apache.ignite.*; import org.apache.ignite.cache.*; -import org.apache.ignite.client.*; import org.apache.ignite.compute.*; import org.apache.ignite.configuration.*; import org.apache.ignite.internal.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/94cf4f01/modules/clients/src/test/java/org/apache/ignite/loadtests/client/ClientCacheBenchmark.java ---------------------------------------------------------------------- diff --git a/modules/clients/src/test/java/org/apache/ignite/loadtests/client/ClientCacheBenchmark.java b/modules/clients/src/test/java/org/apache/ignite/loadtests/client/ClientCacheBenchmark.java index ce36cbf..e1945d6 100644 --- a/modules/clients/src/test/java/org/apache/ignite/loadtests/client/ClientCacheBenchmark.java +++ b/modules/clients/src/test/java/org/apache/ignite/loadtests/client/ClientCacheBenchmark.java @@ -18,7 +18,6 @@ package org.apache.ignite.loadtests.client; import org.apache.ignite.*; -import org.apache.ignite.client.*; import org.apache.ignite.internal.client.*; import org.apache.ignite.internal.util.typedef.*; import org.apache.ignite.internal.util.typedef.internal.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/94cf4f01/modules/clients/src/test/resources/spring-server-node.xml ---------------------------------------------------------------------- diff --git a/modules/clients/src/test/resources/spring-server-node.xml b/modules/clients/src/test/resources/spring-server-node.xml index 1b28fb0..8aabbad 100644 --- a/modules/clients/src/test/resources/spring-server-node.xml +++ b/modules/clients/src/test/resources/spring-server-node.xml @@ -83,10 +83,10 @@ <property name="className" value="org.apache.ignite.internal.client.ClientTestPortable"/> </bean> <bean class="org.apache.ignite.portables.PortableTypeConfiguration"> - <property name="className" value="org.apache.ignite.client.model.GridPortablePerson"/> + <property name="className" value="org.apache.ignite.internal.client.model.GridPortablePerson"/> </bean> <bean class="org.apache.ignite.portables.PortableTypeConfiguration"> - <property name="className" value="org.apache.ignite.client.model.GridImplicitPortablePerson"/> + <property name="className" value="org.apache.ignite.internal.client.model.GridImplicitPortablePerson"/> </bean> <bean class="org.apache.ignite.portables.PortableTypeConfiguration"> <property name="className" value="GridNoDefPortablePerson"/> http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/94cf4f01/modules/core/src/main/java/org/apache/ignite/client/GridClientConfiguration.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/client/GridClientConfiguration.java b/modules/core/src/main/java/org/apache/ignite/client/GridClientConfiguration.java deleted file mode 100644 index 8bf9d52..0000000 --- a/modules/core/src/main/java/org/apache/ignite/client/GridClientConfiguration.java +++ /dev/null @@ -1,868 +0,0 @@ -/* - * 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.client; - -import org.apache.ignite.internal.client.*; -import org.apache.ignite.internal.client.balancer.*; -import org.apache.ignite.internal.client.marshaller.*; -import org.apache.ignite.internal.client.marshaller.optimized.*; -import org.apache.ignite.internal.client.ssl.*; -import org.apache.ignite.portables.*; -import org.apache.ignite.plugin.security.*; -import org.apache.ignite.internal.util.typedef.*; -import org.apache.ignite.internal.util.typedef.internal.*; -import org.jetbrains.annotations.*; - -import java.net.*; -import java.util.*; -import java.util.concurrent.*; - -/** - * Java client configuration. - */ -public class GridClientConfiguration { - /** Default client protocol. */ - public static final GridClientProtocol DFLT_CLIENT_PROTOCOL = GridClientProtocol.TCP; - - /** Default topology refresh frequency is 2 sec. */ - public static final int DFLT_TOP_REFRESH_FREQ = 2000; - - /** Default maximum time connection can be idle. */ - public static final long DFLT_MAX_CONN_IDLE_TIME = 30000; - - /** Default ping interval in milliseconds. */ - public static final long DFLT_PING_INTERVAL = 5000; - - /** Default ping timeout in milliseconds. */ - public static final long DFLT_PING_TIMEOUT = 7000; - - /** Default connect timeout in milliseconds. */ - public static final int DFLT_CONNECT_TIMEOUT = 10000; - - /** Default flag setting for TCP_NODELAY option. */ - public static final boolean DFLT_TCP_NODELAY = true; - - /** List of servers to connect to. */ - private Collection<String> srvs = Collections.emptySet(); - - /** List of routers to connect to. */ - private Collection<String> routers = Collections.emptySet(); - - /** Client protocol. */ - private GridClientProtocol proto = DFLT_CLIENT_PROTOCOL; - - /** Socket connect timeout. */ - private int connectTimeout = DFLT_CONNECT_TIMEOUT; - - /** TCP_NODELAY flag. */ - private boolean tcpNoDelay = DFLT_TCP_NODELAY; - - /** SSL context factory */ - private GridSslContextFactory sslCtxFactory; - - /** Flag indicating whether metrics cache is enabled. */ - private boolean enableMetricsCache = true; - - /** Flag indicating whether attributes cache is enabled. */ - private boolean enableAttrsCache = true; - - /** Flag indicating whether metrics should be automatically fetched. */ - private boolean autoFetchMetrics = true; - - /** Flag indicating whether attributes should be automatically fetched. */ - private boolean autoFetchAttrs = true; - - /** Topology refresh frequency. */ - private long topRefreshFreq = DFLT_TOP_REFRESH_FREQ; - - /** Max time of connection idleness. */ - private long maxConnIdleTime = DFLT_MAX_CONN_IDLE_TIME; - - /** Ping interval. */ - private long pingInterval = DFLT_PING_INTERVAL; - - /** Ping timeout. */ - private long pingTimeout = DFLT_PING_TIMEOUT; - - /** Default balancer. */ - private GridClientLoadBalancer balancer = new GridClientRandomBalancer(); - - /** Collection of data configurations. */ - private Map<String, GridClientDataConfiguration> dataCfgs = Collections.emptyMap(); - - /** Credentials. */ - private GridSecurityCredentialsProvider credProvider; - - /** Executor. */ - private ExecutorService executor; - - /** Marshaller. */ - private GridClientMarshaller marshaller = new GridClientOptimizedMarshaller(); - - /** Daemon flag. */ - private boolean daemon; - - /** Portable configuration. */ - private PortableConfiguration portableCfg; - - /** - * Creates default configuration. - */ - public GridClientConfiguration() { - // No-op. - } - - /** - * Copy constructor. - * - * @param cfg Configuration to be copied. - */ - public GridClientConfiguration(GridClientConfiguration cfg) { - // Preserve alphabetical order for maintenance; - autoFetchAttrs = cfg.isAutoFetchAttributes(); - autoFetchMetrics = cfg.isAutoFetchMetrics(); - balancer = cfg.getBalancer(); - connectTimeout = cfg.getConnectTimeout(); - credProvider = cfg.getSecurityCredentialsProvider(); - enableAttrsCache = cfg.isEnableAttributesCache(); - enableMetricsCache = cfg.isEnableMetricsCache(); - executor = cfg.getExecutorService(); - marshaller = cfg.getMarshaller(); - maxConnIdleTime = cfg.getMaxConnectionIdleTime(); - pingInterval = cfg.getPingInterval(); - pingTimeout = cfg.getPingTimeout(); - proto = cfg.getProtocol(); - routers = cfg.getRouters(); - srvs = cfg.getServers(); - sslCtxFactory = cfg.getSslContextFactory(); - tcpNoDelay = cfg.isTcpNoDelay(); - topRefreshFreq = cfg.getTopologyRefreshFrequency(); - daemon = cfg.isDaemon(); - marshaller = cfg.getMarshaller(); - portableCfg = cfg.getPortableConfiguration(); - - setDataConfigurations(cfg.getDataConfigurations()); - } - - /** - * Creates properties-based configuration based on passed in properties. - * - * @param in Client configuration in properties format. - * @throws GridClientException If parsing configuration failed. - */ - public GridClientConfiguration(Properties in) throws GridClientException { - this("gg.client", in); - } - - /** - * Creates properties-based configuration. - * - * @param prefix Prefix for the client properties. - * @param in Properties map to load configuration from. - * @throws GridClientException If parsing configuration failed. - */ - public GridClientConfiguration(String prefix, Properties in) throws GridClientException { - load(prefix, in); - } - - /** - * Collection of {@code 'host:port'} pairs representing - * remote grid servers used to establish initial connection to - * the grid. Once connection is established, GridGain will get - * a full view on grid topology and will be able to connect to - * any available remote node. - * <p> - * Note that only these addresses are used to perform - * topology updates in background and to detect Grid connectivity - * status. - * - * @return Collection of {@code 'host:port'} pairs representing remote - * grid servers. - * @see GridClient#connected() - */ - public Collection<String> getServers() { - return Collections.unmodifiableCollection(srvs); - } - - /** - * Collection of {@code 'host:port'} pairs representing - * grid routers used to establish connection to the grid. - * <p> - * Addresses here could be owned by Routers as well as - * by individual Grid nodes. No additional connections - * will be made even if other Grid nodes are available. - * <p> - * This configuration mode is designated for cases when - * some Grid nodes are unavailable (due to security restrictions - * for example). So only few nodes acting as routers or - * dedicated router components used to access entire Grid. - * <p> - * This configuration parameter will not be used and direct - * connections to all grid nodes will be established if - * {@link #getServers()} return non-empty collection value. - * <p> - * Note that only these addresses are used to perform - * topology updates in background and to detect Grid connectivity - * status. - * - * @return Collection of {@code 'host:port'} pairs - * representing routers. - * @see GridClient#connected() - */ - public Collection<String> getRouters() { - return routers; - } - - /** - * Sets list of servers this client should connect to. - * - * @param srvs List of servers. - */ - public void setServers(Collection<String> srvs) { - this.srvs = srvs != null ? srvs : Collections.<String>emptySet(); - } - - /** - * Sets list of routers this client should connect to. - * - * @param routers List of routers. - */ - public void setRouters(Collection<String> routers) { - this.routers = routers != null ? routers : Collections.<String>emptySet(); - } - - /** - * Gets protocol for communication between client and remote grid. - * Default is defined by {@link #DFLT_CLIENT_PROTOCOL} constant. - * - * @return Protocol for communication between client and remote grid. - */ - public GridClientProtocol getProtocol() { - return proto; - } - - /** - * Sets protocol type that should be used in communication. Protocol type cannot be changed after - * client is created. - * - * @param proto Protocol type. - * @see GridClientProtocol - */ - public void setProtocol(GridClientProtocol proto) { - this.proto = proto; - } - - /** - * Gets timeout for socket connect operation in milliseconds. If {@code 0} - - * then wait infinitely. Default is defined by {@link #DFLT_CONNECT_TIMEOUT} constant. - * - * @return Connect timeout in milliseconds. - */ - public int getConnectTimeout() { - return connectTimeout; - } - - /** - * Gets flag indicating whether {@code TCP_NODELAY} flag should be enabled for outgoing connections. - * This flag reduces communication latency and in the majority of cases should be set to true. For more - * information, see {@link Socket#setTcpNoDelay(boolean)} - * <p> - * If not set, default value is {@link #DFLT_TCP_NODELAY} - * - * @return If {@code TCP_NODELAY} should be set on underlying sockets. - */ - public boolean isTcpNoDelay() { - return tcpNoDelay; - } - - /** - * Sets whether {@code TCP_NODELAY} flag should be set on underlying socket connections. - * - * @param tcpNoDelay {@code True} if flag should be set. - */ - public void setTcpNoDelay(boolean tcpNoDelay) { - this.tcpNoDelay = tcpNoDelay; - } - - /** - * Sets timeout for socket connect operation. - * - * @param connectTimeout Connect timeout in milliseconds. - */ - public void setConnectTimeout(int connectTimeout) { - this.connectTimeout = connectTimeout; - } - - /** - * Gets a factory that should be used for SSL context creation. - * If it returns {@code null} then SSL is considered disabled. - * - * @return Factory instance. - * @see GridSslContextFactory - */ - public GridSslContextFactory getSslContextFactory() { - return sslCtxFactory; - } - - /** - * Sets SSL context factory that will be used for creation of secure connections. - * - * @param sslCtxFactory Context factory. - */ - public void setSslContextFactory(GridSslContextFactory sslCtxFactory) { - this.sslCtxFactory = sslCtxFactory; - } - - /** - * Default balancer to be used for computational client. It can be overridden - * for different compute instances. By default {@link GridClientRandomBalancer} - * is used. - * - * @return Default balancer to be used for computational client. - */ - public GridClientLoadBalancer getBalancer() { - return balancer; - } - - /** - * Sets default compute balancer. - * - * @param balancer Balancer to use. - */ - public void setBalancer(GridClientLoadBalancer balancer) { - this.balancer = balancer; - } - - /** - * Gets client credentials provider to authenticate with. - * - * @return Credentials provider. - */ - public GridSecurityCredentialsProvider getSecurityCredentialsProvider() { - return credProvider; - } - - /** - * Sets client credentials provider used in authentication process. - * - * @param credProvider Client credentials provider. - */ - public void setSecurityCredentialsProvider(GridSecurityCredentialsProvider credProvider) { - this.credProvider = credProvider; - } - - /** - * Gets a collection of data configurations specified by user. - * - * @return Collection of data configurations (possibly empty). - */ - public Collection<GridClientDataConfiguration> getDataConfigurations() { - return dataCfgs.values(); - } - - /** - * Sets data configurations. - * - * @param dataCfgs Data configurations. - */ - public void setDataConfigurations(Collection<? extends GridClientDataConfiguration> dataCfgs) { - this.dataCfgs = U.newHashMap(dataCfgs.size()); - - for (GridClientDataConfiguration dataCfg : dataCfgs) - this.dataCfgs.put(dataCfg.getName(), new GridClientDataConfiguration(dataCfg)); - } - - /** - * Gets data configuration for a cache with specified name. - * - * @param name Name of grid cache. - * @return Configuration or {@code null} if there is not configuration for specified name. - */ - public GridClientDataConfiguration getDataConfiguration(@Nullable String name) { - return dataCfgs.get(name); - } - - /** - * Sets flag indicating whether node and cache metrics should be cached by client. - * - * @param enableMetricsCache {@code True} if cache should be enabled. - */ - public void setEnableMetricsCache(boolean enableMetricsCache) { - this.enableMetricsCache = enableMetricsCache; - } - - /** - * Enables client to cache per-node and per-cache metrics internally. In memory - * sensitive environments, such as mobile platforms, caching metrics - * may be expensive and, hence, this parameter should be set to {@code false}. - * <p> - * Note that topology is refreshed automatically every {@link #getTopologyRefreshFrequency()} - * interval, and if {@link #isAutoFetchMetrics()} enabled then metrics will be updated - * with that frequency. - * <p> - * By default this value is {@code true} which means that metrics will be cached - * on the client side. - * - * @return {@code True} if metrics cache is enabled, {@code false} otherwise. - */ - public boolean isEnableMetricsCache() { - return enableMetricsCache; - } - - /** - * Sets flag indicating whether node attributes should be cached by client. - * - * @param enableAttrsCache {@code True} if cache should be enabled. - */ - public void setEnableAttributesCache(boolean enableAttrsCache) { - this.enableAttrsCache = enableAttrsCache; - } - - /** - * Enables client to cache per-node attributes internally. In memory - * sensitive environments, such as mobile platforms, caching node attributes - * may be expensive and, hence, this parameter should be set to {@code false}. - * <p> - * Note that node attributes are static and, if cached, there is no need - * to refresh them again. If {@link #isAutoFetchAttributes()} is enabled then - * attributes will be cached during client initialization. - * <p> - * By default this value is {@code true} which means that node attributes - * will be cached on the client side. - * - * @return {@code True} if attributes cache is enabled, {@code false} otherwise. - */ - public boolean isEnableAttributesCache() { - return enableAttrsCache; - } - - /** - * Sets flag indicating whether node metrics should be fetched by client automatically. - * - * @param autoFetchMetrics {@code True} if metrics should be fetched. - */ - public void setAutoFetchMetrics(boolean autoFetchMetrics) { - this.autoFetchMetrics = autoFetchMetrics; - } - - /** - * Allows client to fetch node metrics automatically with background topology refresh. - * <p> - * Note that this parameter will only affect auto-fetching of node metrics. - * Cache metrics still need to be fetched explicitly via - * {@link GridClientData#metrics()} or {@link GridClientData#metricsAsync()} methods. - * <p> - * By default this value is {@code true} which means that metrics will be fetched - * automatically. - * - * @return {@code true} if client should fetch metrics on topology refresh, - * {@code false} otherwise. - */ - public boolean isAutoFetchMetrics() { - return autoFetchMetrics; - } - - /** - * Sets flag indicating whether node attributes should be fetched by client automatically. - * - * @param autoFetchAttrs {@code True} if attributes should be fetched. - */ - public void setAutoFetchAttributes(boolean autoFetchAttrs) { - this.autoFetchAttrs = autoFetchAttrs; - } - - /** - * Allows client to fetch node attributes automatically with background topology refresh. - * <p> - * By default this value is {@code true} which means that attributes will be fetched - * automatically. - * - * @return {@code True} if client should fetch attributes once on topology refresh, - * {@code false} otherwise. - */ - public boolean isAutoFetchAttributes() { - return autoFetchAttrs; - } - - /** - * Gets topology refresh frequency. Default is defined by {@link #DFLT_TOP_REFRESH_FREQ} - * constant. - * - * @return Topology refresh frequency. - */ - public long getTopologyRefreshFrequency() { - return topRefreshFreq; - } - - /** - * Sets topology refresh frequency. If topology cache is enabled, grid topology - * will be refreshed every {@code topRefreshFreq} milliseconds. - * - * @param topRefreshFreq Topology refresh frequency in milliseconds. - */ - public void setTopologyRefreshFrequency(long topRefreshFreq) { - this.topRefreshFreq = topRefreshFreq; - } - - /** - * Gets maximum amount of time that client connection can be idle before it is closed. - * Default is defined by {@link #DFLT_MAX_CONN_IDLE_TIME} constant. - * - * @return Maximum idle time in milliseconds. - */ - public long getMaxConnectionIdleTime() { - return maxConnIdleTime; - } - - /** - * Sets maximum time in milliseconds which connection can be idle before it is closed by client. - * - * @param maxConnIdleTime Maximum time of connection idleness in milliseconds. - */ - public void setMaxConnectionIdleTime(long maxConnIdleTime) { - this.maxConnIdleTime = maxConnIdleTime; - } - - /** - * Gets time interval in milliseconds between ping requests. Default is defined - * by {@link #DFLT_PING_INTERVAL} constant. - * <p> - * Ping requests used by {@link GridClientProtocol#TCP} protocol - * to detect network failures and half-opened sockets. - * - * @return Ping interval. - */ - public long getPingInterval() { - return pingInterval; - } - - /** - * Sets ping interval in milliseconds. - * - * @param pingInterval Ping interval in milliseconds. - */ - public void setPingInterval(long pingInterval) { - this.pingInterval = pingInterval; - } - - /** - * Gets ping timeout. Default is defined by {@link #DFLT_PING_TIMEOUT} constant. - * <p> - * Ping requests used by {@link GridClientProtocol#TCP} protocol - * to detect network failures and half-opened sockets. - * If no response received in period equal to this timeout than connection - * considered broken and closed. - * - * @return Ping timeout. - */ - public long getPingTimeout() { - return pingTimeout; - } - - /** - * Sets ping timeout in milliseconds. - * - * @param pingTimeout Ping interval in milliseconds. - */ - public void setPingTimeout(long pingTimeout) { - this.pingTimeout = pingTimeout; - } - - /** - * Gets {@link ExecutorService} where client could run asynchronous operations. - * <p> - * When using {@link GridClientProtocol#TCP} this executor should be able to serve at least - * {@code Runtime.getRuntime().availableProcessors()} parallel tasks. - * <p> - * Note that this executor will be automatically shut down when client get closed. - * - * @return {@link ExecutorService} instance to use. - */ - public ExecutorService getExecutorService() { - return executor; - } - - /** - * Sets executor service. - * - * @param executor Executor service to use in client. - */ - public void setExecutorService(ExecutorService executor) { - this.executor = executor; - } - - /** - * Gets the marshaller, that is used to communicate between client and server. - * <p> - * Options, that can be used out-of-the-box: - * <ul> - * <li>{@link GridClientOptimizedMarshaller} (default) - GridGain's optimized marshaller.</li> - * <li>{@code GridClientPortableMarshaller} - Marshaller that supports portable objects.</li> - * <li>{@link org.apache.ignite.internal.client.marshaller.jdk.GridClientJdkMarshaller} - JDK marshaller (not recommended).</li> - * </ul> - * - * @return A marshaller to use. - */ - public GridClientMarshaller getMarshaller() { - return marshaller; - } - - /** - * Sets the marshaller to use for communication. - * - * @param marshaller A marshaller to use. - */ - public void setMarshaller(GridClientMarshaller marshaller) { - this.marshaller = marshaller; - } - - /** - * Gets portable configuration. - * - * @return Portable configuration. - */ - public PortableConfiguration getPortableConfiguration() { - return portableCfg; - } - - /** - * Sets portable configuration. - * - * @param portableCfg Portable configuration. - */ - public void setPortableConfiguration(@Nullable PortableConfiguration portableCfg) { - this.portableCfg = portableCfg; - } - - /** - * Load client configuration from the properties map. - * - * @param prefix Prefix for the client properties. - * @param in Properties map to load configuration from. - * @throws GridClientException If parsing configuration failed. - */ - public void load(String prefix, Properties in) throws GridClientException { - while (prefix.endsWith(".")) - prefix = prefix.substring(0, prefix.length() - 1); - - if (!prefix.isEmpty()) - prefix += "."; - - String balancer = in.getProperty(prefix + "balancer"); - String connectTimeout = in.getProperty(prefix + "connectTimeout"); - String cred = in.getProperty(prefix + "credentials"); - String autoFetchMetrics = in.getProperty(prefix + "autoFetchMetrics"); - String autoFetchAttrs = in.getProperty(prefix + "autoFetchAttributes"); - String maxConnIdleTime = in.getProperty(prefix + "idleTimeout"); - String proto = in.getProperty(prefix + "protocol"); - String srvrs = in.getProperty(prefix + "servers"); - String tcpNoDelay = in.getProperty(prefix + "tcp.noDelay"); - String topRefreshFreq = in.getProperty(prefix + "topology.refresh"); - - String sslEnabled = in.getProperty(prefix + "ssl.enabled"); - - String sslProto = in.getProperty(prefix + "ssl.protocol", "TLS"); - String sslKeyAlg = in.getProperty(prefix + "ssl.key.algorithm", "SunX509"); - - String keyStorePath = in.getProperty(prefix + "ssl.keystore.location"); - String keyStorePwd = in.getProperty(prefix + "ssl.keystore.password"); - String keyStoreType = in.getProperty(prefix + "ssl.keystore.type"); - - String trustStorePath = in.getProperty(prefix + "ssl.truststore.location"); - String trustStorePwd = in.getProperty(prefix + "ssl.truststore.password"); - String trustStoreType = in.getProperty(prefix + "ssl.truststore.type"); - - String dataCfgs = in.getProperty(prefix + "data.configurations"); - - setBalancer(resolveBalancer(balancer)); - - if (!F.isEmpty(connectTimeout)) - setConnectTimeout(Integer.parseInt(connectTimeout)); - - if (!F.isEmpty(cred)) { - int idx = cred.indexOf(':'); - - if (idx >= 0 && idx < cred.length() - 1) { - setSecurityCredentialsProvider(new GridSecurityCredentialsBasicProvider( - new GridSecurityCredentials(cred.substring(0, idx), cred.substring(idx + 1)))); - } - else { - setSecurityCredentialsProvider(new GridSecurityCredentialsBasicProvider( - new GridSecurityCredentials(null, null, cred))); - } - } - - if (!F.isEmpty(autoFetchMetrics)) - setAutoFetchMetrics(Boolean.parseBoolean(autoFetchMetrics)); - - if (!F.isEmpty(autoFetchAttrs)) - setAutoFetchAttributes(Boolean.parseBoolean(autoFetchAttrs)); - - if (!F.isEmpty(maxConnIdleTime)) - setMaxConnectionIdleTime(Integer.parseInt(maxConnIdleTime)); - - if (!F.isEmpty(proto)) - setProtocol(GridClientProtocol.valueOf(proto)); - - if (!F.isEmpty(srvrs)) - setServers(Arrays.asList(srvrs.replaceAll("\\s+", "").split(","))); - - if (!F.isEmpty(tcpNoDelay)) - setTcpNoDelay(Boolean.parseBoolean(tcpNoDelay)); - - if (!F.isEmpty(topRefreshFreq)) - setTopologyRefreshFrequency(Long.parseLong(topRefreshFreq)); - - // - // SSL configuration section - // - - if (!F.isEmpty(sslEnabled) && Boolean.parseBoolean(sslEnabled)) { - GridSslBasicContextFactory factory = new GridSslBasicContextFactory(); - - factory.setProtocol(F.isEmpty(sslProto) ? "TLS" : sslProto); - factory.setKeyAlgorithm(F.isEmpty(sslKeyAlg) ? "SunX509" : sslKeyAlg); - - if (F.isEmpty(keyStorePath)) - throw new IllegalArgumentException("SSL key store location is not specified."); - - factory.setKeyStoreFilePath(keyStorePath); - - if (keyStorePwd != null) - factory.setKeyStorePassword(keyStorePwd.toCharArray()); - - factory.setKeyStoreType(F.isEmpty(keyStoreType) ? "jks" : keyStoreType); - - if (F.isEmpty(trustStorePath)) - factory.setTrustManagers(GridSslBasicContextFactory.getDisabledTrustManager()); - else { - factory.setTrustStoreFilePath(trustStorePath); - - if (trustStorePwd != null) - factory.setTrustStorePassword(trustStorePwd.toCharArray()); - - factory.setTrustStoreType(F.isEmpty(trustStoreType) ? "jks" : trustStoreType); - } - - setSslContextFactory(factory); - } - - // - // Data configuration section - // - - if (!F.isEmpty(dataCfgs)) { - String[] names = dataCfgs.replaceAll("\\s+", "").split(","); - Collection<GridClientDataConfiguration> list = new ArrayList<>(); - - for (String cfgName : names) { - if (F.isEmpty(cfgName)) - continue; - - String name = in.getProperty(prefix + "data." + cfgName + ".name"); - String bal = in.getProperty(prefix + "data." + cfgName + ".balancer"); - String aff = in.getProperty(prefix + "data." + cfgName + ".affinity"); - - GridClientDataConfiguration dataCfg = new GridClientDataConfiguration(); - - dataCfg.setName(F.isEmpty(name) ? null : name); - dataCfg.setBalancer(resolveBalancer(bal)); - dataCfg.setAffinity(resolveAffinity(aff)); - - list.add(dataCfg); - } - - setDataConfigurations(list); - } - } - - /** - * Resolve load balancer from string definition. - * - * @param balancer Load balancer string definition. - * @return Resolved load balancer. - * @throws GridClientException If loading failed. - */ - private static GridClientLoadBalancer resolveBalancer(String balancer) throws GridClientException { - if (F.isEmpty(balancer) || "random".equals(balancer)) - return new GridClientRandomBalancer(); - - if ("roundrobin".equals(balancer)) - return new GridClientRoundRobinBalancer(); - - return newInstance(GridClientLoadBalancer.class, balancer); - } - - /** - * Resolve data affinity from string definition. - * - * @param affinity Data affinity string definition. - * @return Resolved data affinity. - * @throws GridClientException If loading failed. - */ - private static GridClientDataAffinity resolveAffinity(String affinity) throws GridClientException { - if (F.isEmpty(affinity)) - return null; - - if ("partitioned".equals(affinity)) - return new GridClientPartitionAffinity(); - - return newInstance(GridClientDataAffinity.class, affinity); - } - - /** - * Constructs new instance of the specified class. - * - * @param exp Expected class for the new instance. - * @param clsName Class name to create new instance for. - * @param <T> Expected class type for the new instance. - * @return New instance of specified class. - * @throws GridClientException If loading failed. - */ - private static <T> T newInstance(Class<T> exp, String clsName) throws GridClientException { - Object obj; - - try { - obj = Class.forName(clsName).newInstance(); - } - // Catch all for convenience. - catch (Exception e) { - throw new GridClientException("Failed to create class instance: " + clsName, e); - } - - return exp.cast(obj); - } - - /** - * Set the daemon flag value. Communication threads will be created as daemons if this flag is set. - * - * @param daemon Daemon flag. - */ - public void setDaemon(boolean daemon) { - this.daemon = daemon; - } - - /** - * Get the daemon flag. - * - * @return Daemon flag. - */ - public boolean isDaemon() { - return daemon; - } -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/94cf4f01/modules/core/src/main/java/org/apache/ignite/client/package.html ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/client/package.html b/modules/core/src/main/java/org/apache/ignite/client/package.html deleted file mode 100644 index b77daac..0000000 --- a/modules/core/src/main/java/org/apache/ignite/client/package.html +++ /dev/null @@ -1,23 +0,0 @@ -<!-- - 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. - --> -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<html> -<body> -<!-- Package description. --> - Public Java client messages APIs. -</body> -</html> http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/94cf4f01/modules/core/src/main/java/org/apache/ignite/internal/client/GridClient.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/client/GridClient.java b/modules/core/src/main/java/org/apache/ignite/internal/client/GridClient.java index fb818ee..69df16c 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/client/GridClient.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/client/GridClient.java @@ -26,7 +26,7 @@ import java.util.*; * data and compute functionality, as well as provide listeners on topology changes. * <p> * You can obtain an instance of {@code GridClient} through - * {@link GridClientFactory#start(org.apache.ignite.client.GridClientConfiguration)}. Note that you + * {@link GridClientFactory#start(GridClientConfiguration)}. Note that you * can have multiple instances of {@code GridClient} running in the same VM. For * information on how to start or stop Grid please refer to {@link GridClientFactory} class. * <p> @@ -48,7 +48,7 @@ import java.util.*; * <p> * If client can't access some of grid nodes directly (for example due to security restrictions) * either dedicated Router component could be used or some of Grid nodes could act as routers. - * See {@link org.apache.ignite.client.GridClientConfiguration#getRouters()} for more details. + * See {@link GridClientConfiguration#getRouters()} for more details. * @see GridClientCompute * @see GridClientData */ @@ -96,7 +96,7 @@ public interface GridClient extends AutoCloseable { /** * Adds topology listener. Remote grid topology is refreshed every - * {@link org.apache.ignite.client.GridClientConfiguration#getTopologyRefreshFrequency()} milliseconds. If any node was added or removed, + * {@link GridClientConfiguration#getTopologyRefreshFrequency()} milliseconds. If any node was added or removed, * a listener will be notified. * * @param lsnr Listener to add. @@ -124,7 +124,7 @@ public interface GridClient extends AutoCloseable { * throw {@link GridClientDisconnectedException}. * <p> * Connection status is updated in background together with topology update. - * See {@link org.apache.ignite.client.GridClientConfiguration#getTopologyRefreshFrequency()} for more + * See {@link GridClientConfiguration#getTopologyRefreshFrequency()} for more * details on how background topology update works. * <p> * Note that due to asynchronous nature of topology update and connectivity detection http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/94cf4f01/modules/core/src/main/java/org/apache/ignite/internal/client/GridClientCompute.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/client/GridClientCompute.java b/modules/core/src/main/java/org/apache/ignite/internal/client/GridClientCompute.java index c0ec1ed..3835a8d 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/client/GridClientCompute.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/client/GridClientCompute.java @@ -41,8 +41,8 @@ import java.util.*; * You can also use any of the {@code refreshNode(...)} or {@code refreshTopology(...)} methods * to eagerly refresh metrics or attributes on remote nodes (note that attributes are static, * so it is sufficient to fetch and cache them only once). Metrics and attributes will be - * cached in {@link GridClientNode} instances automatically if {@link org.apache.ignite.client.GridClientConfiguration#isEnableMetricsCache()} - * or {@link org.apache.ignite.client.GridClientConfiguration#isEnableAttributesCache()} property is set to {@code true}. + * cached in {@link GridClientNode} instances automatically if {@link GridClientConfiguration#isEnableMetricsCache()} + * or {@link GridClientConfiguration#isEnableAttributesCache()} property is set to {@code true}. * <p> * Compute client also allows fetching contents of remote log files (including backwards mode) via any of * the provided {@code log(...)} methods. @@ -145,7 +145,7 @@ public interface GridClientCompute { /** * Gets load balancer used by this projection. By default, the balancer specified - * in {@link org.apache.ignite.client.GridClientConfiguration#getBalancer()} property is used. User can + * in {@link GridClientConfiguration#getBalancer()} property is used. User can * provide custom balancers for different projections via * {@link #projection(GridClientPredicate, GridClientLoadBalancer)} method. * @@ -267,12 +267,12 @@ public interface GridClientCompute { * metrics. * <p> * Note that fetched attributes and metrics may or may note be cached in {@link GridClientNode} - * based on {@link org.apache.ignite.client.GridClientConfiguration#isEnableMetricsCache()} and - * {@link org.apache.ignite.client.GridClientConfiguration#isEnableAttributesCache()} parameters. Even though topology - * is refreshed automatically every {@link org.apache.ignite.client.GridClientConfiguration#getTopologyRefreshFrequency()} + * based on {@link GridClientConfiguration#isEnableMetricsCache()} and + * {@link GridClientConfiguration#isEnableAttributesCache()} parameters. Even though topology + * is refreshed automatically every {@link GridClientConfiguration#getTopologyRefreshFrequency()} * interval, node metrics and attributes will be fetched in background only if - * {@link org.apache.ignite.client.GridClientConfiguration#isAutoFetchMetrics()} or - * {@link org.apache.ignite.client.GridClientConfiguration#isAutoFetchAttributes()} set to true. + * {@link GridClientConfiguration#isAutoFetchMetrics()} or + * {@link GridClientConfiguration#isAutoFetchAttributes()} set to true. * <p> * Also note that node attributes are static and, if cached, there is no need * to refresh them again. @@ -293,12 +293,12 @@ public interface GridClientCompute { * metrics. * <p> * Note that fetched attributes and metrics may or may note be cached in {@link GridClientNode} - * based on {@link org.apache.ignite.client.GridClientConfiguration#isEnableMetricsCache()} and - * {@link org.apache.ignite.client.GridClientConfiguration#isEnableAttributesCache()} parameters. Even though topology - * is refreshed automatically every {@link org.apache.ignite.client.GridClientConfiguration#getTopologyRefreshFrequency()} + * based on {@link GridClientConfiguration#isEnableMetricsCache()} and + * {@link GridClientConfiguration#isEnableAttributesCache()} parameters. Even though topology + * is refreshed automatically every {@link GridClientConfiguration#getTopologyRefreshFrequency()} * interval, node metrics and attributes will be fetched in background only if - * {@link org.apache.ignite.client.GridClientConfiguration#isAutoFetchMetrics()} or - * {@link org.apache.ignite.client.GridClientConfiguration#isAutoFetchAttributes()} set to true. + * {@link GridClientConfiguration#isAutoFetchMetrics()} or + * {@link GridClientConfiguration#isAutoFetchAttributes()} set to true. * <p> * Also note that node attributes are static and, if cached, there is no need * to refresh them again. @@ -318,12 +318,12 @@ public interface GridClientCompute { * metrics. * <p> * Note that fetched attributes and metrics may or may note be cached in {@link GridClientNode} - * based on {@link org.apache.ignite.client.GridClientConfiguration#isEnableMetricsCache()} and - * {@link org.apache.ignite.client.GridClientConfiguration#isEnableAttributesCache()} parameters. Even though topology - * is refreshed automatically every {@link org.apache.ignite.client.GridClientConfiguration#getTopologyRefreshFrequency()} + * based on {@link GridClientConfiguration#isEnableMetricsCache()} and + * {@link GridClientConfiguration#isEnableAttributesCache()} parameters. Even though topology + * is refreshed automatically every {@link GridClientConfiguration#getTopologyRefreshFrequency()} * interval, node metrics and attributes will be fetched in background only if - * {@link org.apache.ignite.client.GridClientConfiguration#isAutoFetchMetrics()} or - * {@link org.apache.ignite.client.GridClientConfiguration#isAutoFetchAttributes()} set to true. + * {@link GridClientConfiguration#isAutoFetchMetrics()} or + * {@link GridClientConfiguration#isAutoFetchAttributes()} set to true. * <p> * Also note that node attributes are static and, if cached, there is no need * to refresh them again. @@ -347,12 +347,12 @@ public interface GridClientCompute { * metrics. * <p> * Note that fetched attributes and metrics may or may note be cached in {@link GridClientNode} - * based on {@link org.apache.ignite.client.GridClientConfiguration#isEnableMetricsCache()} and - * {@link org.apache.ignite.client.GridClientConfiguration#isEnableAttributesCache()} parameters. Even though topology - * is refreshed automatically every {@link org.apache.ignite.client.GridClientConfiguration#getTopologyRefreshFrequency()} + * based on {@link GridClientConfiguration#isEnableMetricsCache()} and + * {@link GridClientConfiguration#isEnableAttributesCache()} parameters. Even though topology + * is refreshed automatically every {@link GridClientConfiguration#getTopologyRefreshFrequency()} * interval, node metrics and attributes will be fetched in background only if - * {@link org.apache.ignite.client.GridClientConfiguration#isAutoFetchMetrics()} or - * {@link org.apache.ignite.client.GridClientConfiguration#isAutoFetchAttributes()} set to true. + * {@link GridClientConfiguration#isAutoFetchMetrics()} or + * {@link GridClientConfiguration#isAutoFetchAttributes()} set to true. * <p> * Also note that node attributes are static and, if cached, there is no need * to refresh them again. @@ -370,12 +370,12 @@ public interface GridClientCompute { * metrics. * <p> * Note that fetched attributes and metrics may or may note be cached in {@link GridClientNode} - * based on {@link org.apache.ignite.client.GridClientConfiguration#isEnableMetricsCache()} and - * {@link org.apache.ignite.client.GridClientConfiguration#isEnableAttributesCache()} parameters. Even though topology - * is refreshed automatically every {@link org.apache.ignite.client.GridClientConfiguration#getTopologyRefreshFrequency()} + * based on {@link GridClientConfiguration#isEnableMetricsCache()} and + * {@link GridClientConfiguration#isEnableAttributesCache()} parameters. Even though topology + * is refreshed automatically every {@link GridClientConfiguration#getTopologyRefreshFrequency()} * interval, node metrics and attributes will be fetched in background only if - * {@link org.apache.ignite.client.GridClientConfiguration#isAutoFetchMetrics()} or - * {@link org.apache.ignite.client.GridClientConfiguration#isAutoFetchAttributes()} set to {@code true}. + * {@link GridClientConfiguration#isAutoFetchMetrics()} or + * {@link GridClientConfiguration#isAutoFetchAttributes()} set to {@code true}. * <p> * Also note that node attributes are static and, if cached, there is no need * to refresh them again. @@ -396,12 +396,12 @@ public interface GridClientCompute { * metrics. * <p> * Note that fetched attributes and metrics may or may note be cached in {@link GridClientNode} - * based on {@link org.apache.ignite.client.GridClientConfiguration#isEnableMetricsCache()} and - * {@link org.apache.ignite.client.GridClientConfiguration#isEnableAttributesCache()}parameters. Even though topology - * is refreshed automatically every {@link org.apache.ignite.client.GridClientConfiguration#getTopologyRefreshFrequency()} + * based on {@link GridClientConfiguration#isEnableMetricsCache()} and + * {@link GridClientConfiguration#isEnableAttributesCache()}parameters. Even though topology + * is refreshed automatically every {@link GridClientConfiguration#getTopologyRefreshFrequency()} * interval, node metrics and attributes will be fetched in background only if - * {@link org.apache.ignite.client.GridClientConfiguration#isAutoFetchMetrics()} or - * {@link org.apache.ignite.client.GridClientConfiguration#isAutoFetchAttributes()} set to {@code true}. + * {@link GridClientConfiguration#isAutoFetchMetrics()} or + * {@link GridClientConfiguration#isAutoFetchAttributes()} set to {@code true}. * <p> * Also note that node attributes are static and, if cached, there is no need * to refresh them again.