Class WriteResult<K,​L>

    • Constructor Detail

      • WriteResult

        protected WriteResult()
    • Method Detail

      • create

        public static <K,​L> WriteResult<K,​L> create​(Connection<L> connection,
                                                                K message,
                                                                L dstAddress,
                                                                long writeSize)
      • getMessage

        public final K getMessage()
        Get the message, which was read.
        Returns:
        the message, which was read.
      • setMessage

        public final void setMessage​(K message)
        Set the message, which was read.
        Parameters:
        message - the message, which was read.
      • getDstAddress

        public final L getDstAddress()
        Get the destination address, the message was written to.
        Returns:
        the destination address, the message was written to.
      • getDstAddressHolder

        public final Holder<L> getDstAddressHolder()
        Get the destination address, the message was written to.
        Returns:
        the destination address, the message was written to.
      • setDstAddress

        public final void setDstAddress​(L dstAddress)
        Set the destination address, the message was written to.
        Parameters:
        dstAddress - the destination address, the message was written to.
      • setDstAddressHolder

        public final void setDstAddressHolder​(Holder<L> dstAddressHolder)
        Set the destination address, the message was written to.
        Parameters:
        dstAddressHolder - the destination address, the message was written to.
      • getWrittenSize

        public final long getWrittenSize()
        Get the number of bytes, which were written.
        Returns:
        the number of bytes, which were written.
      • setWrittenSize

        public final void setWrittenSize​(long writeSize)
        Set the number of bytes, which were written.
        Parameters:
        writeSize - the number of bytes, which were written.
      • set

        protected void set​(Connection<L> connection,
                           K message,
                           L dstAddress,
                           long writtenSize)
        One method to set all the WriteResult properties.
        Parameters:
        connection -
        message -
        dstAddress -
        writtenSize -
      • createAddrHolder

        protected Holder<L> createAddrHolder​(L dstAddress)
        Create an address holder.
        Parameters:
        dstAddress -
        Returns:
      • reset

        protected void reset()
      • recycle

        public void recycle()
        Specified by:
        recycle in interface Cacheable