public void write(PortableWriter writer) throws IOException {
writer.writeUTF("n", name);
writer.writeBoolean("a", async);
writer.writeLong("threadId", threadId);
final ObjectDataOutput out = writer.getRawDataOutput();
out.writeData(key);
}
public void read(PortableReader reader) throws IOException {
name = reader.readUTF("n");
async = reader.readBoolean("a");