The cursor is being told that a link has become available. Add it to the list to revisit, but
only if it is older than the current cursor position.

@param link
@throws SevereMessageStoreException
968626
public final void available(AbstractItemLink link) throws SevereMessageStoreException
    {
        if (_jumpbackEnabled)
        {
            final long newPos = link.getPosition();

            // we need to synchronize the read of the position
            // or we can miss out items when reading an empty queue fast.
            // More importantly, the removal of the next from the cursor cannot
            // happen while we are adding the available
            synchronized(this)
            {
                if (newPos <= _highestPosition)
                {
                    // Only store matching links, 'coz its quicker
                    if (null != link.matches(_filter))
                    {
                        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "availableLink adding: " + link);

                        _behindList.insert(link);
                    }
                    else
                    {
                        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "availableLink does not match: " + link);
                    }
                }
                else
                {
                    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "availableLink seq(" + newPos + ") too large (" + _highestPosition + ")");
                }
            }
        }
        else
        {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "available link - jumpbackDisabled: " + link);
        }
    }
1191273
public final synchronized void rollbackIncrementReferenceCount(PersistentTransaction transaction) throws SevereMessageStoreException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "rollbackIncrementReferenceCount");

        if (_referenceCount < 1)
        {
        	SevereMessageStoreException e = new SevereMessageStoreException("Reference count increment cannot be rolled back");
            FFDCFilter.processException(e, "com.ibm.ws.sib.msgstore.cache.links.ItemLink.rollbackIncrementReferenceCount", "1:212:1.104.1.1");
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Reference count increment cannot be rolled back");
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "rollbackIncrementReferenceCount");
            throw e;
        }
        _referenceCount--;

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "rollbackIncrementReferenceCount");
    }
1305168
public void disconnectFromLink(Link link) {
        boolean disconnected = this.linksList.remove(link);
        if (disconnected) {
            link.disconnectDevice(this);
            logger.fine("Device " + this.getID()
                    + " is now disconnected from Link " + link.getID());
        } else {
            logger.warning("Device " + this.getID()
                    + " could not be disconnected from Link " + link.getID()
                    + ", because it was not connected.");
        }
    }
700413
protected function prepareLink(string &$link = null): void
	{
		if ($link !== null) {
			if (Strings::endsWith($link, ':default')) {
				$link = substr($link, 0, -7);
			}
			$pos = strrpos($link, ':');
			if ($pos !== strlen($link)) {
				$link = substr($link, 0, $pos + 1);
			}
		}
	}
634336
@SuppressWarnings("unchecked")
	public T add(Iterable<Link> links) {

		Assert.notNull(links, "Given links must not be null!");

		links.forEach(this::add);

		return (T) this;
	}
1144994
public void addLinkRef(final String key, final LinkRef linkRef)
    {
        this.linkRefs.put(key.toLowerCase(), linkRef);
    }
707972
@SuppressWarnings("unchecked")
  public void addPersistentLinkData(HashMap hm)
  {
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "addPersistentLinkData", hm);

      // For a linkHandler, we store
     // 
     //    * The uuid of the link
     //    * The name of the link
     //    * The busName at the other end of the link
     //
      
     // The uuid of the destination
     hm.put("uuid",_uuid.toByteArray());

     // The name of the destination
     hm.put("name", _name); 
     
     // The name of the bus at the other end of the link
     hm.put("busName", _busName);
     
     // Is the destination localised on the home ME
     hm.put("hasLocal", new Boolean(hasLocal()));
           
     hm.put("type", _type);
     hm.put( "inboundUserid", _inboundUserid);  
     hm.put( "outboundUserid", _outboundUserid);  
     hm.put( "TBD", new Boolean(isToBeDeleted()));       
           
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "addPersistentLinkData");
  }
652166
void undoAdd(Link newLink)
                    throws ObjectManagerException {
        final String methodName = "undoAdd";
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.entry(this, cclass, methodName, new Object[] { newLink });

        // Detach this Link from the list.
        if (newLink.next == null) { // Are we the tail of list?
            tail = newLink.previous;
        } else { // Not tail of the list.
            // Join up the backwards Link.
            Link nextLink = (Link) newLink.next.getManagedObject();
            nextLink.previous = newLink.previous;
        } // if at tail of list.

        if (newLink.previous == null) { // Are we the head of list?
            head = newLink.next;
        } else { // Not head of the list.
            // Join up the forwards Link.
            Link previousLink = (Link) newLink.previous.getManagedObject();
            previousLink.next = newLink.next;
        } // if at head of list.

        // Reset the availableHead.
        availableHead = head;
        skipToBeDeleted();
        decrementSize(); // Adjust list length. 

        // Give back all of the remaining space.
        owningToken.objectStore.reserve((int) -reservedSpaceInStore, false);

        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.exit(this, cclass, methodName);
    }
634474
public Impl link(@Nullable CharSequence ref, @Nullable Link link) {
        if (StringUtils.isNotEmpty(ref) && link != null) {
            List<Link> links = this.linkMap.computeIfAbsent(ref, charSequence -> new ArrayList<>());
            links.add(link);
        }
        return (Impl) this;
    }
1293150
public final void eventWatermarkBreached() throws SevereMessageStoreException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "eventWatermarkBreached");

        ReferenceStream referenceStream = (ReferenceStream)getItem();
        if (null != referenceStream)
        {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "notifying eventWatermarkBreached: "+referenceStream);

            referenceStream.eventWatermarkBreached();

            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "notified eventWatermarkBreached: "+referenceStream);
        }
        else
        {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "no referenceStream to notify");
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "eventWatermarkBreached");
    }
84810
public void resetLink(String linkName)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "resetLink", linkName);

        try
        {
            DestinationHandler link = linkIndex.findByName(linkName, null);

            checkDestinationHandlerExists(
                                          link != null,
                                          linkName,
                                          messageProcessor.getMessagingEngineBus());

            // Only applicable to BaseDestinationHandlers and their children
            if (link instanceof LinkHandler)
            {
                LinkHandler linkhandler = (LinkHandler) link;

                // Need to ensure that this change is persisted - specifically that the
                // BDH "toBeIgnored" flag is persisted
                LocalTransaction siTran = txManager.createLocalTransaction(true);

                linkhandler.reset();

                // Change our entry in the appropriate index.
                linkIndex.reset(link);

                // Persist the change
                linkhandler.requestUpdate((Transaction) siTran);

                // commit the transaction
                siTran.commit();

                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                    SibTr.debug(tc, "Have reset link " + linkhandler.getName());
            }
            else
            {
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                    SibTr.debug(tc, "Not a LinkHandler, cannot reset handler for " + link.getName());
            }
        } catch (MessageStoreException e)
        {
            // No FFDC code needed

            SibTr.exception(tc, e);

            //throw e;
        } catch (SIException e)
        {
            // No FFDC code needed

            SibTr.exception(tc, e);

            //handleRollback(siTran);
            //        throw e;
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "resetLink");
    }
520972
@Override
    public void eventPostRollbackAdd(Transaction transaction) throws SevereMessageStoreException
    {
        super.eventPostRollbackAdd(transaction);
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "eventPostRollbackAdd", transaction);

        if (failedInitInRestore)
        {
            initialiseNonPersistent(true);
            setRegisterForPostEvents(true);
        }

        try
        {
            if (POST_ROLLBACK_ADD_1 != null)
            {
                POST_ROLLBACK_ADD_1.messageEventOccurred(MessageEvents.POST_ROLLBACK_ADD, this, transaction);
            }
            if (POST_ROLLBACK_ADD_2 != null)
            {
                POST_ROLLBACK_ADD_2.messageEventOccurred(MessageEvents.POST_ROLLBACK_ADD, this, transaction);
            }
        } catch (SIException e)
        {
            FFDCFilter.processException(
                                        e,
                                        "com.ibm.ws.sib.processor.impl.store.items.MessageItem.eventPostRollbackAdd",
                                        "1:1360:1.244.1.40",
                                        this);

            SibTr.exception(tc, e);

            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                SibTr.exit(this, tc, "eventPostRollbackAdd", e);

            throw new SIErrorException(e);
        }

        resetEvents();

        if (TraceComponent.isAnyTracingEnabled() && UserTrace.tc_mt.isDebugEnabled())
        {
            String apiMsgId = null;

            if (getJSMessage(true) instanceof JsApiMessage)
                apiMsgId = ((JsApiMessage) getJSMessage(true)).getApiMessageId();
            else
            {
                if (getJSMessage(true).getApiMessageIdAsBytes() != null)
                    apiMsgId = getJSMessage(true).getApiMessageIdAsBytes().toString();
            }

            // 524133 Get the transaction for the insert
            Object persistentTranId = (transaction != null) ? transaction.getPersistentTranId() : null;

            SibTr.debug(this, UserTrace.tc_mt,
                        nls_mt.getFormattedMessage(
                                                   "MESSAGE_ROLLBACK_CWSJU0010",
                                                   new Object[] {
                                                                 apiMsgId,
                                                                 getJSMessage(true).getSystemMessageId(),
                                                                 debugName,
                                                                 persistentTranId },
                                                   null));
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "eventPostRollbackAdd");
    }
162305
@Override
    public void beginLink(ResourceReference reference, boolean freestanding, Map<String, String> parameters)
    {
        saveEvent(EventType.BEGIN_LINK, reference, freestanding, parameters);
    }
1251738
public void addLinkFromSelectPart(final String _linkFrom)
        throws CacheReloadException
    {
        this.fromSelect = new LinkFromSelect(_linkFrom, getQuery().isCacheEnabled() ? getQuery().getKey() : null);
    }
581559
public final void abortAdd(final PersistentTransaction transaction) throws SevereMessageStoreException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "abortAdd", transaction);

        long _referredID = getTuple().getReferredID();
        super.abortAdd(transaction);
        if (AbstractItem.NO_ID != _referredID)
        {
            MessageStoreImpl msi = getMessageStoreImpl();
            ItemLink itemLink = (ItemLink) msi.getMembership(_referredID);
            if (null != itemLink)
            {
                itemLink.rollbackIncrementReferenceCount(transaction);
            }
            else
            {
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                {
                    SibTr.debug(this, tc, "reference to non-existent item: " + _referredID);
                }
            }
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "abortAdd");
    }
551365
private void initializeLinkOpen(TimeoutTracker timeout)
	{
		this.linkFirstOpen = new CompletableFuture<CoreMessageSender>();

		// timer to signal a timeout if exceeds the operationTimeout on MessagingFactory
		Timer.schedule(
				new Runnable()
				{
					public void run()
					{
						if (!CoreMessageSender.this.linkFirstOpen.isDone())
						{
							CoreMessageSender.this.closeInternals(false);
							CoreMessageSender.this.setClosed();

							Exception operationTimedout = new TimeoutException(
									String.format(Locale.US, "Open operation on SendLink(%s) on Entity(%s) timed out at %s.",	CoreMessageSender.this.sendLink.getName(), CoreMessageSender.this.getSendPath(), ZonedDateTime.now().toString()),
									CoreMessageSender.this.lastKnownErrorReportedAt.isAfter(Instant.now().minusSeconds(ClientConstants.SERVER_BUSY_BASE_SLEEP_TIME_IN_SECS)) ? CoreMessageSender.this.lastKnownLinkError : null);
							TRACE_LOGGER.warn(operationTimedout.getMessage());
							ExceptionUtil.completeExceptionally(CoreMessageSender.this.linkFirstOpen, operationTimedout, CoreMessageSender.this, true);
						}
					}
				}
				, timeout.remaining()
				, TimerType.OneTimeRun);
	}
598918
public void openPageOrWarn(String link, String target) {

        openPageOrWarn(link, target, CmsVaadinUtils.getMessageText(org.opencms.ui.Messages.GUI_POPUP_BLOCKED_0));
    }