public String toHexString() { return toHexString(':'); }
public String toHexString(char separator) { StringBuilder b = new StringBuilder(); toHexString(b, separator); return b.toString(); }
public String toString() { StringBuilder b = new StringBuilder(); b.append("XID ["); toHexString(b, ':'); b.append(']'); return b.toString(); } }
/** * Creates a XA recovery registry for a transaction. This method assumes that there is no file already * existing for this transaction, and, furthermore, it is not thread safe (the creation of this object is * already thread protected at the caller). * * @param xid the transaction xid * @throws SystemException if the there was a problem when creating the recovery file in file system */ XAResourceRegistryFile(Xid xid) throws SystemException { xaRecoveryPath.toFile().mkdir(); // create dir if non existent final String xidString = SimpleXid.of(xid).toHexString('_'); this.filePath = xaRecoveryPath.resolve(xidString); openFilePaths.add(xidString); try { fileChannel = FileChannel.open(filePath, StandardOpenOption.APPEND, StandardOpenOption.CREATE_NEW); fileChannel.lock(); Log.log.xaResourceRecoveryFileCreated(filePath); } catch (IOException e) { throw Log.log.createXAResourceRecoveryFileFailed(filePath, e); } }
public String toHexString() { return toHexString(':'); }
public String toHexString() { return toHexString(':'); }
public String toHexString(char separator) { StringBuilder b = new StringBuilder(); toHexString(b, separator); return b.toString(); }
public String toHexString(char separator) { StringBuilder b = new StringBuilder(); toHexString(b, separator); return b.toString(); }
public String toString() { StringBuilder b = new StringBuilder(); b.append("XID ["); toHexString(b, ':'); b.append(']'); return b.toString(); } }
public String toString() { StringBuilder b = new StringBuilder(); b.append("XID ["); toHexString(b, ':'); b.append(']'); return b.toString(); } }
/** * Creates a XA recovery registry for a transaction. This method assumes that there is no file already * existing for this transaction, and, furthermore, it is not thread safe (the creation of this object is * already thread protected at the caller). * * @param xid the transaction xid * @throws SystemException if the there was a problem when creating the recovery file in file system */ XAResourceRegistryFile(Xid xid) throws SystemException { xaRecoveryPath.toFile().mkdir(); // create dir if non existent final String xidString = SimpleXid.of(xid).toHexString('_'); this.filePath = xaRecoveryPath.resolve(xidString); openFilePaths.add(xidString); try { fileChannel = FileChannel.open(filePath, StandardOpenOption.APPEND, StandardOpenOption.CREATE_NEW); fileChannel.lock(); Log.log.xaResourceRecoveryFileCreated(filePath); } catch (IOException e) { throw Log.log.createXAResourceRecoveryFileFailed(filePath, e); } }
/** * Creates a XA recovery registry for a transaction. This method assumes that there is no file already * existing for this transaction, and, furthermore, it is not thread safe (the creation of this object is * already thread protected at the caller). * * @param xid the transaction xid * @throws SystemException if the there was a problem when creating the recovery file in file system */ XAResourceRegistryFile(Xid xid) throws SystemException { xaRecoveryPath.toFile().mkdir(); // create dir if non existent final String xidString = SimpleXid.of(xid).toHexString('_'); this.filePath = xaRecoveryPath.resolve(xidString); openFilePaths.add(xidString); try { fileChannel = FileChannel.open(filePath, StandardOpenOption.APPEND, StandardOpenOption.CREATE_NEW); fileChannel.lock(); Log.log.xaResourceRecoveryFileCreated(filePath); } catch (IOException e) { throw Log.log.createXAResourceRecoveryFileFailed(filePath, e); } }