java.lang.Object
org.gridgain.internal.dcr.metastorage.DcrKey

public final class DcrKey extends Object
Utility class for replication storage keys.
  • Method Details

    • toKey

      public static org.apache.ignite.internal.lang.ByteArray toKey(String name)
      Transforms replication identifier to key byte array.
      Parameters:
      name - Replication name.
      Returns:
      Replication identifier in byte array format.
    • fromByteArr

      public static String fromByteArr(byte[] arr)
      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

      public static org.apache.ignite.internal.lang.ByteArray watermarkKey(String name, String tableName)
      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

      public static org.apache.ignite.internal.lang.ByteArray watermarkPrefix(String name)
      Prefix that covers every per-table watermark key for a given replication.
    • tableNameFromWatermarkKey

      public static String tableNameFromWatermarkKey(byte[] keyBytes, String name)
      Extracts the table name from a watermark key produced by watermarkKey(java.lang.String, java.lang.String).
      Parameters:
      keyBytes - Raw key bytes.
      name - Replication name (caller-known so we can locate the trailing table segment).