I implemented the Binarylizable interface. If I attempt to get the object
from cache using just the key it works. If I attempt to get the object via a
sqlQuery I get the index out of bounds exception. Our preferred approach is
to use SqlQuery. Is there a way to accomplish this? These are the fields
private UUID id;
/** Will be indexed in ascending order. */
@QuerySqlField(index = true)
private String documentId;
/** Will be indexed in ascending order. */
@QuerySqlField(index = true)
private Integer pageNumber;
private String pageFormat;
private byte[] image;
@Override
public void readBinary (BinaryReader reader)
throws BinaryObjectException
{
// TODO Auto-generated method stub
image = reader.readByteArray("image");
id = reader.readUuid("id");
pageFormat = reader.readString("pageFormat");
documentId = reader.readString("documentId");
pageNumber = reader.readInt("pageNumber");
}
@Override
public void writeBinary (BinaryWriter writer)
throws BinaryObjectException
{
// TODO Auto-generated method stub
writer.writeByteArray("image", image);
writer.writeUuid("id", id);
writer.writeString("pageFormat", pageFormat);
writer.writeString("documentId", documentId);
writer.writeInt("pageNumber", pageNumber);
}
--
View this message in context:
http://apache-ignite-users.70518.x6.nabble.com/Byte-serialization-tp7768p7771.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.