Skip to content

Commit

Permalink
removed unwanted code
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob Austin committed Jan 12, 2016
1 parent 00c376f commit 3f6f458
Showing 1 changed file with 12 additions and 6 deletions.
Expand Up @@ -293,18 +293,19 @@ private <T> long read(
return wire.bytes().readPosition(); return wire.bytes().readPosition();
} }



// In case of meta data, if we are found the "roll" meta, we returns // In case of meta data, if we are found the "roll" meta, we returns
// the next cycle (negative) // the next cycle (negative)
final StringBuilder sb = Wires.acquireStringBuilder(); /* final StringBuilder sb = Wires.acquireStringBuilder();
// todo improve this line // todo improve this line
final ValueIn vi = wire.read(sb); final ValueIn vi = wire.readEventName(sb);
if ("index".contentEquals(sb)) { if ("index".contentEquals(sb)) {
return read(wire, reader, marshaller); return read(wire, reader, marshaller);
} else if ("roll".contentEquals(sb)) { } else if ("roll".contentEquals(sb)) {
return -vi.int32(); return -vi.int32();
} }*/


} }


Expand Down Expand Up @@ -659,7 +660,7 @@ class Indexing implements Marshallable {
final Bytes b = Bytes.elasticByteBuffer(); final Bytes b = Bytes.elasticByteBuffer();


templateIndex = wireType.apply(b); templateIndex = wireType.apply(b);
templateIndex.writeDocument(true, w -> w.write(() -> "index") templateIndex.writeDocument(true, w -> w.writeEventName(() -> "index")
.int64array(NUMBER_OF_ENTRIES_IN_EACH_INDEX)); .int64array(NUMBER_OF_ENTRIES_IN_EACH_INDEX));


this.wireType = wireType; this.wireType = wireType;
Expand Down Expand Up @@ -777,9 +778,14 @@ public void storeIndexLocation(Bytes context,
} }


private LongArrayValues array(WireIn w, LongArrayValues using) { private LongArrayValues array(WireIn w, LongArrayValues using) {
final ValueIn read = w.read(() -> "index");


read.int64array(using, this, (o1, o2) -> { final StringBuilder sb = Wires.acquireStringBuilder();
final ValueIn valueIn = w.readEventName(sb);

if (!"index".contentEquals(sb))
throw new IllegalStateException("expecting and index");

valueIn.int64array(using, this, (o1, o2) -> {
}); });
return using; return using;
} }
Expand Down

0 comments on commit 3f6f458

Please sign in to comment.