Class SnapshotMetadata

    • Constructor Detail

      • SnapshotMetadata

        public SnapshotMetadata​(UUID rqId,
                                String snpName,
                                String consId,
                                String folderName,
                                boolean comprParts,
                                int pageSize,
                                List<Integer> grpIds,
                                long snapshotTime,
                                Collection<Integer> compGrpIds,
                                Set<String> bltNodes,
                                Set<GroupPartitionId> pairs,
                                @Nullable
                                @Nullable WALPointer snpRecPtr,
                                @Nullable
                                @org.jetbrains.annotations.Nullable byte[] masterKeyDigest,
                                boolean onlyPrimary,
                                boolean dump,
                                @Nullable
                                @org.jetbrains.annotations.Nullable byte[] encKey)
        Parameters:
        rqId - Unique request id.
        snpName - Snapshot name.
        consId - Consistent id of a node to which this metadata relates.
        folderName - Directory name which stores the data files.
        comprParts - If true then compress partition files.
        pageSize - Page size of stored snapshot data.
        grpIds - The list of cache groups ids which were included into snapshot.
        bltNodes - The set of affected by snapshot baseline nodes.
        snpRecPtr - WAL pointer to ClusterSnapshotRecord if exists.
        masterKeyDigest - Master key digest for encrypted caches.
        snapshotTime - of the snapshot creation.
        onlyPrimary - If true snapshot only primary copies of partitions.
        dump - If true cache group dump stored.
        encKey - Encryption key. For dumps, only.
    • Method Detail

      • requestId

        public UUID requestId()
        Returns:
        Unique snapshot request id.
      • snapshotName

        public String snapshotName()
        Returns:
        Snapshot name.
      • consistentId

        public String consistentId()
        Returns:
        Consistent id of a node to which this metadata relates.
      • folderName

        public String folderName()
        Returns:
        Directory name which stores the data files.
      • compressPartitions

        public boolean compressPartitions()
        Returns:
        true if compress partition files.
      • pageSize

        public int pageSize()
        Returns:
        Page size of stored snapshot data.
      • cacheGroupIds

        public List<Integer> cacheGroupIds()
        Returns:
        The list of cache group IDs which were included into the snapshot globally.
      • baselineNodes

        public Set<String> baselineNodes()
        Returns:
        The set of affected by snapshot baseline nodes.
      • partitions

        public Map<Integer,​Set<Integer>> partitions()
        Returns:
        Map of cache group partitions from which snapshot has been taken on the local node (which is actually saved on the local node because some of them may be skipped due to cache node filter).
      • isGroupWithCompression

        public boolean isGroupWithCompression​(int grpId)
      • hasCompressedGroups

        public boolean hasCompressedGroups()
      • onlyPrimary

        public boolean onlyPrimary()
        Returns:
        If true snapshot only primary copies of partitions.
      • dump

        public boolean dump()
        Returns:
        If true then metadata describes cache dump.
      • snapshotTime

        public long snapshotTime()
        Returns:
        Creation timestamp in milliseconds since Unix epoch.
      • sameSnapshot

        public boolean sameSnapshot​(SnapshotMetadata compare)
        Parameters:
        compare - Snapshot metadata to compare.
        Returns:
        true if given metadata belongs to the same snapshot.
      • masterKeyDigest

        public byte[] masterKeyDigest()
        Returns:
        Master key digest for encrypted caches.
      • encryptionKey

        public byte[] encryptionKey()
        Returns:
        Encryption key.
      • warnings

        public void warnings​(List<String> warnings)
        Parameters:
        warnings - Snapshot creation warnings.
      • warnings

        public List<String> warnings()
        Returns:
        Snapshot creation warnings.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object