Skip to content

Commit

Permalink
IGNITE-61 - Direct marshalling
Browse files Browse the repository at this point in the history
  • Loading branch information
Valentin Kulichenko committed Feb 8, 2015
1 parent 215268f commit 159c1e8
Show file tree
Hide file tree
Showing 101 changed files with 3,349 additions and 7,241 deletions.
Expand Up @@ -131,33 +131,33 @@ public boolean system() {
/** {@inheritDoc} */ /** {@inheritDoc} */
@SuppressWarnings("all") @SuppressWarnings("all")
@Override public boolean writeTo(ByteBuffer buf) { @Override public boolean writeTo(ByteBuffer buf) {
commState.setBuffer(buf); writer.setBuffer(buf);


if (!commState.typeWritten) { if (!typeWritten) {
if (!commState.putByte(null, directType())) if (!writer.writeByte(null, directType()))
return false; return false;


commState.typeWritten = true; typeWritten = true;
} }


switch (commState.idx) { switch (state) {
case 0: case 0:
if (!commState.putGridUuid("jobId", jobId)) if (!writer.writeIgniteUuid("jobId", jobId))
return false; return false;


commState.idx++; state++;


case 1: case 1:
if (!commState.putGridUuid("sesId", sesId)) if (!writer.writeIgniteUuid("sesId", sesId))
return false; return false;


commState.idx++; state++;


case 2: case 2:
if (!commState.putBoolean("sys", sys)) if (!writer.writeBoolean("sys", sys))
return false; return false;


commState.idx++; state++;


} }


Expand All @@ -167,32 +167,32 @@ public boolean system() {
/** {@inheritDoc} */ /** {@inheritDoc} */
@SuppressWarnings("all") @SuppressWarnings("all")
@Override public boolean readFrom(ByteBuffer buf) { @Override public boolean readFrom(ByteBuffer buf) {
commState.setBuffer(buf); reader.setBuffer(buf);


switch (commState.idx) { switch (state) {
case 0: case 0:
jobId = commState.getGridUuid("jobId"); jobId = reader.readIgniteUuid("jobId");


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


commState.idx++; state++;


case 1: case 1:
sesId = commState.getGridUuid("sesId"); sesId = reader.readIgniteUuid("sesId");


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


commState.idx++; state++;


case 2: case 2:
sys = commState.getBoolean("sys"); sys = reader.readBoolean("sys");


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


commState.idx++; state++;


} }


Expand Down

0 comments on commit 159c1e8

Please sign in to comment.