Repository: ignite Updated Branches: refs/heads/ignite-5896 4f8f08522 -> 29bc29ec5
IGNITE-5896 Organize operations Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/29bc29ec Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/29bc29ec Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/29bc29ec Branch: refs/heads/ignite-5896 Commit: 29bc29ec561a11501a21a3cb88135b9442ed2e0a Parents: 4f8f085 Author: Pavel Tupitsyn <[email protected]> Authored: Tue Sep 5 12:56:52 2017 +0300 Committer: Pavel Tupitsyn <[email protected]> Committed: Tue Sep 5 12:56:52 2017 +0300 ---------------------------------------------------------------------- .../platform/client/ClientMessageParser.java | 1 + .../client/ClientPutBinaryTypesRequest.java | 57 ------------------- .../binary/ClientPutBinaryTypesRequest.java | 59 ++++++++++++++++++++ 3 files changed, 60 insertions(+), 57 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/29bc29ec/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/client/ClientMessageParser.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/client/ClientMessageParser.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/client/ClientMessageParser.java index 2db9bf4..90ea5d3 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/client/ClientMessageParser.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/client/ClientMessageParser.java @@ -31,6 +31,7 @@ import org.apache.ignite.internal.processors.odbc.SqlListenerRequest; import org.apache.ignite.internal.processors.odbc.SqlListenerResponse; import org.apache.ignite.internal.processors.platform.client.binary.ClientGetBinaryTypeNameRequest; import org.apache.ignite.internal.processors.platform.client.binary.ClientGetBinaryTypeSchemaRequest; +import org.apache.ignite.internal.processors.platform.client.binary.ClientPutBinaryTypesRequest; import org.apache.ignite.internal.processors.platform.client.binary.ClientRegisterBinaryTypeNameRequest; import org.apache.ignite.internal.processors.platform.client.cache.ClientCacheGetRequest; import org.apache.ignite.internal.processors.platform.client.cache.ClientCachePutRequest; http://git-wip-us.apache.org/repos/asf/ignite/blob/29bc29ec/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/client/ClientPutBinaryTypesRequest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/client/ClientPutBinaryTypesRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/client/ClientPutBinaryTypesRequest.java deleted file mode 100644 index 3fdd020..0000000 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/client/ClientPutBinaryTypesRequest.java +++ /dev/null @@ -1,57 +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.platform.client; - -import org.apache.ignite.internal.GridKernalContext; -import org.apache.ignite.internal.binary.BinaryContext; -import org.apache.ignite.internal.binary.BinaryMetadata; -import org.apache.ignite.internal.binary.BinaryRawReaderEx; -import org.apache.ignite.internal.processors.cache.binary.CacheObjectBinaryProcessorImpl; -import org.apache.ignite.internal.processors.platform.utils.PlatformUtils; - -import java.util.Collection; - -/** - * Binary types update request. - */ -class ClientPutBinaryTypesRequest extends ClientRequest { - /** Metas. */ - private final Collection<BinaryMetadata> metas; - - /** - * Ctor. - * - * @param reader Reader. - */ - ClientPutBinaryTypesRequest(BinaryRawReaderEx reader) { - super(reader); - - metas = PlatformUtils.readBinaryMetadata(reader); - } - - /** {@inheritDoc} */ - @SuppressWarnings("unchecked") - @Override public ClientResponse process(GridKernalContext ctx) { - BinaryContext binCtx = ((CacheObjectBinaryProcessorImpl) ctx.cacheObjects()).binaryContext(); - - for (BinaryMetadata meta : metas) - binCtx.updateMetadata(meta.typeId(), meta); - - return super.process(ctx); - } -} http://git-wip-us.apache.org/repos/asf/ignite/blob/29bc29ec/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/client/binary/ClientPutBinaryTypesRequest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/client/binary/ClientPutBinaryTypesRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/client/binary/ClientPutBinaryTypesRequest.java new file mode 100644 index 0000000..58badc5 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/client/binary/ClientPutBinaryTypesRequest.java @@ -0,0 +1,59 @@ +/* + * 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.platform.client.binary; + +import org.apache.ignite.internal.GridKernalContext; +import org.apache.ignite.internal.binary.BinaryContext; +import org.apache.ignite.internal.binary.BinaryMetadata; +import org.apache.ignite.internal.binary.BinaryRawReaderEx; +import org.apache.ignite.internal.processors.cache.binary.CacheObjectBinaryProcessorImpl; +import org.apache.ignite.internal.processors.platform.client.ClientRequest; +import org.apache.ignite.internal.processors.platform.client.ClientResponse; +import org.apache.ignite.internal.processors.platform.utils.PlatformUtils; + +import java.util.Collection; + +/** + * Binary types update request. + */ +public class ClientPutBinaryTypesRequest extends ClientRequest { + /** Metas. */ + private final Collection<BinaryMetadata> metas; + + /** + * Ctor. + * + * @param reader Reader. + */ + public ClientPutBinaryTypesRequest(BinaryRawReaderEx reader) { + super(reader); + + metas = PlatformUtils.readBinaryMetadata(reader); + } + + /** {@inheritDoc} */ + @SuppressWarnings("unchecked") + @Override public ClientResponse process(GridKernalContext ctx) { + BinaryContext binCtx = ((CacheObjectBinaryProcessorImpl) ctx.cacheObjects()).binaryContext(); + + for (BinaryMetadata meta : metas) + binCtx.updateMetadata(meta.typeId(), meta); + + return super.process(ctx); + } +}
