anton-vinogradov commented on code in PR #13095:
URL: https://github.com/apache/ignite/pull/13095#discussion_r3560069182
##########
modules/commons/src/main/java/org/apache/ignite/plugin/extensions/communication/Message.java:
##########
@@ -23,7 +23,22 @@
import
org.apache.ignite.internal.managers.communication.UnknownMessageException;
/**
- * Base class for all communication messages.
+ * Base type for all messages sent between nodes, both over the communication
SPI and via discovery.
+ * <p>
+ * Serialized fields are declared by annotating instance fields; {@link
org.apache.ignite.internal.MessageProcessor} then
+ * generates the serializer, so implementations should not hand-write {@code
writeTo}/{@code readFrom}. Available
+ * field annotations (see each annotation's javadoc for details):
+ * <ul>
+ * <li>{@link org.apache.ignite.internal.Order @Order} — an ordered
serialized field (the basic building block);</li>
+ * <li>{@link org.apache.ignite.internal.Compress @Compress} — compress
the field's serialized form;</li>
+ * <li>{@link org.apache.ignite.internal.NioField @NioField} — a low-level
NIO field;</li>
+ * <li>{@link org.apache.ignite.internal.CustomMapper @CustomMapper} — map
the field via a custom mapper;</li>
+ * <li>{@link org.apache.ignite.internal.Marshalled @Marshalled} /
+ * {@link org.apache.ignite.internal.MarshalledMap @MarshalledMap} /
+ * {@link org.apache.ignite.internal.MarshalledCollection
@MarshalledCollection} /
Review Comment:
Applied.
##########
modules/commons/src/main/java/org/apache/ignite/plugin/extensions/communication/Message.java:
##########
@@ -23,7 +23,22 @@
import
org.apache.ignite.internal.managers.communication.UnknownMessageException;
/**
- * Base class for all communication messages.
+ * Base type for all messages sent between nodes, both over the communication
SPI and via discovery.
+ * <p>
+ * Serialized fields are declared by annotating instance fields; {@link
org.apache.ignite.internal.MessageProcessor} then
+ * generates the serializer, so implementations should not hand-write {@code
writeTo}/{@code readFrom}. Available
+ * field annotations (see each annotation's javadoc for details):
+ * <ul>
+ * <li>{@link org.apache.ignite.internal.Order @Order} — an ordered
serialized field (the basic building block);</li>
+ * <li>{@link org.apache.ignite.internal.Compress @Compress} — compress
the field's serialized form;</li>
+ * <li>{@link org.apache.ignite.internal.NioField @NioField} — a low-level
NIO field;</li>
+ * <li>{@link org.apache.ignite.internal.CustomMapper @CustomMapper} — map
the field via a custom mapper;</li>
+ * <li>{@link org.apache.ignite.internal.Marshalled @Marshalled} /
+ * {@link org.apache.ignite.internal.MarshalledMap @MarshalledMap} /
+ * {@link org.apache.ignite.internal.MarshalledCollection
@MarshalledCollection} /
+ * {@link org.apache.ignite.internal.MarshalledObjects
@MarshalledObjects} — for {@link MarshallableMessage}
Review Comment:
Applied.
##########
modules/commons/src/main/java/org/apache/ignite/plugin/extensions/communication/Message.java:
##########
@@ -23,7 +23,22 @@
import
org.apache.ignite.internal.managers.communication.UnknownMessageException;
/**
- * Base class for all communication messages.
+ * Base type for all messages sent between nodes, both over the communication
SPI and via discovery.
+ * <p>
+ * Serialized fields are declared by annotating instance fields; {@link
org.apache.ignite.internal.MessageProcessor} then
Review Comment:
Agreed it looks unusual, but it's deliberate: the annotations are codegen
machinery, not user API, so they stay internal — while `Message` is public for
the SPI's sake, its implementors are internal messages, and their authors are
exactly who reads this javadoc. `{@ignitelink}` is the codebase's standard tool
for this situation (see `ClusterNode`, `BaselineNode`).
--
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]