Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
import org.jetbrains.annotations.Nullable;

/**
* Query/fragment colocation group. As a {@link Message}, has to be prepared to send to another node and restored after
* receiving from another node.
* Query/fragment colocation group. Has to be prepared to send to another node and to restore after receiving from another
* node.
*
* @see #prepareToSend()
* @see #afterReceive()
Expand Down Expand Up @@ -321,7 +321,7 @@ public int[] partitions(UUID nodeId) {
return parts.arrayCopy();
}

/** Prepares colocation group as {@link Message} to send to another node. */
/** Prepares the assigments to send to another node. */
public void prepareToSend() {
if (!F.isEmpty(marshalledAssignments) || assignments == null || primaryAssignment)
return;
Expand Down Expand Up @@ -350,7 +350,7 @@ public void prepareToSend() {
marshalledAssignments = builder.build().buffer();
}

/** Properly unwraps colocation group as {@link Message} after receiving from another node. */
/** Properly unwraps the assigments after receiving from another node. */
public void afterReceive() {
/** {@link #assignments} are set in constructors or are updated when {@link #marshalledAssignments} is {@code null}. */
if (marshalledAssignments == null || assignments != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
import org.jetbrains.annotations.Nullable;

/**
* Query fragment description. As a {@link Message}, has to be prepared to send to another node and restored after
* receiving from another node.
* Query fragment description. Has to be prepared to send to another node and to restore after receiving from another
* node.
*
* @see #preparedToSend()
* @see #receivedFragment()
Expand Down Expand Up @@ -67,7 +67,7 @@ public FragmentDescription(long fragmentId, FragmentMapping mapping, @Nullable C
this.target = target.explicitMapping();
}

/** Prepares fragment description as {@link Message} to send to another node. */
/** Prepares this fragment description to send to another node. */
public FragmentDescription preparedToSend() {
if (target != null)
target.prepareToSend();
Expand All @@ -77,7 +77,7 @@ public FragmentDescription preparedToSend() {
return this;
}

/** Properly unwraps fragment description as {@link Message} after receiving from another node. */
/** Properly unwraps this fragment description after receiving from another node. */
public FragmentDescription receivedFragment() {
if (!received) {
if (target != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,8 @@ private void processEventInactive(DiscoveryEvent evt, DiscoCache cache) {
cctx.io().addCacheHandler(GridDhtPartitionsSingleMessage.class,
new MessageHandler<GridDhtPartitionsSingleMessage>() {
@Override public void onMessage(final ClusterNode node, final GridDhtPartitionsSingleMessage msg) {
msg.afterReceive();

GridDhtPartitionExchangeId exchangeId = msg.exchangeId();

if (exchangeId != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import java.util.Map;
import org.apache.ignite.internal.Compress;
import org.apache.ignite.internal.Order;
import org.apache.ignite.internal.SelfMarshallingMessage;
import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionState;
import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
import org.apache.ignite.internal.util.ErrorMessage;
Expand All @@ -33,11 +32,13 @@
import org.jetbrains.annotations.Nullable;

/**
* Information about partitions of a single node. <br>
* Information about partitions of a single node. Sent in response to {@link GridDhtPartitionsSingleRequest} and during
* processing partitions exchange future. <br>
* Has to be completelly restored after receiving from another node.
*
* Sent in response to {@link GridDhtPartitionsSingleRequest} and during processing partitions exchange future.
* @see #afterReceive()
*/
public class GridDhtPartitionsSingleMessage extends GridDhtPartitionsAbstractMessage implements SelfMarshallingMessage {
public class GridDhtPartitionsSingleMessage extends GridDhtPartitionsAbstractMessage {
/** Local partitions. */
@Order(0)
@Compress
Expand Down Expand Up @@ -289,13 +290,8 @@ public void exchangeStartTime(long exchangeStartTime) {
this.exchangeStartTime = exchangeStartTime;
}

/** {@inheritDoc} */
@Override public void selfMarshal() {
// No-op.
}

/** {@inheritDoc} */
@Override public void selfUnmarshal() {
/** Properly unwraps the partitions after receiving from another node. */
public void afterReceive() {
if (dupPartsData != null) {
assert parts != null;

Expand Down
Loading