Class SnapshotFilesRequestMessage

    • Field Detail

      • TYPE_CODE

        public static final short TYPE_CODE
        Snapshot request message type (value is 178).
        See Also:
        Constant Field Values
    • Constructor Detail

      • SnapshotFilesRequestMessage

        public SnapshotFilesRequestMessage()
        Empty constructor required for Externalizable.
      • SnapshotFilesRequestMessage

        public SnapshotFilesRequestMessage​(String msgId,
                                           UUID reqId,
                                           String snpName,
                                           @Nullable
                                           @Nullable String snpPath,
                                           Map<Integer,​Set<Integer>> parts)
        Parameters:
        msgId - Unique message id.
        reqId - Snapshot operation request ID.
        snpName - Snapshot name to request.
        snpPath - Snapshot directory path.
        parts - Map of cache group ids and corresponding set of its partition ids to be snapshot.
    • Method Detail

      • parts

        public Map<Integer,​Set<Integer>> parts()
        Returns:
        The demanded cache group partitions per each cache group.
      • snapshotName

        public String snapshotName()
        Returns:
        Requested snapshot name.
      • snapshotPath

        public String snapshotPath()
        Returns:
        Snapshot directory path.
      • requestId

        public UUID requestId()
        Returns:
        Snapshot operation request ID.
      • writeTo

        public boolean writeTo​(ByteBuffer buf,
                               MessageWriter writer)
        Writes this message to provided byte buffer.
        Specified by:
        writeTo in interface Message
        Parameters:
        buf - Byte buffer.
        writer - Writer.
        Returns:
        Whether message was fully written.
      • readFrom

        public boolean readFrom​(ByteBuffer buf,
                                MessageReader reader)
        Reads this message from provided byte buffer.
        Specified by:
        readFrom in interface Message
        Parameters:
        buf - Byte buffer.
        reader - Reader.
        Returns:
        Whether message was fully read.
      • fieldsCount

        public byte fieldsCount()
        Gets fields count.
        Returns:
        Fields count.
      • directType

        public short directType()
        Gets message type.
        Returns:
        Message type.
      • toString

        public String toString()
      • id

        public String id()
        Returns:
        Unique message ID.
      • onAckReceived

        public void onAckReceived()
        Method called when ack message received.
        Specified by:
        onAckReceived in interface Message