1717
1818package org .apache .ignite .internal .processors .marshaller ;
1919
20+ import org .apache .ignite .internal .Order ;
2021import org .apache .ignite .internal .managers .discovery .DiscoCache ;
2122import org .apache .ignite .internal .managers .discovery .DiscoveryCustomMessage ;
2223import org .apache .ignite .internal .managers .discovery .GridDiscoveryManager ;
2324import org .apache .ignite .internal .processors .affinity .AffinityTopologyVersion ;
2425import org .apache .ignite .internal .util .typedef .internal .S ;
2526import org .apache .ignite .lang .IgniteUuid ;
27+ import org .apache .ignite .plugin .extensions .communication .Message ;
2628import org .jetbrains .annotations .Nullable ;
2729
2830/**
2931 * Is sent as an acknowledgement for successfully proposed new mapping (see {@link MappingProposedMessage}).
3032 *
3133 * If any nodes were waiting for this mapping to be accepted they will be unblocked on receiving this message.
3234 */
33- public class MappingAcceptedMessage implements DiscoveryCustomMessage {
35+ public class MappingAcceptedMessage implements DiscoveryCustomMessage , Message {
36+ /** */
37+ public static final short DIRECT_TYPE = 515 ;
38+
3439 /** */
3540 private static final long serialVersionUID = 0L ;
3641
3742 /** */
38- private final IgniteUuid id = IgniteUuid .randomUuid ();
43+ @ Order (0 )
44+ IgniteUuid id = IgniteUuid .randomUuid ();
45+
46+ /** */
47+ @ Order (1 )
48+ byte platformId ;
49+
50+ /** */
51+ @ Order (2 )
52+ int typeId ;
3953
4054 /** */
41- private final MarshallerMappingItem item ;
55+ @ Order (3 )
56+ String clsName ;
57+
58+ /** */
59+ public MappingAcceptedMessage () {
60+ // No-op.
61+ }
4262
4363 /**
4464 * @param item Item.
4565 */
4666 MappingAcceptedMessage (MarshallerMappingItem item ) {
47- this .item = item ;
67+ this .platformId = item .platformId ();
68+ this .typeId = item .typeId ();
69+ this .clsName = item .className ();
4870 }
4971
5072 /** {@inheritDoc} */
@@ -70,7 +92,12 @@ public class MappingAcceptedMessage implements DiscoveryCustomMessage {
7092
7193 /** */
7294 MarshallerMappingItem getMappingItem () {
73- return item ;
95+ return new MarshallerMappingItem (platformId , typeId , clsName );
96+ }
97+
98+ /** {@inheritDoc} */
99+ @ Override public short directType () {
100+ return DIRECT_TYPE ;
74101 }
75102
76103 /** {@inheritDoc} */
0 commit comments