@Override
  public void encodeRest(final ActiveMQBuffer buffer) {
    buffer.writeByte(journalID);

    buffer.writeBoolean(operation.toBoolean());
    buffer.writeLong(id);
    buffer.writeByte(journalRecordType);
    buffer.writeInt(encodingData.getEncodeSize());
    encodingData.encode(buffer);
  }
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = super.hashCode();
   result = prime * result + ((encodingData == null) ? 0 : encodingData.hashCode());
   result = prime * result + (int) (id ^ (id >>> 32));
   result = prime * result + journalID;
   result = prime * result + journalRecordType;
   result = prime * result + ((operation == null) ? 0 : operation.hashCode());
   result = prime * result + Arrays.hashCode(recordData);
   return result;
 }
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (!super.equals(obj)) return false;
   if (!(obj instanceof ReplicationAddMessage)) return false;
   ReplicationAddMessage other = (ReplicationAddMessage) obj;
   if (encodingData == null) {
     if (other.encodingData != null) return false;
   } else if (!encodingData.equals(other.encodingData)) return false;
   if (id != other.id) return false;
   if (journalID != other.journalID) return false;
   if (journalRecordType != other.journalRecordType) return false;
   if (operation != other.operation) return false;
   if (!Arrays.equals(recordData, other.recordData)) return false;
   return true;
 }