1818package org .apache .ignite .internal .managers .deployment ;
1919
2020import java .io .Externalizable ;
21+ import java .io .IOException ;
22+ import java .io .ObjectInput ;
23+ import java .io .ObjectOutput ;
2124import java .util .Map ;
2225import java .util .UUID ;
2326import org .apache .ignite .configuration .DeploymentMode ;
2427import org .apache .ignite .internal .Order ;
2528import org .apache .ignite .internal .util .tostring .GridToStringInclude ;
2629import org .apache .ignite .internal .util .typedef .internal .S ;
30+ import org .apache .ignite .internal .util .typedef .internal .U ;
2731import org .apache .ignite .lang .IgniteUuid ;
2832import org .apache .ignite .plugin .extensions .communication .Message ;
2933
3034/**
3135 * Deployment info bean.
3236 */
33- public class GridDeploymentInfoBean implements Message , GridDeploymentInfo {
37+ public class GridDeploymentInfoBean implements Message , GridDeploymentInfo , Externalizable {
3438 /** */
3539 @ Order (value = 0 , method = "classLoaderId" )
3640 private IgniteUuid clsLdrId ;
@@ -39,9 +43,6 @@ public class GridDeploymentInfoBean implements Message, GridDeploymentInfo {
3943 @ Order (value = 1 , method = "deployMode" )
4044 private DeploymentMode depMode ;
4145
42- /** */
43- @ Order (value = 4 , method = "userVersion" )
44- private String userVer ;
4546
4647 /** */
4748 @ Order (value = 2 , method = "localDeploymentOwner" )
@@ -53,6 +54,10 @@ public class GridDeploymentInfoBean implements Message, GridDeploymentInfo {
5354 @ Order (3 )
5455 private Map <UUID , IgniteUuid > participants ;
5556
57+ /** */
58+ @ Order (value = 4 , method = "userVersion" )
59+ private String userVer ;
60+
5661 /**
5762 * Required by {@link Externalizable}.
5863 */
@@ -169,6 +174,24 @@ public void participants(Map<UUID, IgniteUuid> participants) {
169174 return 10 ;
170175 }
171176
177+ /** {@inheritDoc} */
178+ @ Override public void writeExternal (ObjectOutput out ) throws IOException {
179+ U .writeIgniteUuid (out , clsLdrId );
180+ U .writeEnum (out , depMode );
181+ U .writeString (out , userVer );
182+ out .writeBoolean (locDepOwner );
183+ U .writeMap (out , participants );
184+ }
185+
186+ /** {@inheritDoc} */
187+ @ Override public void readExternal (ObjectInput in ) throws IOException , ClassNotFoundException {
188+ clsLdrId = U .readIgniteUuid (in );
189+ depMode = DeploymentMode .fromOrdinal (in .readByte ());
190+ userVer = U .readString (in );
191+ locDepOwner = in .readBoolean ();
192+ participants = U .readMap (in );
193+ }
194+
172195 /** {@inheritDoc} */
173196 @ Override public String toString () {
174197 return S .toString (GridDeploymentInfoBean .class , this );
0 commit comments