You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2015/03/04 14:26:53 UTC
[18/22] incubator-ignite git commit: #ignite-51: IgniteTxEntry
implements Message: remove filterBytes from IgniteTxEntry.
#ignite-51: IgniteTxEntry implements Message: remove filterBytes from IgniteTxEntry.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/52be74ab
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/52be74ab
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/52be74ab
Branch: refs/heads/ignite-51
Commit: 52be74ab9fd9aadec30f484d75b356e908667350
Parents: ebb880c
Author: ivasilinets <iv...@gridgain.com>
Authored: Wed Mar 4 13:01:28 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Wed Mar 4 13:01:28 2015 +0300
----------------------------------------------------------------------
.../near/NearTxPrepareResponseOwnedValue.java | 2 +-
.../cache/transactions/IgniteTxEntry.java | 36 +++++---------------
.../cache/transactions/TxEntryValueHolder.java | 2 +-
3 files changed, 11 insertions(+), 29 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/52be74ab/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/NearTxPrepareResponseOwnedValue.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/NearTxPrepareResponseOwnedValue.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/NearTxPrepareResponseOwnedValue.java
index 502b906..87f936e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/NearTxPrepareResponseOwnedValue.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/NearTxPrepareResponseOwnedValue.java
@@ -147,7 +147,7 @@ public class NearTxPrepareResponseOwnedValue implements Message {
/** {@inheritDoc} */
@Override public byte directType() {
- return 99;
+ return 102;
}
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/52be74ab/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java
index 678a653..0d0503f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java
@@ -26,11 +26,9 @@ import org.apache.ignite.internal.util.lang.*;
import org.apache.ignite.internal.util.tostring.*;
import org.apache.ignite.internal.util.typedef.*;
import org.apache.ignite.internal.util.typedef.internal.*;
-import org.apache.ignite.lang.*;
import org.apache.ignite.plugin.extensions.communication.*;
import org.jetbrains.annotations.*;
-import javax.cache.*;
import javax.cache.expiry.*;
import javax.cache.processor.*;
import java.io.*;
@@ -74,9 +72,6 @@ public class IgniteTxEntry implements GridPeerDeployAware, Message {
@GridDirectTransient
private TxEntryValueHolder prevVal = new TxEntryValueHolder();
- /** Filter bytes. */
- private byte[] filterBytes;
-
/** Transform. */
@GridToStringInclude
@GridDirectTransient
@@ -105,7 +100,6 @@ public class IgniteTxEntry implements GridPeerDeployAware, Message {
/** Put filters. */
@GridToStringInclude
- @GridDirectTransient
private CacheEntryPredicate[] filters;
/** Flag indicating whether filters passed. Used for fast-commit transactions. */
@@ -653,8 +647,6 @@ public class IgniteTxEntry implements GridPeerDeployAware, Message {
* @param filters Put filters.
*/
public void filters(CacheEntryPredicate[] filters) {
- filterBytes = null;
-
this.filters = filters;
}
@@ -703,11 +695,6 @@ public class IgniteTxEntry implements GridPeerDeployAware, Message {
if (transformClosBytes == null && entryProcessorsCol != null)
transformClosBytes = CU.marshal(ctx, entryProcessorsCol);
- if (F.isEmptyOrNulls(filters))
- filterBytes = null;
- else if (filterBytes == null)
- filterBytes = CU.marshal(ctx, filters);
-
if (transferExpiry)
transferExpiryPlc = expiryPlc != null && expiryPlc != this.ctx.expiry();
@@ -742,17 +729,12 @@ public class IgniteTxEntry implements GridPeerDeployAware, Message {
if (transformClosBytes != null && entryProcessorsCol == null)
entryProcessorsCol = ctx.marshaller().unmarshal(transformClosBytes, clsLdr);
- if (filters == null && filterBytes != null) {
- filters = ctx.marshaller().unmarshal(filterBytes, clsLdr);
-
- if (filters == null)
- filters = CU.empty0();
- else {
- for (CacheEntryPredicate p : filters) {
- if (p != null)
- p.finishUnmarshal(ctx.cacheContext(cacheId), clsLdr);
- }
- }
+ if (filters == null)
+ filters = CU.empty0();
+ else {
+ for (CacheEntryPredicate p : filters) {
+ if (p != null)
+ p.finishUnmarshal(ctx.cacheContext(cacheId), clsLdr);
}
}
@@ -821,7 +803,7 @@ public class IgniteTxEntry implements GridPeerDeployAware, Message {
writer.incrementState();
case 5:
- if (!writer.writeByteArray("filterBytes", filterBytes))
+ if (!writer.writeObjectArray("filters", filters, MessageCollectionItemType.MSG))
return false;
writer.incrementState();
@@ -910,7 +892,7 @@ public class IgniteTxEntry implements GridPeerDeployAware, Message {
reader.incrementState();
case 5:
- filterBytes = reader.readByteArray("filterBytes");
+ filters = reader.readObjectArray("filters", MessageCollectionItemType.MSG, CacheEntryPredicate.class);
if (!reader.isLastRead())
return false;
@@ -964,7 +946,7 @@ public class IgniteTxEntry implements GridPeerDeployAware, Message {
/** {@inheritDoc} */
@Override public byte directType() {
- return 97;
+ return 100;
}
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/52be74ab/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/TxEntryValueHolder.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/TxEntryValueHolder.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/TxEntryValueHolder.java
index 9627026..cce97b1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/TxEntryValueHolder.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/TxEntryValueHolder.java
@@ -223,7 +223,7 @@ public class TxEntryValueHolder implements Message {
/** {@inheritDoc} */
@Override public byte directType() {
- return 98;
+ return 101;
}
/** {@inheritDoc} */