class RecoveryLastReceivedMessage implements Message {
    /** */
    private static final long serialVersionUID = 0L;

    /** */
    public static final long ALREADY_CONNECTED = -1;

    /** */
    public static final long NODE_STOPPING = -2;

    /** Need wait. */
    public static final long NEED_WAIT = -3;

    /** Initiator node is not in current topogy. */
    public static final long UNKNOWN_NODE = -4;

    /** Message body size in bytes. */
    private static final int MESSAGE_SIZE = 8;

    /** Full message size (with message type) in bytes. */
    public static final int MESSAGE_FULL_SIZE = MESSAGE_SIZE + DIRECT_TYPE_SIZE;

    /** */
    private long rcvCnt;

    /**
     * Default constructor required by {@link Message}.
     */
    public RecoveryLastReceivedMessage() {
        // No-op.
    }

    /**
     * @param rcvCnt Number of received messages.
     */
    public RecoveryLastReceivedMessage(long rcvCnt) {
        this.rcvCnt = rcvCnt;
    }

    /**
     * @return Number of received messages.
     */
    public long received() {
        return rcvCnt;
    }

    /** {@inheritDoc} */
    @Override public void onAckReceived() {
        // No-op.
    }

    /** {@inheritDoc} */
    @Override public boolean writeTo(ByteBuffer buf, MessageWriter writer) {<FILL_FUNCTION_BODY>}

    /** {@inheritDoc} */
    @Override public boolean readFrom(ByteBuffer buf, MessageReader reader) {
        if (buf.remaining() < MESSAGE_SIZE)
            return false;

        rcvCnt = buf.getLong();

        return true;
    }

    /** {@inheritDoc} */
    @Override public short directType() {
        return TcpCommunicationSpi.RECOVERY_LAST_ID_MSG_TYPE;
    }

    /** {@inheritDoc} */
    @Override public byte fieldsCount() {
        return 0;
    }

    /** {@inheritDoc} */
    @Override public String toString() {
        return S.toString(RecoveryLastReceivedMessage.class, this);
    }
}

        if (buf.remaining() < MESSAGE_FULL_SIZE)
            return false;

        TcpCommunicationSpi.writeMessageType(buf, directType());

        buf.putLong(rcvCnt);

        return true;
    
<no_super_class>