@Override
  public long add(E item) {
    checkNotNull(item, "item can't be null");

    Data element = toData(item);
    ClientMessage request =
        RingbufferAddCodec.encodeRequest(name, OverflowPolicy.OVERWRITE.getId(), element);
    ClientMessage response = invoke(request, partitionId);
    RingbufferAddCodec.ResponseParameters resultParameters =
        RingbufferAddCodec.decodeResponse(response);
    return resultParameters.response;
  }
 @Override
 public Long decodeClientMessage(ClientMessage clientMessage) {
   return RingbufferAddCodec.decodeResponse(clientMessage).response;
 }