Package org.gridgain.internal.dr
Class DrUtils
java.lang.Object
org.gridgain.internal.dr.DrUtils
Utility class.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longDefault tombstone TTL.static final ByteOrderDR protocol byte order.static final StringVersion of external DR protocol.static final org.apache.ignite.table.QualifiedNameDefault table name for DR tombstones.static final byte[]Network packet header.static final byte[]Cached serialized ping request.static final byte[]Cached serialized ping response.static final StringTombstone table key column name.static final StringTombstone table TTL column name.static final StringTombstone table version column name.static final byteExternal message type: batch request.static final byteExternal message type: batch response.static final byteExternal message type: handshake request.static final byteExternal message type: handshake response.static final byteExternal message type: metadata request.static final byteExternal message type: metadata response.static final byteExternal message type: ping request.static final byteExternal message type: ping response. -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.ignite.table.TuplecreateTombstoneKey(String tableName, DrUpdate row) Creates tombstone key.static byte @Nullable []Reads byte array from input stream accounting fornullvalues.static GridCacheRawVersionedEntryreadDrEntry(byte dataCenterId, DataInput in) Read marshaled DR entry.static InetAddresstoInetAddress(String hostStr) Parse host string intoInetAddress.static List<GridCacheRawVersionedEntry>Unmarshal and returns entries from the request.static @Nullable GridCacheVersionunmarshalVersion(byte @Nullable [] value) Unmarshals version object.static voidwriteByteArray(DataOutput out, byte @Nullable [] arr) Writes byte array to output stream accounting fornullvalues.
-
Field Details
-
DR_PROTO_VER
Version of external DR protocol.- See Also:
-
DR_BYTE_ORDER
DR protocol byte order. -
MAGIC_BYTES
public static final byte[] MAGIC_BYTESNetwork packet header. -
TYP_HND_REQ
public static final byte TYP_HND_REQExternal message type: handshake request.- See Also:
-
TYP_HND_RESP
public static final byte TYP_HND_RESPExternal message type: handshake response.- See Also:
-
TYP_PING_REQ
public static final byte TYP_PING_REQExternal message type: ping request.- See Also:
-
TYP_PING_RESP
public static final byte TYP_PING_RESPExternal message type: ping response.- See Also:
-
TYP_BATCH_REQ
public static final byte TYP_BATCH_REQExternal message type: batch request.- See Also:
-
TYP_BATCH_RESP
public static final byte TYP_BATCH_RESPExternal message type: batch response.- See Also:
-
TYP_META_REQ
public static final byte TYP_META_REQExternal message type: metadata request.- See Also:
-
TYP_META_RESP
public static final byte TYP_META_RESPExternal message type: metadata response.- See Also:
-
PING_REQ_BYTES
public static final byte[] PING_REQ_BYTESCached serialized ping request. -
PING_RESP_BYTES
public static final byte[] PING_RESP_BYTESCached serialized ping response. -
DR_TOMBSTONES_TABLE_NAME
public static final org.apache.ignite.table.QualifiedName DR_TOMBSTONES_TABLE_NAMEDefault table name for DR tombstones. -
TOMBSTONES_KEY_COLUMN_NAME
Tombstone table key column name.- See Also:
-
TOMBSTONES_VERSION_COLUMN_NAME
Tombstone table version column name.- See Also:
-
TOMBSTONES_TTL_COLUMN_NAME
Tombstone table TTL column name.- See Also:
-
DEFAULT_TOMBSTONE_TTL
public static final long DEFAULT_TOMBSTONE_TTLDefault tombstone TTL. Using GG-8 default - 30 minutes.- See Also:
-
-
Method Details
-
toInetAddress
Parse host string intoInetAddress. -
unmarshalEntries
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
Reads byte array from input stream accounting fornullvalues.- Parameters:
in- Stream to read from.- Returns:
- Read byte array, possibly
null. - Throws:
IOException- If read failed.
-
writeByteArray
Writes byte array to output stream accounting fornullvalues.- Parameters:
out- Output stream to write to.arr- Array to write, possiblynull.- Throws:
IOException- If write failed.
-
unmarshalVersion
Unmarshals version object. -
createTombstoneKey
Creates tombstone key.
-