Skip to content
Merged
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 @@ -17,12 +17,9 @@

package org.apache.ignite.internal.processors.cache;

import java.nio.ByteBuffer;
import org.apache.ignite.internal.Order;
import org.apache.ignite.internal.util.tostring.GridToStringInclude;
import org.apache.ignite.internal.util.typedef.internal.S;
import org.apache.ignite.plugin.extensions.communication.MessageReader;
import org.apache.ignite.plugin.extensions.communication.MessageWriter;

/**
* Message related to particular cache group.
Expand All @@ -40,55 +37,6 @@ public int groupId() {
return grpId;
}

/** {@inheritDoc} */
@Override public boolean writeTo(ByteBuffer buf, MessageWriter writer) {
// TODO: Safe to remove only after all inheritors have migrated to the new ser/der scheme (IGNITE-25490).
writer.setBuffer(buf);

if (!super.writeTo(buf, writer))
return false;

if (!writer.isHeaderWritten()) {
if (!writer.writeHeader(directType()))
return false;

writer.onHeaderWritten();
}

switch (writer.state()) {
case 3:
if (!writer.writeInt(grpId))
return false;

writer.incrementState();

}

return true;
}

/** {@inheritDoc} */
@Override public boolean readFrom(ByteBuffer buf, MessageReader reader) {
// TODO: Safe to remove only after all inheritors have migrated to the new ser/der scheme (IGNITE-25490).
reader.setBuffer(buf);

if (!super.readFrom(buf, reader))
return false;

switch (reader.state()) {
case 3:
grpId = reader.readInt();

if (!reader.isLastRead())
return false;

reader.incrementState();

}

return true;
}

/** {@inheritDoc} */
@Override public String toString() {
return S.toString(GridCacheGroupIdMessage.class, this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,9 @@

package org.apache.ignite.internal.processors.cache;

import java.nio.ByteBuffer;
import org.apache.ignite.internal.Order;
import org.apache.ignite.internal.util.tostring.GridToStringInclude;
import org.apache.ignite.internal.util.typedef.internal.S;
import org.apache.ignite.plugin.extensions.communication.MessageReader;
import org.apache.ignite.plugin.extensions.communication.MessageWriter;

/**
* Message related to particular cache.
Expand All @@ -40,55 +37,6 @@ public int cacheId() {
return cacheId;
}

/** {@inheritDoc} */
@Override public boolean writeTo(ByteBuffer buf, MessageWriter writer) {
// TODO: Remove #writeTo() after all inheritors have migrated to the new ser/der scheme (IGNITE-25490).
writer.setBuffer(buf);

if (!super.writeTo(buf, writer))
return false;

if (!writer.isHeaderWritten()) {
if (!writer.writeHeader(directType()))
return false;

writer.onHeaderWritten();
}

switch (writer.state()) {
case 3:
if (!writer.writeInt(cacheId))
return false;

writer.incrementState();

}

return true;
}

/** {@inheritDoc} */
@Override public boolean readFrom(ByteBuffer buf, MessageReader reader) {
// TODO: Remove #readFrom() after all inheritors have migrated to the new ser/der scheme (IGNITE-25490).
reader.setBuffer(buf);

if (!super.readFrom(buf, reader))
return false;

switch (reader.state()) {
case 3:
cacheId = reader.readInt();

if (!reader.isLastRead())
return false;

reader.incrementState();

}

return true;
}

/** {@inheritDoc} */
@Override public String toString() {
return S.toString(GridCacheIdMessage.class, this, "super", super.toString());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -830,11 +830,10 @@ private void processFailedMessage(UUID nodeId,
GridDhtForceKeysResponse res = new GridDhtForceKeysResponse(
req.cacheId(),
req.futureId(),
req.miniId()
req.miniId(),
req.classError()
);

res.error(req.classError());

sendResponseOnFailedMessage(nodeId, res, cctx, plc);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

package org.apache.ignite.internal.processors.cache;

import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
Expand All @@ -38,8 +37,6 @@
import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.marshaller.Marshaller;
import org.apache.ignite.plugin.extensions.communication.Message;
import org.apache.ignite.plugin.extensions.communication.MessageReader;
import org.apache.ignite.plugin.extensions.communication.MessageWriter;
import org.jetbrains.annotations.Nullable;

/**
Expand Down Expand Up @@ -196,9 +193,9 @@ public void lastAffinityChangedTopologyVersion(AffinityTopologyVersion topVer) {
}

/**
* Deployment enabled flag indicates whether deployment info has to be added to this message.
* Deployment enabled flag indicates whether deployment info has to be added to this message.
*
* @return {@code true} or if deployment info must be added to the the message, {@code false} otherwise.
* @return {@code true} or if deployment info must be added to the message, {@code false} otherwise.
*/
public abstract boolean addDeploymentInfo();

Expand Down Expand Up @@ -641,77 +638,6 @@ public IgniteLogger messageLogger(GridCacheSharedContext<?, ?> ctx) {
return ctx.messageLogger();
}

/** {@inheritDoc} */
@Override public boolean writeTo(ByteBuffer buf, MessageWriter writer) {
// TODO: Safe to remove only after all inheritors have migrated to the new ser/der scheme (IGNITE-25490).
writer.setBuffer(buf);

if (!writer.isHeaderWritten()) {
if (!writer.writeHeader(directType()))
return false;

writer.onHeaderWritten();
}

switch (writer.state()) {
case 0:
if (!writer.writeMessage(depInfo))
return false;

writer.incrementState();

case 1:
if (!writer.writeAffinityTopologyVersion(lastAffChangedTopVer))
return false;

writer.incrementState();

case 2:
if (!writer.writeLong(msgId))
return false;

writer.incrementState();

}

return true;
}

/** {@inheritDoc} */
@Override public boolean readFrom(ByteBuffer buf, MessageReader reader) {
// TODO: Safe to remove only after all inheritors have migrated to the new ser/der scheme (IGNITE-25490).
reader.setBuffer(buf);

switch (reader.state()) {
case 0:
depInfo = reader.readMessage();

if (!reader.isLastRead())
return false;

reader.incrementState();

case 1:
lastAffChangedTopVer = reader.readAffinityTopologyVersion();

if (!reader.isLastRead())
return false;

reader.incrementState();

case 2:
msgId = reader.readLong();

if (!reader.isLastRead())
return false;

reader.incrementState();

}

return true;
}

/**
* @param str Bulder.
* @param name Flag name.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,48 +73,21 @@ public GridCacheTxRecoveryResponse(GridCacheVersion txId,
this.addDepInfo = addDepInfo;
}

/**
* @return Future ID.
*/
/** @return Future ID. */
public IgniteUuid futureId() {
return futId;
}

/**
* @param futId Future ID.
*/
public void futureId(IgniteUuid futId) {
this.futId = futId;
}

/**
* @return Mini future ID.
*/
/** @return Mini future ID. */
public IgniteUuid miniId() {
return miniId;
}

/**
* @param miniId Mini future ID.
*/
public void miniId(IgniteUuid miniId) {
this.miniId = miniId;
}

/**
* @return {@code True} if all remote transactions were prepared.
*/
/** @return {@code True} if all remote transactions were prepared. */
public boolean success() {
return success;
}

/**
* @param success {@code True} if all remote transactions were prepared.
*/
public void success(boolean success) {
this.success = success;
}

/** {@inheritDoc} */
@Override public IgniteTxState txState() {
return txState;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,54 +119,16 @@ public GridDistributedLockResponse(int cacheId,
vals = new ArrayList<>(cnt);
}

/**
*
* @return Future ID.
*/
/** @return Future ID. */
public IgniteUuid futureId() {
return futId;
}

/**
* @param futId New future ID.
*/
public void futureId(IgniteUuid futId) {
this.futId = futId;
}

/** {@inheritDoc} */
@Override public Throwable error() {
return ErrorMessage.error(errMsg);
}

/**
* @return Error message.
*/
public ErrorMessage errorMessage() {
return errMsg;
}

/**
* @param errMsg New error message.
*/
public void errorMessage(ErrorMessage errMsg) {
this.errMsg = errMsg;
}

/**
* @return Values.
*/
public List<CacheObject> values() {
return vals;
}

/**
* @param vals New values.
*/
public void values(List<CacheObject> vals) {
this.vals = vals;
}

/**
* @param val Value.
*/
Expand Down
Loading
Loading