Class SnapshotMetadata
- java.lang.Object
-
- org.apache.ignite.internal.processors.cache.persistence.snapshot.SnapshotMetadata
-
- All Implemented Interfaces:
Serializable
public class SnapshotMetadata extends Object implements Serializable
Snapshot metadata file.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description 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 WALPointer snpRecPtr, @org.jetbrains.annotations.Nullable byte[] masterKeyDigest, boolean onlyPrimary, boolean dump, @org.jetbrains.annotations.Nullable byte[] encKey)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<String>baselineNodes()List<Integer>cacheGroupIds()booleancompressPartitions()StringconsistentId()booleandump()byte[]encryptionKey()booleanequals(Object o)StringfolderName()booleanhasCompressedGroups()inthashCode()booleanisGroupWithCompression(int grpId)byte[]masterKeyDigest()booleanonlyPrimary()intpageSize()Map<Integer,Set<Integer>>partitions()UUIDrequestId()booleansameSnapshot(SnapshotMetadata compare)StringsnapshotName()@Nullable WALPointersnapshotRecordPointer()longsnapshotTime()StringtoString()List<String>warnings()voidwarnings(List<String> warnings)
-
-
-
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- Iftruethen 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 toClusterSnapshotRecordif exists.masterKeyDigest- Master key digest for encrypted caches.snapshotTime- of the snapshot creation.onlyPrimary- Iftruesnapshot only primary copies of partitions.dump- Iftruecache 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:
trueif 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()
-
snapshotRecordPointer
@Nullable public @Nullable WALPointer snapshotRecordPointer()
- Returns:
- WAL pointer to
ClusterSnapshotRecordif exists.
-
onlyPrimary
public boolean onlyPrimary()
- Returns:
- If
truesnapshot only primary copies of partitions.
-
dump
public boolean dump()
- Returns:
- If
truethen 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:
trueif 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.
-
-