Synchronized. Move this cursor to point at a different entry in the
same list.

@param newEntry
973000
public synchronized void moveCursor(Entry newEntry)
  {
    if (tc.isEntryEnabled())
      SibTr.entry(tc, "moveCursor", new Object[] { newEntry });
    
    checkEntryParent();
    
    //if the entry is the same as the current one
    //then we don't need to bother doing anything
    if(newEntry != current)
    {
      //make sure we can find the new entry in this list
      if(newEntry != null && newEntry.parentList == parentList)
      {      
        LinkedList list = parentList;
        synchronized(list)
        {
          //remove the cursor from it's current postion
          forceRemove();
          
          //insert this cursor before the first on for the new entry
          next = newEntry.firstCursor;
          if(next != null) next.previous = this;
          newEntry.firstCursor = this;
          previous = null;
          parentList = list;
                 
          current = newEntry;
        }
      }
      else //if the new entry is not in this list, throw a runtime exception
      {
        SIErrorException e = new SIErrorException(
          nls.getFormattedMessage(
            "INTERNAL_MESSAGING_ERROR_CWSIP0002",
            new Object[] {
              "com.ibm.ws.sib.processor.utils.linkedlist.Cursor",
              "1:457:1.15" },
           null));

        FFDCFilter.processException(
          e,
          "com.ibm.ws.sib.processor.utils.linkedlist.Cursor.moveCursor",
          "1:463:1.15",
          this);

        SibTr.exception(tc, e);      

        if (tc.isEntryEnabled())
          SibTr.exit(tc, "moveCursor", e);

        throw e;
      }
    }        
    
    if (tc.isEntryEnabled())
      SibTr.exit(tc, "moveCursor");
  }
1224998
public void addAppConfigurationEntry(String name, AppConfigurationEntry... entry) {
		final AppConfigurationEntry[] existing = dynamicEntries.get(name);
		final AppConfigurationEntry[] updated;
		if (existing == null) {
			updated = Arrays.copyOf(entry, entry.length);
		}
		else {
			updated = merge(existing, entry);
		}
		dynamicEntries.put(name, updated);
	}
144806
public void setEntries(java.util.Collection<DatasetEntry> entries) {
        if (entries == null) {
            this.entries = null;
            return;
        }

        this.entries = new java.util.ArrayList<DatasetEntry>(entries);
    }
26412
private Entry insertHere(Entry newEntry, Node currentNode,
	        Entry parentEntry, ClusKernel carriedBuffer, Budget budget,
	        long timestamp) {
	
	    int numFreeEntries = currentNode.numFreeEntries();
	
	    // Insert the buffer that we carry.
	    if (!carriedBuffer.isEmpty()) {
	        Entry bufferEntry = new Entry(this.numberDimensions,
	                carriedBuffer, timestamp, parentEntry, currentNode);
	
	        if (numFreeEntries <= 1) {
	            // Distance from buffer to entries.
	            Entry nearestEntryToCarriedBuffer =
	                    currentNode.nearestEntry(newEntry);
	            double distanceNearestEntryToBuffer =
	                    nearestEntryToCarriedBuffer.calcDistance(newEntry);
	
	            // Distance between buffer and point to insert.
	            double distanceBufferNewEntry =
	                    newEntry.calcDistance(carriedBuffer);
	
	            // Best distance between Entrys in the Node.
	            BestMergeInNode bestMergeInNode =
	                    calculateBestMergeInNode(currentNode);
	
	            // See what the minimal distance is and do the correspoding
	            // action.
	            if (distanceNearestEntryToBuffer <= distanceBufferNewEntry
	                    && distanceNearestEntryToBuffer <= bestMergeInNode.distance) {
	                // Aggregate buffer entry to nearest entry in node.
	                nearestEntryToCarriedBuffer.aggregateEntry(bufferEntry,
	                        timestamp, this.negLambda);
	            } else if (distanceBufferNewEntry <= distanceNearestEntryToBuffer
	                    && distanceBufferNewEntry <= bestMergeInNode.distance) {
	                newEntry.mergeWith(bufferEntry);
	            } else {
	                currentNode.mergeEntries(bestMergeInNode.entryPos1,
	                        bestMergeInNode.entryPos2);
	                currentNode.addEntry(bufferEntry, timestamp);
	            }
	
	        } else {
	            assert (currentNode.isLeaf());
	            currentNode.addEntry(bufferEntry, timestamp);
	        }
	    }
	
	    // Normally the insertion of the carries buffer does not change the
	    // number of free entries, but in case of future changes we calculate
	    // the number again.
	    numFreeEntries = currentNode.numFreeEntries();
	
	    // Search for an Entry with a weight under the threshold.
	    Entry irrelevantEntry = currentNode.getIrrelevantEntry(this.weightThreshold);
	    if (currentNode.isLeaf() && irrelevantEntry != null) {
	        irrelevantEntry.overwriteOldEntry(newEntry);
	    } else if (numFreeEntries >= 1) {
	        currentNode.addEntry(newEntry, timestamp);
	    } else {
	        if (currentNode.isLeaf() && (this.hasMaximalSize()
	                || !budget.hasMoreTime())) {
	            mergeEntryWithoutSplit(currentNode, newEntry,
	                    timestamp);
	        } else {
	            // We have to split.
	            return split(newEntry, currentNode, parentEntry, timestamp);
	        }
	    }
	
	    return null;
	}
227285
private static void addEntry(ZipEntrySource entry, ZipOutputStream out) throws IOException {
    out.putNextEntry(entry.getEntry());
    InputStream in = entry.getInputStream();
    if (in != null) {
      try {
        IOUtils.copy(in, out);
      }
      finally {
        IOUtils.closeQuietly(in);
      }
    }
    out.closeEntry();
  }
860852
public void add(DataEntry dataEntry) {
        activeDataEntries.add(dataEntry);
        DataId newDataId = new DataId(dataEntry.getTenantId(), dataEntry.getDataId());
        if (!activeDataIds.contains(newDataId)) {
            activeDataIds.add(newDataId);
        }
    }
132130
private void writeEntry(HashtableEntry entry)

    throws IOException, EOFException, FileManagerException, ClassNotFoundException {

        long index = getHtindex(entry.index, entry.tableid);
        if (index == 0) { // first one in this bucket
            updateEntry(entry); // write to disk
            writeHashIndex(entry.index, entry.location, entry.tableid); // update index
        } else if (index == entry.location) { // replacing first entry
            updateEntry(entry);
            writeHashIndex(entry.index, entry.location, entry.tableid); // update index
        } else { // 
            //
            // If the entry has a "previous" pointer, then it was read earlier
            // from disk.  Otherwise, it is a brand new entry.  If it is a brand
            // entry, we write it to disk and chain at the front of the bucket.
            // If "previous" is not zero, we check to see if reallocation is
            // needed (location == 0).  If not, we simply update on disk and we're
            // done.  If reallocation is needed we update on disk to do the allocation
            // and call updatePointer to chain into the bucket.
            //
            if (entry.previous == 0) {
                entry.next = index;
                updateEntry(entry);
                writeHashIndex(entry.index, entry.location, entry.tableid); // update index
            } else {
                if (entry.location == 0) { // allocation needed?
                    updateEntry(entry); // do allocation
                    updatePointer(entry.previous, entry.location); // chain in
                } else {
                    updateEntry(entry); // no allocation, just update fields
                }
            }
        }

    }
356371
public ListInventoryEntriesResult withEntries(java.util.Collection<java.util.Map<String, String>> entries) {
        setEntries(entries);
        return this;
    }
1351496
void add(Entry<String, Point2d[]> entry) {
        if (entry != null) templateMap.put(entry.getKey(), entry.getValue());
    }
333112
public void applyAndJournal(Supplier<JournalContext> context, AddSyncPointEntry entry) {
    try {
      apply(entry);
      context.get().append(Journal.JournalEntry.newBuilder().setAddSyncPoint(entry).build());
    } catch (Throwable t) {
      ProcessUtils.fatalError(LOG, t, "Failed to apply %s", entry);
      throw t; // fatalError will usually system.exit
    }
  }
791483
public void removeEntry(String entryKey) {
        Iterator<JPAEntry> iter = entries.iterator();
        while (iter.hasNext()) {
            if (iter.next().getKey().equals(entryKey)) {
                iter.remove();
                return;
            }
        }
    }
716020
protected void validateNew(final CmsAliasTableRow newEntry) {

        CmsRpcAction<CmsAliasEditValidationReply> action = new CmsRpcAction<CmsAliasEditValidationReply>() {

            @Override
            public void execute() {

                start(200, true);
                CmsAliasEditValidationRequest validationRequest = new CmsAliasEditValidationRequest();
                List<CmsAliasTableRow> rows = m_view.getLiveData();
                validationRequest.setEditedData(rows);
                validationRequest.setNewEntry(newEntry);
                validationRequest.setOriginalData(m_initialData);
                getService().validateAliases(validationRequest, this);
            }

            @Override
            public void onResponse(CmsAliasEditValidationReply result) {

                stop(false);
                List<CmsAliasTableRow> tableRows = result.getChangedRows();
                CmsAliasTableRow validatedNewEntry = result.getValidatedNewEntry();
                if (validatedNewEntry.hasErrors()) {
                    m_view.setNewAliasPathError(validatedNewEntry.getAliasError());
                    m_view.setNewAliasResourceError(validatedNewEntry.getPathError());
                } else {
                    m_view.clearNew();
                    tableRows.add(validatedNewEntry);
                }
                m_view.update(tableRows);
                updateValidationStatus();
            }
        };
        action.execute();
    }
666934
public void diffUpdate(List<T> newList) {
    if (getCollection().size() == 0) {
      addAll(newList);
      notifyDataSetChanged();
    } else {
      DiffCallback diffCallback = new DiffCallback(collection, newList);
      DiffUtil.DiffResult diffResult = DiffUtil.calculateDiff(diffCallback);
      clear();
      addAll(newList);
      diffResult.dispatchUpdatesTo(this);
    }
  }
1295522
public void updateEntryPointsCache() {
        if (kBase.getAddedEntryNodeCache() != null) {
            for (EntryPointNode addedNode : kBase.getAddedEntryNodeCache()) {
                EntryPointId id = addedNode.getEntryPoint();
                if (EntryPointId.DEFAULT.equals(id)) continue;
                WorkingMemoryEntryPoint wmEntryPoint = new NamedEntryPoint(id, addedNode, this);
                entryPoints.put(id.getEntryPointId(), wmEntryPoint);
            }
        }

        if (kBase.getRemovedEntryNodeCache() != null) {
            for (EntryPointNode removedNode : kBase.getRemovedEntryNodeCache()) {
                entryPoints.remove(removedNode.getEntryPoint().getEntryPointId());
            }
        }
    }
927215
public void appendEntries(LogEntry... newEntries) {
        int lastTerm = lastLogOrSnapshotTerm();
        long lastIndex = lastLogOrSnapshotIndex();

        if (!checkAvailableCapacity(newEntries.length)) {
            throw new IllegalStateException("Not enough capacity! Capacity: " + logs.getCapacity()
                    + ", Size: " + logs.size() + ", New entries: " + newEntries.length);
        }

        for (LogEntry entry : newEntries) {
            if (entry.term() < lastTerm) {
                throw new IllegalArgumentException("Cannot append " + entry + " since its term is lower than last log term: "
                        + lastTerm);
            }
            if (entry.index() != lastIndex + 1) {
                throw new IllegalArgumentException("Cannot append " + entry
                        + " since its index is bigger than (lastLogIndex + 1): " + (lastIndex + 1));
            }
            logs.add(entry);
            lastIndex++;
            lastTerm = Math.max(lastTerm, entry.term());
        }
    }
805049
public void initNewList(int maxNumberOfTerms, String segmentName,
      int segmentNumber, String boundary) throws IOException {
    if (closed) {
      result = null;
      closed = false;
    }
    initNewListBasic(maxNumberOfTerms);
    if (segmentRegistration != null) {
      this.segmentName = segmentName;
      this.segmentNumber = segmentNumber;
      if (!segmentKeyValueList.containsKey(segmentName)) {
        segmentKeyValueList.put(segmentName, new HashMap<String, T1>());
        if (segmentRegistration.equals(SEGMENT_BOUNDARY_ASC)
            || segmentRegistration.equals(SEGMENT_BOUNDARY_DESC)) {
          if (boundary != null) {
            segmentValuesBoundary.put(segmentName,
                stringToBoundary(boundary, segmentNumber));
          } else {
            throw new IOException("expected boundary");
          }
        } else {
          segmentValuesBoundary.put(segmentName, null);
        }
        segmentValueTopListLast.put(segmentName, null);
      }
      this.segmentValueTopList = new ArrayList<>();
    }
  }
1357000
void fireNewEntry(AsteriskQueueEntryImpl entry)
    {
        synchronized (listeners)
        {
            for (AsteriskQueueListener listener : listeners)
            {
                try
                {
                    listener.onNewEntry(entry);
                }
                catch (Exception e)
                {
                    logger.warn("Exception in onNewEntry()", e);
                }
            }
        }
    }