Here you can find the source of getRedisKey(String keyPrefix, Xid xid)
public static byte[] getRedisKey(String keyPrefix, Xid xid)
//package com.java2s; //License from project: Apache License import javax.transaction.xa.Xid; public class Main { public static byte[] getRedisKey(String keyPrefix, Xid xid) { byte[] prefix = keyPrefix.getBytes(); byte[] globalTransactionId = xid.getGlobalTransactionId(); byte[] branchQualifier = xid.getBranchQualifier(); byte[] key = new byte[prefix.length + globalTransactionId.length + branchQualifier.length]; System.arraycopy(prefix, 0, key, 0, prefix.length); System.arraycopy(globalTransactionId, 0, key, prefix.length, globalTransactionId.length); System.arraycopy(branchQualifier, 0, key, prefix.length + globalTransactionId.length, branchQualifier.length); return key; }//ww w . j av a 2 s . com }