# IGNITE-191: WIP on compilation.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/20639a23 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/20639a23 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/20639a23 Branch: refs/heads/sprint-1 Commit: 20639a2333818e4cf678cc35ef2a39ea8ffd599b Parents: 9728459 Author: vozerov-gridgain <voze...@gridgain.com> Authored: Thu Feb 12 12:26:58 2015 +0300 Committer: vozerov-gridgain <voze...@gridgain.com> Committed: Thu Feb 12 12:26:58 2015 +0300 ---------------------------------------------------------------------- .../src/main/java/org/apache/ignite/Ignite.java | 9 - .../ignite/internal/GridKernalContext.java | 16 -- .../ignite/internal/GridKernalContextImpl.java | 29 +-- .../ignite/internal/GridPluginComponent.java | 2 - .../org/apache/ignite/internal/GridProduct.java | 29 --- .../apache/ignite/internal/GridProductImpl.java | 81 -------- .../apache/ignite/internal/IgniteKernal.java | 10 - .../processors/cache/GridCacheSwapManager.java | 1 - .../license/GridLicenseProcessor.java | 48 ----- .../license/os/GridOsLicenseProcessor.java | 51 ----- .../internal/processors/license/os/package.html | 24 --- .../internal/processors/license/package.html | 24 --- .../internal/product/IgniteProductLicense.java | 185 ------------------- .../product/IgniteProductLicenseException.java | 70 ------- .../apache/ignite/internal/product/package.html | 24 --- .../optimized/optimized-classnames.properties | 4 +- .../testframework/junits/GridAbstractTest.java | 1 - .../ignite/testframework/junits/IgniteMock.java | 5 - .../org/apache/ignite/IgniteSpringBean.java | 10 - pom.xml | 4 +- 20 files changed, 5 insertions(+), 622 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/20639a23/modules/core/src/main/java/org/apache/ignite/Ignite.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/Ignite.java b/modules/core/src/main/java/org/apache/ignite/Ignite.java index cee8301..1d665f8 100644 --- a/modules/core/src/main/java/org/apache/ignite/Ignite.java +++ b/modules/core/src/main/java/org/apache/ignite/Ignite.java @@ -21,8 +21,6 @@ import org.apache.ignite.cache.*; import org.apache.ignite.cache.affinity.*; import org.apache.ignite.cluster.*; import org.apache.ignite.configuration.*; -import org.apache.ignite.internal.*; -import org.apache.ignite.internal.product.*; import org.apache.ignite.internal.util.typedef.*; import org.apache.ignite.lang.*; import org.apache.ignite.plugin.*; @@ -175,13 +173,6 @@ public interface Ignite extends AutoCloseable { public ExecutorService executorService(ClusterGroup grp); /** - * Gets information about product as well as license management capabilities. - * - * @return Instance of product. - */ - public GridProduct product(); - - /** * Gets Ignite version. * * @return Ignite version. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/20639a23/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContext.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContext.java b/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContext.java index 46030bd..c0ab513 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContext.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContext.java @@ -43,7 +43,6 @@ import org.apache.ignite.internal.processors.fs.*; import org.apache.ignite.internal.processors.hadoop.*; import org.apache.ignite.internal.processors.job.*; import org.apache.ignite.internal.processors.jobmetrics.*; -import org.apache.ignite.internal.processors.license.*; import org.apache.ignite.internal.processors.offheap.*; import org.apache.ignite.internal.processors.plugin.*; import org.apache.ignite.internal.processors.port.*; @@ -58,7 +57,6 @@ import org.apache.ignite.internal.processors.session.*; import org.apache.ignite.internal.processors.streamer.*; import org.apache.ignite.internal.processors.task.*; import org.apache.ignite.internal.processors.timeout.*; -import org.apache.ignite.internal.product.*; import org.apache.ignite.internal.util.tostring.*; import org.apache.ignite.plugin.*; @@ -92,13 +90,6 @@ public interface GridKernalContext extends Iterable<GridComponent> { public String gridName(); /** - * Gets grid product. - * - * @return Grid product. - */ - public GridProduct product(); - - /** * Gets list of compatible versions. * * @return Compatible versions. @@ -154,13 +145,6 @@ public interface GridKernalContext extends Iterable<GridComponent> { public GridTaskProcessor task(); /** - * Gets license processor. - * - * @return License processor. - */ - public GridLicenseProcessor license(); - - /** * Gets cache data affinity processor. * * @return Cache data affinity processor. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/20639a23/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java index d018058..7f93c71 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java @@ -46,7 +46,6 @@ import org.apache.ignite.internal.processors.fs.*; import org.apache.ignite.internal.processors.hadoop.*; import org.apache.ignite.internal.processors.job.*; import org.apache.ignite.internal.processors.jobmetrics.*; -import org.apache.ignite.internal.processors.license.*; import org.apache.ignite.internal.processors.offheap.*; import org.apache.ignite.internal.processors.plugin.*; import org.apache.ignite.internal.processors.port.*; @@ -63,7 +62,6 @@ import org.apache.ignite.internal.processors.spring.*; import org.apache.ignite.internal.processors.streamer.*; import org.apache.ignite.internal.processors.task.*; import org.apache.ignite.internal.processors.timeout.*; -import org.apache.ignite.internal.product.*; import org.apache.ignite.internal.util.tostring.*; import org.apache.ignite.internal.util.typedef.*; import org.apache.ignite.internal.util.typedef.internal.*; @@ -232,10 +230,6 @@ public class GridKernalContextImpl implements GridKernalContext, Externalizable /** */ @GridToStringInclude - private GridLicenseProcessor licProc; - - /** */ - @GridToStringInclude private GridStreamProcessor streamProc; /** */ @@ -298,9 +292,6 @@ public class GridKernalContextImpl implements GridKernalContext, Externalizable private ExecutorService utilityCachePool; /** */ - private GridProduct product; - - /** */ private IgniteConfiguration cfg; /** */ @@ -464,8 +455,6 @@ public class GridKernalContextImpl implements GridKernalContext, Externalizable ggfsProc = (IgniteFsProcessorAdapter)comp; else if (comp instanceof GridOffHeapProcessor) offheapProc = (GridOffHeapProcessor)comp; - else if (comp instanceof GridLicenseProcessor) - licProc = (GridLicenseProcessor)comp; else if (comp instanceof GridStreamProcessor) streamProc = (GridStreamProcessor)comp; else if (comp instanceof GridContinuousProcessor) @@ -671,11 +660,6 @@ public class GridKernalContextImpl implements GridKernalContext, Externalizable } /** {@inheritDoc} */ - @Override public GridLicenseProcessor license() { - return licProc; - } - - /** {@inheritDoc} */ @Override public GridAffinityProcessor affinity() { return affProc; } @@ -762,18 +746,6 @@ public class GridKernalContextImpl implements GridKernalContext, Externalizable } /** - * @param product Product. - */ - public void product(GridProduct product) { - this.product = product; - } - - /** {@inheritDoc} */ - @Override public GridProduct product() { - return product; - } - - /** * Sets time source. For test purposes only. * * @param clockSrc Time source. @@ -817,6 +789,7 @@ public class GridKernalContextImpl implements GridKernalContext, Externalizable } /** {@inheritDoc} */ + @SuppressWarnings("unchecked") @Nullable @Override public <T> T createComponent(Class<T> cls) { T res = pluginProc.createComponent(cls); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/20639a23/modules/core/src/main/java/org/apache/ignite/internal/GridPluginComponent.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridPluginComponent.java b/modules/core/src/main/java/org/apache/ignite/internal/GridPluginComponent.java index 793673c..d8995d1 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/GridPluginComponent.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/GridPluginComponent.java @@ -60,8 +60,6 @@ public class GridPluginComponent implements GridComponent { /** {@inheritDoc} */ @Override public void onKernalStart() throws IgniteCheckedException { plugin.onIgniteStart(); - - } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/20639a23/modules/core/src/main/java/org/apache/ignite/internal/GridProduct.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridProduct.java b/modules/core/src/main/java/org/apache/ignite/internal/GridProduct.java deleted file mode 100644 index 1fab504..0000000 --- a/modules/core/src/main/java/org/apache/ignite/internal/GridProduct.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.apache.ignite.internal; - -import org.apache.ignite.internal.product.*; -import org.jetbrains.annotations.*; - -/** - * - */ -public interface GridProduct { - /** - * Gets license descriptor for enterprise edition or {@code null} for open source edition. - * - * @return License descriptor. - */ - @Nullable public IgniteProductLicense license(); - - /** - * Updates to a new license in enterprise edition. This method is no-op in open source edition. - * - * @param lic The content of the license. - * @throws IgniteProductLicenseException If license could not be updated. - */ - public void updateLicense(String lic) throws IgniteProductLicenseException; - - /** - * @return Grace period left. - */ - public long gracePeriodLeft(); -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/20639a23/modules/core/src/main/java/org/apache/ignite/internal/GridProductImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridProductImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/GridProductImpl.java deleted file mode 100644 index 6a7b8ec..0000000 --- a/modules/core/src/main/java/org/apache/ignite/internal/GridProductImpl.java +++ /dev/null @@ -1,81 +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.internal; - -import org.apache.ignite.internal.product.*; -import org.jetbrains.annotations.*; - -import java.io.*; - -/** - * {@link GridProduct} implementation. - */ -public class GridProductImpl implements GridProduct { - /** */ - private GridKernalContext ctx; - - /** - * Required by {@link Externalizable}. - */ - public GridProductImpl() { - // No-op. - } - - /** - * @param ctx Kernal context. - */ - public GridProductImpl(GridKernalContext ctx) { - this.ctx = ctx; - } - - /** {@inheritDoc} */ - @Override public long gracePeriodLeft() { - ctx.gateway().readLock(); - - try { - return ctx.license().gracePeriodLeft(); - } - finally { - ctx.gateway().readUnlock(); - } - } - - /** {@inheritDoc} */ - @Nullable @Override public IgniteProductLicense license() { - ctx.gateway().readLock(); - - try { - return ctx.license().license(); - } - finally { - ctx.gateway().readUnlock(); - } - } - - /** {@inheritDoc} */ - @Override public void updateLicense(String lic) throws IgniteProductLicenseException { - ctx.gateway().readLock(); - - try { - ctx.license().updateLicense(lic); - } - finally { - ctx.gateway().readUnlock(); - } - } -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/20639a23/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java index f83bdcc..40195ad 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java @@ -47,7 +47,6 @@ import org.apache.ignite.internal.processors.email.*; import org.apache.ignite.internal.processors.hadoop.*; import org.apache.ignite.internal.processors.job.*; import org.apache.ignite.internal.processors.jobmetrics.*; -import org.apache.ignite.internal.processors.license.*; import org.apache.ignite.internal.processors.offheap.*; import org.apache.ignite.internal.processors.plugin.*; import org.apache.ignite.internal.processors.port.*; @@ -660,8 +659,6 @@ public class IgniteKernal extends ClusterGroupAdapter implements IgniteEx, Ignit rsrcProc.setSpringContext(rsrcCtx); - ctx.product(new GridProductImpl(ctx)); - scheduler = new IgniteSchedulerImpl(ctx); startProcessor(ctx, rsrcProc, attrs); @@ -718,7 +715,6 @@ public class IgniteKernal extends ClusterGroupAdapter implements IgniteEx, Ignit // Start processors before discovery manager, so they will // be able to start receiving messages once discovery completes. startProcessor(ctx, new GridClockSyncProcessor(ctx), attrs); - startProcessor(ctx, createComponent(GridLicenseProcessor.class, ctx), attrs); startProcessor(ctx, new GridAffinityProcessor(ctx), attrs); startProcessor(ctx, createComponent(GridSegmentationProcessor.class, ctx), attrs); startProcessor(ctx, createComponent(GridPortableProcessor.class, ctx), attrs); @@ -3045,12 +3041,6 @@ public class IgniteKernal extends ClusterGroupAdapter implements IgniteEx, Ignit ctx.gateway().readUnlock(); } } - - /** {@inheritDoc} */ - @Override public GridProduct product() { - return ctx.product(); - } - /** {@inheritDoc} */ @Override public IgniteProductVersion version() { return VER; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/20639a23/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java index 6b3f819..37eb3d4 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java @@ -21,7 +21,6 @@ import org.apache.ignite.*; import org.apache.ignite.internal.managers.swapspace.*; import org.apache.ignite.internal.processors.cache.query.*; import org.apache.ignite.internal.processors.cache.version.*; -import org.apache.ignite.internal.processors.license.*; import org.apache.ignite.internal.processors.offheap.*; import org.apache.ignite.internal.util.*; import org.apache.ignite.internal.util.lang.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/20639a23/modules/core/src/main/java/org/apache/ignite/internal/processors/license/GridLicenseProcessor.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/license/GridLicenseProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/license/GridLicenseProcessor.java deleted file mode 100644 index 24e3ddb..0000000 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/license/GridLicenseProcessor.java +++ /dev/null @@ -1,48 +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.internal.processors.license; - -import org.apache.ignite.internal.processors.*; -import org.apache.ignite.internal.product.*; -import org.jetbrains.annotations.*; - -/** - * License processor. - */ -public interface GridLicenseProcessor extends GridProcessor { - /** - * Upload the new license into the current node. - * - * @param licTxt The string representation of the license file. - * @throws IgniteProductLicenseException Thrown if validation check failed for specified license or - * license can not be updated because configured license URL use non-file scheme. - */ - public void updateLicense(String licTxt) throws IgniteProductLicenseException; - - /** - * Gets license descriptor. - * - * @return License descriptor or {@code null} for open-source edition. - */ - @Nullable public IgniteProductLicense license(); - - /** - * @return Grace period left in minutes if bursting or {@code -1} otherwise. - */ - public long gracePeriodLeft(); -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/20639a23/modules/core/src/main/java/org/apache/ignite/internal/processors/license/os/GridOsLicenseProcessor.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/license/os/GridOsLicenseProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/license/os/GridOsLicenseProcessor.java deleted file mode 100644 index 9d58e8a..0000000 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/license/os/GridOsLicenseProcessor.java +++ /dev/null @@ -1,51 +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.internal.processors.license.os; - -import org.apache.ignite.internal.*; -import org.apache.ignite.internal.processors.*; -import org.apache.ignite.internal.processors.license.*; -import org.apache.ignite.internal.product.*; -import org.jetbrains.annotations.*; - -/** - * No-op implementation for {@link GridLicenseProcessor}. - */ -public class GridOsLicenseProcessor extends GridProcessorAdapter implements GridLicenseProcessor { - /** - * @param ctx Kernal context. - */ - public GridOsLicenseProcessor(GridKernalContext ctx) { - super(ctx); - } - - /** {@inheritDoc} */ - @Override public void updateLicense(String licTxt) throws IgniteProductLicenseException { - // No-op. - } - - /** {@inheritDoc} */ - @Nullable @Override public IgniteProductLicense license() { - return null; - } - - /** {@inheritDoc} */ - @Override public long gracePeriodLeft() { - return -1; - } -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/20639a23/modules/core/src/main/java/org/apache/ignite/internal/processors/license/os/package.html ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/license/os/package.html b/modules/core/src/main/java/org/apache/ignite/internal/processors/license/os/package.html deleted file mode 100644 index 6b6832f..0000000 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/license/os/package.html +++ /dev/null @@ -1,24 +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. --> - No-op implementation of license processor. -</body> -</html> http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/20639a23/modules/core/src/main/java/org/apache/ignite/internal/processors/license/package.html ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/license/package.html b/modules/core/src/main/java/org/apache/ignite/internal/processors/license/package.html deleted file mode 100644 index 203912d..0000000 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/license/package.html +++ /dev/null @@ -1,24 +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. --> - License processor. -</body> -</html> http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/20639a23/modules/core/src/main/java/org/apache/ignite/internal/product/IgniteProductLicense.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/product/IgniteProductLicense.java b/modules/core/src/main/java/org/apache/ignite/internal/product/IgniteProductLicense.java deleted file mode 100644 index 72f1f2d..0000000 --- a/modules/core/src/main/java/org/apache/ignite/internal/product/IgniteProductLicense.java +++ /dev/null @@ -1,185 +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.internal.product; - -import org.apache.ignite.internal.*; - -import org.jetbrains.annotations.*; - -import java.io.*; -import java.util.*; - -/** - * Ignite license descriptor. Ignite license is available for - * information purposes and is checked automatically by Ignite software. - * License descriptor can be obtains by calling {@link GridProduct#license()} method. - * @see GridProduct#license() - */ -public interface IgniteProductLicense extends Serializable { - /** - * Gets a comma separated list of disabled subsystems. - * - * @return Comma separated list of disabled subsystems or {@code null}. - */ - public String disabledSubsystems(); - - /** - * Gets license version. - * - * @return License version. - */ - public String version(); - - /** - * Gets license ID. - * - * @return License ID. - */ - public UUID id(); - - /** - * Version regular expression. - * - * @return Version regular expression. - */ - public String versionRegexp(); - - /** - * Gets issue date. - * - * @return Issue date. - */ - public Date issueDate(); - - /** - * Gets maintenance time in months. If zero - no restriction. - * - * @return Maintenance time. - */ - public int maintenanceTime(); - - /** - * Gets issue organization. - * - * @return Issue organization. - */ - public String issueOrganization(); - - /** - * Gets user organization. - * - * @return User organization. - */ - public String userOrganization(); - - /** - * Gets license note. It may include textual description of license limitations such - * as as "Development Only" or "Load-Testing and Staging Only". - * - * @return License note. - */ - public String licenseNote(); - - /** - * Gets user organization URL. - * - * @return User organization URL. - */ - public String userWww(); - - /** - * Gets user organization e-mail. - * - * @return User organization e-mail. - */ - public String userEmail(); - - /** - * Gets user organization contact name. - * - * @return User organization contact name. - */ - public String userName(); - - /** - * Gets expire date. - * - * @return Expire date. - */ - public Date expireDate(); - - /** - * Gets maximum number of nodes. If zero - no restriction. - * - * @return Maximum number of nodes. - */ - public int maxNodes(); - - /** - * Gets maximum number of physical computers or virtual instances. If zero - no restriction. - * Note that individual physical computer or virtual instance is determined by number of enabled - * MACs on each computer or instance. - * - * @return Maximum number of computers or virtual instances. - */ - public int maxComputers(); - - /** - * Gets maximum number of CPUs. If zero - no restriction. - * - * @return Maximum number of CPUs. - */ - public int maxCpus(); - - /** - * Gets maximum up time in minutes. If zero - no restriction. - * - * @return Maximum up time in minutes. - */ - public long maxUpTime(); - - /** - * Gets license violation grace period in minutes. If zero - no grace period. - * - * @return License violation grace period in minutes. - */ - public long gracePeriod(); - - /** - * Gets license attribute name if any. Attributes in license will have to match - * attributes in the grid node. - * - * @return Attribute name. - */ - @Nullable public String attributeName(); - - /** - * Gets value for the license attribute if any. Attributes in license will have to match - * attributes in the grid node. - * - * @return Attribute value. - */ - @Nullable public String attributeValue(); - - /** - * Gets a comma separated list of allowed cache distribution modes. - * - * @return Allowed cache distribution modes or {@code null}. - */ - @Nullable public String getCacheDistributionModes(); -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/20639a23/modules/core/src/main/java/org/apache/ignite/internal/product/IgniteProductLicenseException.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/product/IgniteProductLicenseException.java b/modules/core/src/main/java/org/apache/ignite/internal/product/IgniteProductLicenseException.java deleted file mode 100644 index 71c3021..0000000 --- a/modules/core/src/main/java/org/apache/ignite/internal/product/IgniteProductLicenseException.java +++ /dev/null @@ -1,70 +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.internal.product; - -import org.apache.ignite.*; -import org.apache.ignite.internal.util.typedef.internal.*; -import org.jetbrains.annotations.*; - -/** - * This exception is thrown when license violation is detected. - */ -public class IgniteProductLicenseException extends IgniteCheckedException { - /** */ - private static final long serialVersionUID = 0L; - - /** Short message. */ - private final String shortMsg; - - /** - * Creates new license exception with given error message. - * - * @param msg Error message. - * @param shortMsg Short error message presentable to the user. Note it should contain just letter and dot. - */ - public IgniteProductLicenseException(String msg, @Nullable String shortMsg) { - super(msg); - - this.shortMsg = shortMsg; - } - - /** - * Creates new license exception with given error message and optional nested exception. - * - * @param msg Error message. - * @param shortMsg Short error message presentable to the user. Note it should contain just letter and dot. - * @param cause Optional nested exception (can be {@code null}). - */ - public IgniteProductLicenseException(String msg, @Nullable String shortMsg, @Nullable Throwable cause) { - super(msg, cause); - - this.shortMsg = shortMsg; - } - - /** - * @return shortMessage Short error message presentable to the user. Note it should contain just letter and dot. - */ - public final String shortMessage() { - return shortMsg; - } - - /** {@inheritDoc} */ - @Override public String toString() { - return S.toString(IgniteProductLicenseException.class, this, "msg", getMessage(), "shortMsg", shortMsg); - } -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/20639a23/modules/core/src/main/java/org/apache/ignite/internal/product/package.html ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/product/package.html b/modules/core/src/main/java/org/apache/ignite/internal/product/package.html deleted file mode 100644 index 85d995c..0000000 --- a/modules/core/src/main/java/org/apache/ignite/internal/product/package.html +++ /dev/null @@ -1,24 +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. --> - Contains <b>Product</b> and <b>License</b> related functionality. -</body> -</html> http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/20639a23/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/optimized-classnames.properties ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/optimized-classnames.properties b/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/optimized-classnames.properties index b1ee08a..e64bb77 100644 --- a/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/optimized-classnames.properties +++ b/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/optimized-classnames.properties @@ -192,7 +192,7 @@ org.apache.ignite.internal.GridKillTask$GridKillJob org.apache.ignite.internal.GridLoggerProxy org.apache.ignite.internal.GridMessageListenHandler org.apache.ignite.internal.GridNodeOrderComparator -org.apache.ignite.internal.GridProductImpl +org.gridgain.grid.internal.processors.license.ent.GridProductImpl org.apache.ignite.internal.GridTaskCancelRequest org.apache.ignite.internal.GridTaskNameHashKey org.apache.ignite.internal.GridTaskSessionRequest @@ -1056,7 +1056,7 @@ org.apache.ignite.internal.processors.task.GridTaskProcessor$1 org.apache.ignite.internal.processors.task.GridTaskThreadContextKey org.apache.ignite.internal.processors.task.GridTaskWorker$3 org.apache.ignite.internal.processors.task.GridTaskWorker$State -org.apache.ignite.internal.product.IgniteProductLicenseException +org.gridgain.grid.product.IgniteProductLicenseException org.apache.ignite.internal.transactions.IgniteTxHeuristicCheckedException org.apache.ignite.internal.transactions.IgniteTxOptimisticCheckedException org.apache.ignite.internal.transactions.IgniteTxRollbackCheckedException http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/20639a23/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java index cce0cdb..8e48b53 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java @@ -23,7 +23,6 @@ import org.apache.ignite.cluster.*; import org.apache.ignite.configuration.*; import org.apache.ignite.events.*; import org.apache.ignite.internal.*; -import org.apache.ignite.internal.processors.license.*; import org.apache.ignite.internal.processors.resource.*; import org.apache.ignite.internal.util.*; import org.apache.ignite.internal.util.typedef.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/20639a23/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteMock.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteMock.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteMock.java index 1fae8ae..78c9ace 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteMock.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteMock.java @@ -154,11 +154,6 @@ public class IgniteMock implements Ignite { } /** {@inheritDoc} */ - @Override public GridProduct product() { - return null; - } - - /** {@inheritDoc} */ @Override public IgniteProductVersion version() { return null; } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/20639a23/modules/spring/src/main/java/org/apache/ignite/IgniteSpringBean.java ---------------------------------------------------------------------- diff --git a/modules/spring/src/main/java/org/apache/ignite/IgniteSpringBean.java b/modules/spring/src/main/java/org/apache/ignite/IgniteSpringBean.java index 6e4564b..3cd537d 100644 --- a/modules/spring/src/main/java/org/apache/ignite/IgniteSpringBean.java +++ b/modules/spring/src/main/java/org/apache/ignite/IgniteSpringBean.java @@ -21,11 +21,8 @@ import org.apache.ignite.cache.*; import org.apache.ignite.cache.affinity.*; import org.apache.ignite.cluster.*; import org.apache.ignite.configuration.*; -import org.apache.ignite.internal.*; import org.apache.ignite.lang.*; import org.apache.ignite.plugin.*; -import org.apache.ignite.internal.product.*; -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.*; @@ -132,13 +129,6 @@ public class IgniteSpringBean implements Ignite, DisposableBean, InitializingBea } /** {@inheritDoc} */ - @Override public GridProduct product() { - assert g != null; - - return g.product(); - } - - /** {@inheritDoc} */ @Override public IgniteProductVersion version() { assert g != null; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/20639a23/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index 11a32bc..4b5f14e 100644 --- a/pom.xml +++ b/pom.xml @@ -709,7 +709,7 @@ <groups> <group> <title>Common Grid APIs</title> - <packages>org.apache.ignite:org.apache.ignite.cluster:org.apache.ignite.lifecycle:org.apache.ignite.configuration:org.apache.ignite.spi:org.apache.ignite.lang:org.apache.ignite.resources:org.apache.ignite.thread:org.apache.ignite.product:org.apache.ignite.scheduler</packages> + <packages>org.apache.ignite:org.apache.ignite.cluster:org.apache.ignite.lifecycle:org.apache.ignite.configuration:org.apache.ignite.spi:org.apache.ignite.lang:org.apache.ignite.resources:org.apache.ignite.thread:org.apache.ignite.scheduler</packages> </group> <group> <title>Messaging APIs</title> @@ -919,7 +919,7 @@ <groups> <group> <title>Common Grid APIs</title> - <packages>org.apache.ignite:org.apache.ignite.cluster:org.apache.ignite.lifecycle:org.apache.ignite.configuration:org.apache.ignite.spi:org.apache.ignite.lang:org.apache.ignite.resources:org.apache.ignite.thread:org.apache.ignite.product:org.apache.ignite.scheduler</packages> + <packages>org.apache.ignite:org.apache.ignite.cluster:org.apache.ignite.lifecycle:org.apache.ignite.configuration:org.apache.ignite.spi:org.apache.ignite.lang:org.apache.ignite.resources:org.apache.ignite.thread:org.apache.ignite.scheduler</packages> </group> <group> <title>Messaging APIs</title>