Class DcrKey
java.lang.Object
org.gridgain.internal.dcr.metastorage.DcrKey
Utility class for replication storage keys.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringfromByteArr(byte[] arr) Transforms byte array to replication identifier.static org.apache.ignite.internal.lang.ByteArrayprefix()All replication-entry keys prefix.static StringtableNameFromWatermarkKey(byte[] keyBytes, String name) Extracts the table name from a watermark key produced bywatermarkKey(java.lang.String, java.lang.String).static org.apache.ignite.internal.lang.ByteArrayTransforms replication identifier to key byte array.static org.apache.ignite.internal.lang.ByteArraywatermarkKey(String name, String tableName) Builds the metastorage key for the saved CQ watermark of one table inside a replication.static org.apache.ignite.internal.lang.ByteArraywatermarkPrefix(String name) Prefix that covers every per-table watermark key for a given replication.
-
Method Details
-
toKey
Transforms replication identifier to key byte array.- Parameters:
name- Replication name.- Returns:
- Replication identifier in byte array format.
-
fromByteArr
Transforms byte array to replication identifier.- Parameters:
arr- Byte array.- Returns:
- Replication identifier.
-
prefix
public static org.apache.ignite.internal.lang.ByteArray prefix()All replication-entry keys prefix.- Returns:
- Prefix for all replication-entry keys.
-
watermarkKey
Builds the metastorage key for the saved CQ watermark of one table inside a replication.- Parameters:
name- Replication name.tableName- Fully-qualified table name (e.g.PUBLIC.MY_TABLE).
-
watermarkPrefix
Prefix that covers every per-table watermark key for a given replication. -
tableNameFromWatermarkKey
Extracts the table name from a watermark key produced bywatermarkKey(java.lang.String, java.lang.String).- Parameters:
keyBytes- Raw key bytes.name- Replication name (caller-known so we can locate the trailing table segment).
-