com.arjuna.ats.internal.arjuna.Header.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(8.8k)|赞(0)|评价(0)|浏览(115)

本文整理了Java中com.arjuna.ats.internal.arjuna.Header.<init>()方法的一些代码示例,展示了Header.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Header.<init>()方法的具体详情如下:
包路径:com.arjuna.ats.internal.arjuna.Header
类名称:Header
方法名:<init>

Header.<init>介绍

暂无

代码示例

代码示例来源:origin: jboss.jbossts/jbossjts

/**
 * 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));
}

代码示例来源:origin: jboss.jbossts/jbossjts

/**
 * 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(get_uid(), _originalProcessUid));
}

代码示例来源:origin: org.jboss.narayana.jts/narayana-jts-idlj

/**
 * 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(get_uid(), _originalProcessUid));
}

代码示例来源:origin: org.jboss.narayana.jts/narayana-jts-idlj

/**
 * 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));
}

代码示例来源:origin: org.jboss.narayana.jts/narayana-jts-idlj

/**
 * 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(get_uid(), _originalProcessUid));
}

代码示例来源:origin: org.jboss.jbossts.jta/narayana-jta

public RecoverConnectableAtomicAction(String type, Uid rcvUid, InputObjectState os)
    throws ObjectStoreException, IOException {
  super(rcvUid);
  this.recoveringAs = type;
  
  // Unpack BasicAction::save_state preamble
  Header hdr = new Header();
  unpackHeader(os, hdr);
  os.unpackBoolean(); // FYI pastFirstParticipant
  // Take a look at the first record type
  int record_type = os.unpackInt();
  if (record_type == RecordType.COMMITMARKABLERESOURCE) {
    // Its one we are interested in
    jndiName = os.unpackString();
    xid = XidImple.unpack(os);
    hasCompleted = os.unpackBoolean();
  }
}

代码示例来源:origin: org.jboss.narayana.jta/jta

public boolean restore_state (InputObjectState os, int t)
{
  _theXid = null;
  
  try
  {
    unpackHeader(os, new Header());
    boolean haveXid = os.unpackBoolean();
    
    if (haveXid)
    {
      _theXid = new XidImple();
      
      ((XidImple) _theXid).unpackFrom(os);
      _parentNodeName = os.unpackString();
    }
  }
  catch (IOException ex)
  {
    return false;
  }
  
  return super.restore_state(os, t);
}

代码示例来源:origin: org.jboss.narayana.jts/narayana-jts-idlj

public boolean restore_state (InputObjectState os, int t)
{
  _theXid = null;
  
  try
  {
    unpackHeader(os, new Header());
    boolean haveXid = os.unpackBoolean();
    
    if (haveXid)
    {
      _theXid = new XidImple();
      
      ((XidImple) _theXid).unpackFrom(os);
      _parentNodeName = os.unpackString();
    }
  }
  catch (IOException ex)
  {
    return false;
  }
  
  return super.restore_state(os, t);
}

代码示例来源:origin: jbosstm/narayana

public boolean restore_state (InputObjectState os, int t)
{
  _theXid = null;
  
  try
  {
    unpackHeader(os, new Header());
    boolean haveXid = os.unpackBoolean();
    
    if (haveXid)
    {
      _theXid = new XidImple();
      
      ((XidImple) _theXid).unpackFrom(os);
      _parentNodeName = os.unpackString();
    }
  }
  catch (IOException ex)
  {
    return false;
  }
  
  return super.restore_state(os, t);
}

代码示例来源:origin: jbosstm/narayana

public boolean restore_state (InputObjectState os, int t)
{
  _theXid = null;
  
  try
  {
    unpackHeader(os, new Header());
    boolean haveXid = os.unpackBoolean();
    
    if (haveXid)
    {
      _theXid = new XidImple();
      
      ((XidImple) _theXid).unpackFrom(os);
      _parentNodeName = os.unpackString();
    }
  }
  catch (IOException ex)
  {
    return false;
  }
  
  return super.restore_state(os, t);
}

代码示例来源:origin: org.jboss.jbossts/jbossjta

public boolean restore_state (InputObjectState os, int t)
{
  _theXid = null;
  
  try
  {
    unpackHeader(os, new Header());
    boolean haveXid = os.unpackBoolean();
    
    if (haveXid)
    {
      _theXid = new XidImple();
      
      ((XidImple) _theXid).unpackFrom(os);
      _parentNodeName = os.unpackString();
    }
  }
  catch (IOException ex)
  {
    return false;
  }
  
  return super.restore_state(os, t);
}

代码示例来源:origin: org.jboss.jbossts.jta/narayana-jta

public boolean restore_state (InputObjectState os, int t)
{
  _theXid = null;
  
  try
  {
    unpackHeader(os, new Header());
    boolean haveXid = os.unpackBoolean();
    
    if (haveXid)
    {
      _theXid = new XidImple();
      
      ((XidImple) _theXid).unpackFrom(os);
      _parentNodeName = os.unpackString();
    }
  }
  catch (IOException ex)
  {
    return false;
  }
  
  return super.restore_state(os, t);
}

代码示例来源:origin: org.jboss.narayana.jta/jta

public RecoverConnectableAtomicAction(String type, Uid rcvUid, InputObjectState os)
    throws ObjectStoreException, IOException {
  super(rcvUid);
  this.recoveringAs = type;
  
  // Unpack BasicAction::save_state preamble
  Header hdr = new Header();
  unpackHeader(os, hdr);
  os.unpackBoolean(); // FYI pastFirstParticipant
  // Take a look at the first record type
  int record_type = os.unpackInt();
  if (record_type == RecordType.COMMITMARKABLERESOURCE) {
    // Its one we are interested in
    jndiName = os.unpackString();
    xid = XidImple.unpack(os);
    hasCompleted = os.unpackBoolean();
    if (hasCompleted) {
      wasCommitted = os.unpackBoolean();
    }
  }
}

代码示例来源:origin: org.jboss.narayana.jts/narayana-jts-idlj

public RecoverConnectableAtomicAction(String type, Uid rcvUid, InputObjectState os)
    throws ObjectStoreException, IOException {
  super(rcvUid);
  this.recoveringAs = type;
  
  // Unpack BasicAction::save_state preamble
  Header hdr = new Header();
  unpackHeader(os, hdr);
  os.unpackBoolean(); // FYI pastFirstParticipant
  // Take a look at the first record type
  int record_type = os.unpackInt();
  if (record_type == RecordType.COMMITMARKABLERESOURCE) {
    // Its one we are interested in
    jndiName = os.unpackString();
    xid = XidImple.unpack(os);
    hasCompleted = os.unpackBoolean();
    if (hasCompleted) {
      wasCommitted = os.unpackBoolean();
    }
  }
}

代码示例来源:origin: jbosstm/narayana

public RecoverConnectableAtomicAction(String type, Uid rcvUid, InputObjectState os)
    throws ObjectStoreException, IOException {
  super(rcvUid);
  this.recoveringAs = type;
  
  // Unpack BasicAction::save_state preamble
  Header hdr = new Header();
  unpackHeader(os, hdr);
  os.unpackBoolean(); // FYI pastFirstParticipant
  // Take a look at the first record type
  int record_type = os.unpackInt();
  if (record_type == RecordType.COMMITMARKABLERESOURCE) {
    // Its one we are interested in
    jndiName = os.unpackString();
    xid = XidImple.unpack(os);
    hasCompleted = os.unpackBoolean();
    if (hasCompleted) {
      wasCommitted = os.unpackBoolean();
    }
  }
}

代码示例来源:origin: jbosstm/narayana

public RecoverConnectableAtomicAction(String type, Uid rcvUid, InputObjectState os)
    throws ObjectStoreException, IOException {
  super(rcvUid);
  this.recoveringAs = type;
  
  // Unpack BasicAction::save_state preamble
  Header hdr = new Header();
  unpackHeader(os, hdr);
  os.unpackBoolean(); // FYI pastFirstParticipant
  // Take a look at the first record type
  int record_type = os.unpackInt();
  if (record_type == RecordType.COMMITMARKABLERESOURCE) {
    // Its one we are interested in
    jndiName = os.unpackString();
    xid = XidImple.unpack(os);
    hasCompleted = os.unpackBoolean();
    if (hasCompleted) {
      wasCommitted = os.unpackBoolean();
    }
  }
}

代码示例来源:origin: org.jboss.jbossts.jta/narayana-jta

public boolean save_state (OutputObjectState os, int t)
{
  try
  {
    // pack the header first for the benefit of the tooling
    packHeader(os, new Header(get_uid(), Utility.getProcessUid()));
    if (_theXid != null)
    {
      os.packBoolean(true);
      ((XidImple) _theXid).packInto(os);
      os.packString(_parentNodeName);
    }
    else
      os.packBoolean(false);
  }
  catch (IOException ex)
  {
    return false;
  }
  return super.save_state(os, t);
}

代码示例来源:origin: org.jboss.jbossts/jbossjta

public SubordinateAtomicAction(Uid actId, boolean peekXidOnly) throws ObjectStoreException, IOException {
  super(actId);
  if (peekXidOnly) {
    InputObjectState os = StoreManager.getParticipantStore().read_committed(objectUid, type());
    unpackHeader(os, new Header());
    boolean haveXid = os.unpackBoolean();
    if (haveXid) {
      _theXid = new XidImple();
      ((XidImple) _theXid).unpackFrom(os);
      _parentNodeName = os.unpackString();
    }
  } else {
    _activated = activate();
  }
}

代码示例来源:origin: org.jboss.narayana.jta/jta

public boolean save_state (OutputObjectState os, int t)
{
  try
  {
    // pack the header first for the benefit of the tooling
    packHeader(os, new Header(get_uid(), Utility.getProcessUid()));
    if (_theXid != null)
    {
      os.packBoolean(true);
      ((XidImple) _theXid).packInto(os);
      os.packString(_parentNodeName);
    }
    else
      os.packBoolean(false);
  }
  catch (IOException ex)
  {
    return false;
  }
  return super.save_state(os, t);
}

代码示例来源:origin: org.jboss.narayana.jts/narayana-jts-idlj

public boolean save_state (OutputObjectState os, int t)
{
  try
  {
    // pack the header first for the benefit of the tooling
    packHeader(os, new Header(get_uid(), Utility.getProcessUid()));
    if (_theXid != null)
    {
      os.packBoolean(true);
      ((XidImple) _theXid).packInto(os);
      os.packString(_parentNodeName);
    }
    else
      os.packBoolean(false);
  }
  catch (IOException ex)
  {
    return false;
  }
  return super.save_state(os, t);
}

相关文章