[infinispan-commits] Infinispan SVN: r2124 - in trunk: server/hotrod/src/main/scala/org/infinispan/server/hotrod and 1 other directory.
infinispan-commits at lists.jboss.org
infinispan-commits at lists.jboss.org
Fri Jul 30 10:24:24 EDT 2010
Author: manik.surtani at jboss.com
Date: 2010-07-30 10:24:24 -0400 (Fri, 30 Jul 2010)
New Revision: 2124
Modified:
trunk/client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/operations/HotRodOperation.java
trunk/server/hotrod/src/main/scala/org/infinispan/server/hotrod/Decoder10.scala
Log:
[ISPN-554] (Transactional Hot Rod headers)
Modified: trunk/client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/operations/HotRodOperation.java
===================================================================
--- trunk/client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/operations/HotRodOperation.java 2010-07-29 22:11:17 UTC (rev 2123)
+++ trunk/client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/operations/HotRodOperation.java 2010-07-30 14:24:24 UTC (rev 2124)
@@ -35,8 +35,11 @@
protected final byte[] cacheName;
protected final AtomicInteger topologyId;
- private static final byte[] NO_TX = new byte[]{};
+
+ private static final byte NO_TX = 0;
+ private static final byte XA_TX = 1;
+
protected HotRodOperation(Flag[] flags, byte[] cacheName, AtomicInteger topologyId) {
this.flags = flags;
this.cacheName = cacheName;
@@ -63,7 +66,7 @@
transport.writeByte(CLIENT_INTELLIGENCE_HASH_DISTRIBUTION_AWARE);
transport.writeVInt(topologyId.get());
//todo change once TX support is added
- transport.writeArray(NO_TX);
+ transport.writeByte(NO_TX);
if (log.isTraceEnabled()) {
log.trace("wrote header for message " + messageId + ". Operation code: " + operationCode + ". Flags: " + Integer.toHexString(flagInt));
}
Modified: trunk/server/hotrod/src/main/scala/org/infinispan/server/hotrod/Decoder10.scala
===================================================================
--- trunk/server/hotrod/src/main/scala/org/infinispan/server/hotrod/Decoder10.scala 2010-07-29 22:11:17 UTC (rev 2123)
+++ trunk/server/hotrod/src/main/scala/org/infinispan/server/hotrod/Decoder10.scala 2010-07-30 14:24:24 UTC (rev 2124)
@@ -53,7 +53,9 @@
val clientIntelligence = buffer.readUnsignedByte
val topologyId = buffer.readUnsignedInt
//todo use these once transaction support is added
- val txId = buffer.readRangedBytes
+ val txId = buffer.readByte
+ if (txId != 0) throw new UnsupportedOperationException("Transaction types other than 0 (NO_TX) is not supported at this stage. Saw TX_ID of " + txId)
+
new HotRodHeader(op, messageId, cacheName, flag, clientIntelligence, topologyId, this)
}
More information about the infinispan-commits
mailing list