public static void setEisName(XID theXid, Integer eisName) { if (theXid == null || !FormatConstants.isNarayanaFormatId(theXid.formatID)) { return; } if (eisName == null) { eisName = 0; } int offset = theXid.gtrid_length + Uid.UID_SIZE; theXid.data[offset + 0] = (byte) (eisName >>> 24); theXid.data[offset + 1] = (byte) (eisName >>> 16); theXid.data[offset + 2] = (byte) (eisName >>> 8); theXid.data[offset + 3] = (byte) (eisName >>> 0); }
/** * Override StateManager packHeader so it gets the original processUid, not * this process's * * @since JTS 2.1. */ protected void packHeader (OutputObjectState os, Header hdr) throws IOException { /* * If there is a transaction present than pack the process Uid of this * JVM and the tx id. Otherwise pack a null Uid. */ super.packHeader(os, new Header(hdr.getTxId(), _originalProcessUid)); }
/** * Override StateManager's unpackHeader to save the processUid of the * original process * * @since JTS 2.1. */ protected void unpackHeader (InputObjectState os, Header hdr) throws IOException { super.unpackHeader(os, hdr); _originalProcessUid = hdr.getProcessId(); }
/** * Override StateManager packHeader so it gets the original processUid, not * this process's * * @since JTS 2.1. */ protected void packHeader (OutputObjectState os, Header hdr) throws IOException { /* * If there is a transaction present than pack the process Uid of this * JVM and the tx id. Otherwise pack a null Uid. */ super.packHeader(os, new Header(hdr.getTxId(), _originalProcessUid)); }
/** * Override StateManager's unpackHeader to save the processUid of the * original process * * @since JTS 2.1. */ protected void unpackHeader (InputObjectState os, Header hdr) throws IOException { super.unpackHeader(os, hdr); _originalProcessUid = hdr.getProcessId(); }
public static Integer getEISName(XID xid) { if (xid == null || !FormatConstants.isNarayanaFormatId(xid.formatID)) { return -1; } // the node name follows the Uid with no separator, so the only // way to tell where it starts is to figure out how long the Uid is. int offset = xid.gtrid_length + Uid.UID_SIZE; return (xid.data[offset + 0] << 24) + ((xid.data[offset + 1] & 0xFF) << 16) + ((xid.data[offset + 2] & 0xFF) << 8) + (xid.data[offset + 3] & 0xFF); }
public static void setEisName(XID theXid, Integer eisName) { if (theXid == null || !FormatConstants.isNarayanaFormatId(theXid.formatID)) { return; } if (eisName == null) { eisName = 0; } int offset = theXid.gtrid_length + Uid.UID_SIZE; theXid.data[offset + 0] = (byte) (eisName >>> 24); theXid.data[offset + 1] = (byte) (eisName >>> 16); theXid.data[offset + 2] = (byte) (eisName >>> 8); theXid.data[offset + 3] = (byte) (eisName >>> 0); }
public static Integer getEISName(XID xid) { if (xid == null || !FormatConstants.isNarayanaFormatId(xid.formatID)) { return -1; } // the node name follows the Uid with no separator, so the only // way to tell where it starts is to figure out how long the Uid is. int offset = xid.gtrid_length + Uid.UID_SIZE; return (xid.data[offset + 0] << 24) + ((xid.data[offset + 1] & 0xFF) << 16) + ((xid.data[offset + 2] & 0xFF) << 8) + (xid.data[offset + 3] & 0xFF); }
public static Integer getEISName(XID xid) { if (xid == null || !FormatConstants.isNarayanaFormatId(xid.formatID)) { return -1; } // the node name follows the Uid with no separator, so the only // way to tell where it starts is to figure out how long the Uid is. int offset = xid.gtrid_length + Uid.UID_SIZE; return (xid.data[offset + 0] << 24) + ((xid.data[offset + 1] & 0xFF) << 16) + ((xid.data[offset + 2] & 0xFF) << 8) + (xid.data[offset + 3] & 0xFF); }
public static void setEisName(XID theXid, Integer eisName) { if (theXid == null || !FormatConstants.isNarayanaFormatId(theXid.formatID)) { return; } if (eisName == null) { eisName = 0; } int offset = theXid.gtrid_length + Uid.UID_SIZE; theXid.data[offset + 0] = (byte) (eisName >>> 24); theXid.data[offset + 1] = (byte) (eisName >>> 16); theXid.data[offset + 2] = (byte) (eisName >>> 8); theXid.data[offset + 3] = (byte) (eisName >>> 0); }
public static Integer getEISName(XID xid) { if (xid == null || !FormatConstants.isNarayanaFormatId(xid.formatID)) { return -1; } // the node name follows the Uid with no separator, so the only // way to tell where it starts is to figure out how long the Uid is. int offset = xid.gtrid_length + Uid.UID_SIZE; return (xid.data[offset + 0] << 24) + ((xid.data[offset + 1] & 0xFF) << 16) + ((xid.data[offset + 2] & 0xFF) << 8) + (xid.data[offset + 3] & 0xFF); }
public static void setEisName(XID theXid, Integer eisName) { if (theXid == null || !FormatConstants.isNarayanaFormatId(theXid.formatID)) { return; } if (eisName == null) { eisName = 0; } int offset = theXid.gtrid_length + Uid.UID_SIZE; theXid.data[offset + 0] = (byte) (eisName >>> 24); theXid.data[offset + 1] = (byte) (eisName >>> 16); theXid.data[offset + 2] = (byte) (eisName >>> 8); theXid.data[offset + 3] = (byte) (eisName >>> 0); }
public static void setBranchUID(XID xid, Uid uid) { if (xid == null || !FormatConstants.isNarayanaFormatId(xid.formatID)) { return; } byte[] bqual = uid.getBytes(); System.arraycopy(bqual, 0, xid.data, xid.gtrid_length, Uid.UID_SIZE); }
public static void setBranchUID(XID xid, Uid uid) { if (xid == null || !FormatConstants.isNarayanaFormatId(xid.formatID)) { return; } byte[] bqual = uid.getBytes(); System.arraycopy(bqual, 0, xid.data, xid.gtrid_length, Uid.UID_SIZE); }
public static Uid getUid(XID xid) { if (xid == null || !FormatConstants.isNarayanaFormatId(xid.formatID)) { return Uid.nullUid(); } // The Uid byte are the first in the data array, so we just pass // in the whole thing and the additional trailing data is ignored. Uid tx = new Uid(xid.data); return tx; }
public static Uid getUid(XID xid) { if (xid == null || !FormatConstants.isNarayanaFormatId(xid.formatID)) { return Uid.nullUid(); } // The Uid byte are the first in the data array, so we just pass // in the whole thing and the additional trailing data is ignored. Uid tx = new Uid(xid.data); return tx; }
public static Uid getUid(XID xid) { if (xid == null || !FormatConstants.isNarayanaFormatId(xid.formatID)) { return Uid.nullUid(); } // The Uid byte are the first in the data array, so we just pass // in the whole thing and the additional trailing data is ignored. Uid tx = new Uid(xid.data); return tx; }
public static Uid getUid(XID xid) { if (xid == null || !FormatConstants.isNarayanaFormatId(xid.formatID)) { return Uid.nullUid(); } // The Uid byte are the first in the data array, so we just pass // in the whole thing and the additional trailing data is ignored. Uid tx = new Uid(xid.data); return tx; }
public static Uid getBranchUid(XID xid) { if (xid == null || !FormatConstants.isNarayanaFormatId(xid.formatID)) { return Uid.nullUid(); } byte[] bqual = new byte[xid.bqual_length]; System.arraycopy(xid.data, xid.gtrid_length, bqual, 0, xid.bqual_length); // The Uid byte are the first in the data array, so we just pass // in the whole thing and the additional trailing data is ignored. Uid tx = new Uid(bqual); return tx; }
public static Uid getBranchUid(XID xid) { if (xid == null || !FormatConstants.isNarayanaFormatId(xid.formatID)) { return Uid.nullUid(); } byte[] bqual = new byte[xid.bqual_length]; System.arraycopy(xid.data, xid.gtrid_length, bqual, 0, xid.bqual_length); // The Uid byte are the first in the data array, so we just pass // in the whole thing and the additional trailing data is ignored. Uid tx = new Uid(bqual); return tx; }