Class DrUtils

java.lang.Object
org.gridgain.internal.dr.DrUtils

public final class DrUtils extends Object
Utility class.
  • Field Details

    • DR_PROTO_VER

      public static final String DR_PROTO_VER
      Version of external DR protocol.
      See Also:
    • DR_BYTE_ORDER

      public static final ByteOrder DR_BYTE_ORDER
      DR protocol byte order.
    • MAGIC_BYTES

      public static final byte[] MAGIC_BYTES
      Network packet header.
    • TYP_HND_REQ

      public static final byte TYP_HND_REQ
      External message type: handshake request.
      See Also:
    • TYP_HND_RESP

      public static final byte TYP_HND_RESP
      External message type: handshake response.
      See Also:
    • TYP_PING_REQ

      public static final byte TYP_PING_REQ
      External message type: ping request.
      See Also:
    • TYP_PING_RESP

      public static final byte TYP_PING_RESP
      External message type: ping response.
      See Also:
    • TYP_BATCH_REQ

      public static final byte TYP_BATCH_REQ
      External message type: batch request.
      See Also:
    • TYP_BATCH_RESP

      public static final byte TYP_BATCH_RESP
      External message type: batch response.
      See Also:
    • TYP_META_REQ

      public static final byte TYP_META_REQ
      External message type: metadata request.
      See Also:
    • TYP_META_RESP

      public static final byte TYP_META_RESP
      External message type: metadata response.
      See Also:
    • PING_REQ_BYTES

      public static final byte[] PING_REQ_BYTES
      Cached serialized ping request.
    • PING_RESP_BYTES

      public static final byte[] PING_RESP_BYTES
      Cached serialized ping response.
    • DR_TOMBSTONES_TABLE_NAME

      public static final org.apache.ignite.table.QualifiedName DR_TOMBSTONES_TABLE_NAME
      Default table name for DR tombstones.
    • TOMBSTONES_KEY_COLUMN_NAME

      public static final String TOMBSTONES_KEY_COLUMN_NAME
      Tombstone table key column name.
      See Also:
    • TOMBSTONES_VERSION_COLUMN_NAME

      public static final String TOMBSTONES_VERSION_COLUMN_NAME
      Tombstone table version column name.
      See Also:
    • TOMBSTONES_TTL_COLUMN_NAME

      public static final String TOMBSTONES_TTL_COLUMN_NAME
      Tombstone table TTL column name.
      See Also:
    • DEFAULT_TOMBSTONE_TTL

      public static final long DEFAULT_TOMBSTONE_TTL
      Default tombstone TTL. Using GG-8 default - 30 minutes.
      See Also:
  • Method Details

    • toInetAddress

      public static InetAddress toInetAddress(String hostStr)
      Parse host string into InetAddress.
    • unmarshalEntries

      public static List<GridCacheRawVersionedEntry> unmarshalEntries(DrExternalBatchRequest req)
      Unmarshal and returns entries from the request.
    • readDrEntry

      public static GridCacheRawVersionedEntry readDrEntry(byte dataCenterId, DataInput in) throws IOException
      Read marshaled DR entry.
      Throws:
      IOException
    • readByteArray

      public static byte @Nullable [] readByteArray(DataInput in) throws IOException
      Reads byte array from input stream accounting for null values.
      Parameters:
      in - Stream to read from.
      Returns:
      Read byte array, possibly null.
      Throws:
      IOException - If read failed.
    • writeByteArray

      public static void writeByteArray(DataOutput out, byte @Nullable [] arr) throws IOException
      Writes byte array to output stream accounting for null values.
      Parameters:
      out - Output stream to write to.
      arr - Array to write, possibly null.
      Throws:
      IOException - If write failed.
    • unmarshalVersion

      @Nullable public static @Nullable GridCacheVersion unmarshalVersion(byte @Nullable [] value)
      Unmarshals version object.