anton-vinogradov commented on code in PR #13095: URL: https://github.com/apache/ignite/pull/13095#discussion_r3598462845
########## modules/codegen/src/main/java/org/apache/ignite/internal/MarshalledMap.java: ########## @@ -0,0 +1,34 @@ +/* + * 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 java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** Marks a {@code Map} field whose wire form is a pair of {@code @Order} companion fields: {@link #keys()} and {@link #values()}. */ +@Retention(RetentionPolicy.CLASS) +@Target(ElementType.FIELD) +public @interface MarshalledMap { Review Comment: Update: done now — the family is merged into a single `@Marshalled`. The map flavour kept its two companions as attributes: `@Marshalled(keys = "...", values = "...")` (mutually exclusive with `value()`, validated by the processor), and the generator derives the mechanics from the companion shape. `@MarshalledMap` is gone. ########## modules/codegen/src/main/java/org/apache/ignite/internal/MarshalledObjects.java: ########## @@ -0,0 +1,39 @@ +/* + * 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 java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Marks a {@code Collection} field of arbitrary (non-{@code Message}) objects whose wire form is a companion + * {@code @Order Collection<byte[]>} field named by {@link #value()}: each element is marshalled to its own + * {@code byte[]}, so elements that need different deployment class loaders survive. Use {@code @MarshalledCollection} + * instead when the elements are {@code Message}s. + * + * <p>An unmarshalled {@code Map.Entry} element (a query result row) gets its {@code KeyCacheObject} key resolved with + * the message's cache object context: such a key arrives bytes-only and forbids lazy resolution. + */ +@Retention(RetentionPolicy.CLASS) +@Target(ElementType.FIELD) +public @interface MarshalledObjects { Review Comment: Update: done now — `@Marshalled` is the single annotation for all flavours, dispatched by the companion field's shape: `byte[]` = whole-object blob (non-message fields included), `Message[]` = per-element messages, `Collection<byte[]>` = per-element blobs. `@MarshalledObjects` is gone. ########## modules/core/src/main/java/org/apache/ignite/internal/managers/communication/IgniteMessageFactoryImpl.java: ########## @@ -132,6 +163,16 @@ public IgniteMessageFactoryImpl(MessageFactoryProvider[] factories) { return serializer; } + /** {@inheritDoc} */ + @Override public @Nullable MessageMarshaller marshaller(short directType) { Review Comment: Update: done by your parametrization patch — `IgniteMessageFactoryImpl` now holds `MessageSerializer<M>[]` / `MessageMarshaller<M>[]` / `GridCacheMessageDeployer<CM>[]` and the accessors return the parametrized types. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
