Skip to content
Snippets Groups Projects

Feature #304 prioritization

2 open threads

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
114 *
115 * @param host host prioritizing the messages.
116 */
117 @Override
118 public void setAttachedHost(DTNHost host) {
119 this.nonHeadStartPrioritization.setAttachedHost(host);
120 }
121
122 /**
123 * Sorts the provided message - connection tuples according to strategy.
124 *
125 * @param messages The message - connection tuples to sort.
126 * @return The provided messages in sorted order, most important messages first.
127 */
128 @Override
129 public List<Tuple<Message, Connection>> sortMessages(Collection<Tuple<Message, Connection>> messages) {
  • 155 if (headStartMessagesIndex == INDEX_NOT_FOUND) {
    156 headStartMessagesIndex = otherMessages.size();
    157 }
    158 otherMessages.addAll(headStartMessagesIndex, headStartMessages);
    159
    160 // Return the sorted messages.
    161 return otherMessages;
    162 }
    163
    164 /**
    165 * Finds the first index at which an item is stored that does not wrap a {@link DataMessage}.
    166 * @param messages Message list to search.
    167 * @return The found index, or {@link #INDEX_NOT_FOUND} if there was none.
    168 */
    169 private static int findFirstNonDataMessageIndex(List<Tuple<Message, Connection>> messages) {
    170 int firstOrdinaryMessageIndex = INDEX_NOT_FOUND;
  • Ghost User added 1 commit

    added 1 commit

    Compare with previous version

  • Nils Weidmann mentioned in commit cd299f0f

    mentioned in commit cd299f0f

  • Please register or sign in to reply
    Loading