docs: final void restoreState(final Persistable tuple) throws SevereMessageStoreException
      {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              SibTr.entry(this, tc, "restoreState", tuple);
  
          PersistentTranId xid = tuple.getPersistentTranId();
          boolean logicallyDeleted = tuple.isLogicallyDeleted();
          PersistentTransaction transaction = null;
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
              SibTr.debug(this, tc, "xid = " + xid + "; logicallyDeleted = " + logicallyDeleted);
  
          if (xid != null)
          {
              transaction = getMessageStoreImpl().getXidManager().getTransactionFromTranId(xid);
          }
          if (null == transaction)
          {
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                  SibTr.debug(this, tc, "no transaction so tuple is not in doubt ");
  
              // We get here if transaction is null - either XID is null (a rolled
              // back transaction has reset the row to its original state) or XID
              // is not null, but no transaction was found (a completed transaction)
              if (logicallyDeleted)
              {
                  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                      SibTr.debug(this, tc, "tuple is logically deleted - removing link");
              }
              else
              {
                  boolean canExpireSilently = false /* tuple.canExpireSilently() */;
                  boolean expired = false /* tuple.isExpired() */;
                  if (expired && canExpireSilently)
                  {
                      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                          SibTr.debug(this, tc, "tuple is expired and can expire silently - removing link");
                  }
                  else
                  {
                      // The itemLink is AVAILABLE or LOCKED
                      long lockID = tuple.getLockID();
                      if (AbstractItem.NO_LOCK_ID != lockID)
                      {
                          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                              SibTr.debug(this, tc, "tuple is locked. LockID = " + lockID);
  
                          _restoreStatePersistentlyLocked(this, _owningStreamLink, lockID);
                          _owningStreamLink.append(this);
                      }
                      else
                      {
                          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                              SibTr.debug(this, tc, "tuple is not locked");
  
                          /*
                           * If the deliverydelaytime is greater than the current time during reconstitution then
                           * the item has to be added as locked.And it must be locked using DELIVERY_DELAY_LOCK_ID
                           * lock ID
                           * In the other case we just add the item as available so that it is available for
                           * consumption
                           */
                          if (tuple.getDeliveryDelayTime() > System.currentTimeMillis()) {
                              _restoreStateLocked(this, _owningStreamLink, Item.DELIVERY_DELAY_LOCK_ID);
                              // Register with the DeliveryDelayManager
                              registerWithDeliveryDelayManager();
                          }
                          else {
                              _restoreStateAvailable(this, _owningStreamLink);
                          }
                          _owningStreamLink.append(this);
                      }
                      //Only register with expirer when we are in available or locked state. The other
                      // states will register when either the commit call comes in, or don't require
                      // expiry as the item is already deleted.
                      registerWithExpirer();
  
                  }
              }
          }
          else
          {
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                  SibTr.debug(this, tc, "Tuple is in doubt. transaction = " + transaction);
  
              Task task = null;
              if (logicallyDeleted)
              {
                  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                      SibTr.debug(this, tc, "tuple is logically deleted - tuple is deleting");
  
                  //Instantiate the itemLink as REMOVING
                  long lockID = tuple.getLockID();
                  if (AbstractItem.NO_LOCK_ID != lockID)
                  {
                      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                          SibTr.debug(this, tc, "tuple is 'removingLocked'. lockID = " + lockID);
  
                      _restoreStateRemovingPersistentlyLocked(this, _owningStreamLink, getLockID(), transaction);
                      _owningStreamLink.append(this);
                      task = new RemoveLockedTask(this);
                      //D184032
                  }
                  else
                  {
                      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                          SibTr.debug(this, tc, "tuple is not locked");
  
                      _restoreStateRemovingNoLock(this, _owningStreamLink, transaction);
                      _owningStreamLink.append(this);
                      task = new RemoveTask(this);
                      //D184032
                  }
              }
              else
              {
                  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                      SibTr.debug(this, tc, "tuple is not logicallyDeleted, so is adding");
  
                  /*
                   * If the deliverydelaytime is greater than the current time during reconstitution then
                   * the item has to be added as locked.And it must be locked using DELIVERY_DELAY_LOCK_ID
                   * lock ID
                   * In the other case we just add the item as available so that it is available for
                   * consumption
                   */
                  if (tuple.getDeliveryDelayTime() > System.currentTimeMillis()) {
                      _restoreStateLocked(this, _owningStreamLink, Item.DELIVERY_DELAY_LOCK_ID);
                      //Not adding to deliverydelay manager here because it will be done in AddTask.commitExternal
                  } else {
                      //Instantiate the itemLink as ADDING
                      _restoreStateAdding(this, _owningStreamLink, transaction);
                  }
                  _owningStreamLink.append(this);
                  task = new AddTask(this);
                  //D184032
              }
              try
              {
                  transaction.addWork(task);
                  ((TaskList) transaction.getWorkList()).declareAlreadyPrecommitted();
              } catch (MessageStoreException e)
              {
                  com.ibm.ws.ffdc.FFDCFilter.processException(e, "com.ibm.ws.sib.msgstore.cache.links.AbstractItemLink.restoreState", "1:3526:1.241", this);
                  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                      SibTr.debug(this, tc, "Exception " + e + " while adding task to tasklist");
                  if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                      SibTr.exit(this, tc, "restoreState");
                  throw new SevereMessageStoreException("SIMS_NNNN", e);
              }
          }
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              SibTr.exit(this, tc, "restoreState");
      }