Class MessageInfo.Builder

  • Enclosing class:
    MessageInfo

    public static class MessageInfo.Builder
    extends java.lang.Object
    A builder class for MessageInfo.
    • Constructor Detail

      • Builder

        public Builder​(StoreKey key,
                       long size,
                       short accountId,
                       short containerId,
                       long operationTimeMs)
        Constructor to create a builder.
        Parameters:
        key - The StoreKey associated with MessageInfo.
        size - The size of this message in bytes.
        accountId - accountId of the blob.
        containerId - containerId of the blob.
        operationTimeMs - operation time in ms.
    • Method Detail

      • accountId

        public MessageInfo.Builder accountId​(short accountId)
        Sets the accountId of the MessageInfo to build.
        Parameters:
        accountId - the accountId to set.
        Returns:
        This builder.
      • containerId

        public MessageInfo.Builder containerId​(short containerId)
        Sets the containerId of the MessageInfo to build.
        Parameters:
        containerId - the containerId to set.
        Returns:
        This builder.
      • operationTimeMs

        public MessageInfo.Builder operationTimeMs​(long operationTimeMs)
        Sets the operationTime in ms of the MessageInfo to build.
        Parameters:
        operationTimeMs - the operationTime to set.
        Returns:
        This builder.
      • size

        public MessageInfo.Builder size​(long size)
        Sets the size of the MessageInfo to build.
        Parameters:
        size - the size to set.
        Returns:
        This builder.
      • expirationTimeInMs

        public MessageInfo.Builder expirationTimeInMs​(long expirationTimeInMs)
        Sets expirationTime in ms of the MessageInfo to build.
        Parameters:
        expirationTimeInMs - the expirationTime to set
        Returns:
        This builder.
      • isDeleted

        public MessageInfo.Builder isDeleted​(boolean isDeleted)
        Sets isDeleted flag of the MessageInfo to build.
        Parameters:
        isDeleted - the isDeleted to set.
        Returns:
        This builder.
      • isTtlUpdated

        public MessageInfo.Builder isTtlUpdated​(boolean isTtlUpdated)
        Sets isTtlUpdated flag of the MessageInfo to build.
        Parameters:
        isTtlUpdated - the isTtlUpdated to set.
        Returns:
        This builder.
      • isUndeleted

        public MessageInfo.Builder isUndeleted​(boolean isUndeleted)
        Sets isUndeleted flag of the MessageInfo to build.
        Parameters:
        isUndeleted - the isUndeleted to set.
        Returns:
        This builder.
      • crc

        public MessageInfo.Builder crc​(java.lang.Long crc)
        Sets crc of the MessageInfo to build.
        Parameters:
        crc - the crc to set.
        Returns:
        This builder.
      • lifeVersion

        public MessageInfo.Builder lifeVersion​(short lifeVersion)
        Sets the lifeVersion of the MessageInfo to build.
        Parameters:
        lifeVersion - the lifeVersion to set.
        Returns:
        This builder.