docs: public Token removeFirst(Transaction transaction)
                      throws ObjectManagerException {
          final String methodName = "removeFirst";
          if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
              trace.entry(this, cclass, methodName, new Object[] { transaction });
  
          Link first;
          Token tokenToReturn;
          // Prevent a clash with a backing out transaction.
          synchronized (transaction.internalTransaction) {
              //TODO Having locked on the Internal transaction we should check that this still refers back to the
              //TODO callers external transaction.
              synchronized (this) {
                  first = nextLink(null,
                                   transaction,
                                   getTransactionUnlockSequence());
                  if (first == null) { // Is there a first element?
                      if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
                          trace.exit(this, cclass, methodName, "via java.util.NoSuchElementException");
                      throw new java.util.NoSuchElementException();
                  } // (first == null).
  
                  // Assign the tokenToReturn while we have the list locked so that the ObjectManager 
                  // cannot backout this transaction and remove the link under another transaction 
                  // causing this thread to see a null Token as a return value.
                  tokenToReturn = first.data;
  
                  first.requestDelete(transaction); // Mark for deletion. 
  
                  // If the link is available to all adjust list visible length available.
                  // In the case where we delete a link added by the same transaction we have no incremented 
                  // the available size yet because we have not yet committed so we would not decrement it.
                  if (!first.isLocked())
                      decrementAvailableSize();
              } // synchronized (this).
  
              // We can release the synchronize lock on the list because we don't care if the
              // link which we are going to delete is changed before we write the log record.
              // Log what we intend to do. Reserve enough spare log space so that the eventual
              // optimistic replace that removes the link from the list is certain to succeed
              // in being written as well. 
  
              try {
                  transaction.delete(first,
                                     logSpaceForDelete());
              } catch (LogFileFullException exception) {
                  // No FFDC Code Needed, transaction.delete() has already done this.
                  unRemove(first);
                  if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
                      trace.exit(this, cclass, methodName, exception);
                  throw exception;
  
                  // We should not see ObjectStoreFullException because the ObjectStore already 
                  // holds sufficient space to guarantee deletes work.
  //      } catch (ObjectStoreFullException exception) {
  //        // No FFDC Code Needed, transaction.delete() has already done this.
  //        unRemove(first);
  //        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
  //        trace.exit(this, cclass, methodName, exception);
  //        throw exception;
  
              } catch (InvalidStateException exception) {
                  // No FFDC Code Needed.
                  ObjectManager.ffdc.processException(this,
                                                      cclass,
                                                      methodName,
                                                      exception,
                                                      "1:698:1.40");
                  unRemove(first);
                  if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
                      trace.exit(this, cclass, methodName, exception);
                  throw exception;
              } // catch (LogFileFullException exception).
          } // synchronized (transaction.internalTransaction).
  
          if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
              trace.exit(this, cclass, methodName, new Object[] { tokenToReturn });
          return tokenToReturn;
      }