Skip to content

Commit dfce3df

Browse files
committed
Apply comments
1 parent cf7ff13 commit dfce3df

File tree

2 files changed

+44
-4
lines changed

2 files changed

+44
-4
lines changed

modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentInfoBean.java

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,23 @@
1818
package org.apache.ignite.internal.managers.deployment;
1919

2020
import java.io.Externalizable;
21+
import java.io.IOException;
22+
import java.io.ObjectInput;
23+
import java.io.ObjectOutput;
2124
import java.util.Map;
2225
import java.util.UUID;
2326
import org.apache.ignite.configuration.DeploymentMode;
2427
import org.apache.ignite.internal.Order;
2528
import org.apache.ignite.internal.util.tostring.GridToStringInclude;
2629
import org.apache.ignite.internal.util.typedef.internal.S;
30+
import org.apache.ignite.internal.util.typedef.internal.U;
2731
import org.apache.ignite.lang.IgniteUuid;
2832
import 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);

modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/GridDeploymentInfoBeanTest.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
118
package org.apache.ignite.internal.managers.deployment;
219

320
import static java.util.UUID.randomUUID;

0 commit comments

Comments
 (0)