Skip to content

Commit

Permalink
Merge branch 'release/12.3.9'
Browse files Browse the repository at this point in the history
  • Loading branch information
iitsoftware committed Feb 7, 2022
2 parents a100d30 + db8b3a3 commit 904cd58
Show file tree
Hide file tree
Showing 28 changed files with 190 additions and 101 deletions.
4 changes: 2 additions & 2 deletions distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.swiftmq</groupId>
<artifactId>swiftmq-ce</artifactId>
<version>12.3.8</version>
<version>12.3.9</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand All @@ -21,7 +21,7 @@
<dependency>
<groupId>com.swiftmq.swiftlets</groupId>
<artifactId>sys_xa</artifactId>
<version>12.3.8</version>
<version>12.3.9</version>
</dependency>
</dependencies>

Expand Down
2 changes: 1 addition & 1 deletion distribution/src/assembly/filter.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
vendor=IIT Software GmbH, Muenster, Germany
release=12.03.08
release=12.03.09
distribution=Community Edition


2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>com.swiftmq</groupId>
<artifactId>swiftmq-ce</artifactId>
<packaging>pom</packaging>
<version>12.3.8</version>
<version>12.3.9</version>

<modules>
<module>router</module>
Expand Down
4 changes: 2 additions & 2 deletions router/dependency-reduced-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
<parent>
<artifactId>swiftmq-ce</artifactId>
<groupId>com.swiftmq</groupId>
<version>12.3.8</version>
<version>12.3.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.swiftmq</groupId>
<artifactId>router</artifactId>
<version>12.3.8</version>
<version>12.3.9</version>
<build>
<plugins>
<plugin>
Expand Down
6 changes: 3 additions & 3 deletions router/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@
<parent>
<groupId>com.swiftmq</groupId>
<artifactId>swiftmq-ce</artifactId>
<version>12.3.8</version>
<version>12.3.9</version>
<relativePath>../pom.xml</relativePath>
</parent>

<groupId>com.swiftmq</groupId>
<artifactId>router</artifactId>
<version>12.3.8</version>
<version>12.3.9</version>

<dependencies>
<dependency>
<groupId>com.swiftmq</groupId>
<artifactId>swiftmq-client</artifactId>
<version>12.3.8</version>
<version>12.3.9</version>
</dependency>
<dependency>
<groupId>org.graalvm.sdk</groupId>
Expand Down
6 changes: 3 additions & 3 deletions swiftlets/sys_amqp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<parent>
<groupId>com.swiftmq</groupId>
<artifactId>swiftmq-ce</artifactId>
<version>12.3.8</version>
<version>12.3.9</version>
<relativePath>../../pom.xml</relativePath>
</parent>

<groupId>com.swiftmq.swiftlets</groupId>
<artifactId>sys_amqp</artifactId>
<version>12.3.8</version>
<version>12.3.9</version>

<properties>
<jar.finalName>${project.artifactId}</jar.finalName>
Expand All @@ -22,7 +22,7 @@
<dependency>
<groupId>com.swiftmq</groupId>
<artifactId>swiftmq-client</artifactId>
<version>12.3.8</version>
<version>12.3.9</version>
</dependency>
</dependencies>
<build>
Expand Down
6 changes: 3 additions & 3 deletions swiftlets/sys_authentication/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<parent>
<groupId>com.swiftmq</groupId>
<artifactId>swiftmq-ce</artifactId>
<version>12.3.8</version>
<version>12.3.9</version>
<relativePath>../../pom.xml</relativePath>
</parent>

<groupId>com.swiftmq.swiftlets</groupId>
<artifactId>sys_authentication</artifactId>
<version>12.3.8</version>
<version>12.3.9</version>

<properties>
<jar.finalName>${project.artifactId}</jar.finalName>
Expand All @@ -22,7 +22,7 @@
<dependency>
<groupId>com.swiftmq</groupId>
<artifactId>swiftmq-client</artifactId>
<version>12.3.8</version>
<version>12.3.9</version>
</dependency>
<dependency>
<groupId>org.jasypt</groupId>
Expand Down
6 changes: 3 additions & 3 deletions swiftlets/sys_deploy/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<parent>
<groupId>com.swiftmq</groupId>
<artifactId>swiftmq-ce</artifactId>
<version>12.3.8</version>
<version>12.3.9</version>
<relativePath>../../pom.xml</relativePath>
</parent>

<groupId>com.swiftmq.swiftlets</groupId>
<artifactId>sys_deploy</artifactId>
<version>12.3.8</version>
<version>12.3.9</version>

<properties>
<jar.finalName>${project.artifactId}</jar.finalName>
Expand All @@ -22,7 +22,7 @@
<dependency>
<groupId>com.swiftmq</groupId>
<artifactId>swiftmq-client</artifactId>
<version>12.3.8</version>
<version>12.3.9</version>
</dependency>
</dependencies>
<build>
Expand Down
6 changes: 3 additions & 3 deletions swiftlets/sys_jms/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<parent>
<groupId>com.swiftmq</groupId>
<artifactId>swiftmq-ce</artifactId>
<version>12.3.8</version>
<version>12.3.9</version>
<relativePath>../../pom.xml</relativePath>
</parent>

<groupId>com.swiftmq.swiftlets</groupId>
<artifactId>sys_jms</artifactId>
<version>12.3.8</version>
<version>12.3.9</version>

<properties>
<jar.finalName>${project.artifactId}</jar.finalName>
Expand All @@ -22,7 +22,7 @@
<dependency>
<groupId>com.swiftmq</groupId>
<artifactId>swiftmq-client</artifactId>
<version>12.3.8</version>
<version>12.3.9</version>
</dependency>
</dependencies>
<build>
Expand Down
6 changes: 3 additions & 3 deletions swiftlets/sys_jndi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<parent>
<groupId>com.swiftmq</groupId>
<artifactId>swiftmq-ce</artifactId>
<version>12.3.8</version>
<version>12.3.9</version>
<relativePath>../../pom.xml</relativePath>
</parent>

<groupId>com.swiftmq.swiftlets</groupId>
<artifactId>sys_jndi</artifactId>
<version>12.3.8</version>
<version>12.3.9</version>

<properties>
<jar.finalName>${project.artifactId}</jar.finalName>
Expand All @@ -22,7 +22,7 @@
<dependency>
<groupId>com.swiftmq</groupId>
<artifactId>swiftmq-client</artifactId>
<version>12.3.8</version>
<version>12.3.9</version>
</dependency>
</dependencies>
<build>
Expand Down
6 changes: 3 additions & 3 deletions swiftlets/sys_log/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<parent>
<groupId>com.swiftmq</groupId>
<artifactId>swiftmq-ce</artifactId>
<version>12.3.8</version>
<version>12.3.9</version>
<relativePath>../../pom.xml</relativePath>
</parent>

<groupId>com.swiftmq.swiftlets</groupId>
<artifactId>sys_log</artifactId>
<version>12.3.8</version>
<version>12.3.9</version>

<properties>
<jar.finalName>${project.artifactId}</jar.finalName>
Expand All @@ -22,7 +22,7 @@
<dependency>
<groupId>com.swiftmq</groupId>
<artifactId>swiftmq-client</artifactId>
<version>12.3.8</version>
<version>12.3.9</version>
</dependency>
</dependencies>
<build>
Expand Down
6 changes: 3 additions & 3 deletions swiftlets/sys_mgmt/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<parent>
<groupId>com.swiftmq</groupId>
<artifactId>swiftmq-ce</artifactId>
<version>12.3.8</version>
<version>12.3.9</version>
<relativePath>../../pom.xml</relativePath>
</parent>

<groupId>com.swiftmq.swiftlets</groupId>
<artifactId>sys_mgmt</artifactId>
<version>12.3.8</version>
<version>12.3.9</version>

<properties>
<jar.finalName>${project.artifactId}</jar.finalName>
Expand All @@ -22,7 +22,7 @@
<dependency>
<groupId>com.swiftmq</groupId>
<artifactId>swiftmq-client</artifactId>
<version>12.3.8</version>
<version>12.3.9</version>
</dependency>
</dependencies>
<build>
Expand Down
6 changes: 3 additions & 3 deletions swiftlets/sys_mqtt/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<parent>
<groupId>com.swiftmq</groupId>
<artifactId>swiftmq-ce</artifactId>
<version>12.3.8</version>
<version>12.3.9</version>
<relativePath>../../pom.xml</relativePath>
</parent>

<groupId>com.swiftmq.swiftlets</groupId>
<artifactId>sys_mqtt</artifactId>
<version>12.3.8</version>
<version>12.3.9</version>

<properties>
<jar.finalName>${project.artifactId}</jar.finalName>
Expand All @@ -22,7 +22,7 @@
<dependency>
<groupId>com.swiftmq</groupId>
<artifactId>swiftmq-client</artifactId>
<version>12.3.8</version>
<version>12.3.9</version>
</dependency>
</dependencies>
<build>
Expand Down
6 changes: 3 additions & 3 deletions swiftlets/sys_net_netty/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
<parent>
<groupId>com.swiftmq</groupId>
<artifactId>swiftmq-ce</artifactId>
<version>12.3.8</version>
<version>12.3.9</version>
<relativePath>../../pom.xml</relativePath>
</parent>

<groupId>com.swiftmq.swiftlets</groupId>
<artifactId>sys_net_netty</artifactId>
<version>12.3.8</version>
<version>12.3.9</version>

<properties>
<jar.finalName>${project.artifactId}</jar.finalName>
Expand All @@ -44,7 +44,7 @@
<dependency>
<groupId>com.swiftmq</groupId>
<artifactId>swiftmq-client</artifactId>
<version>12.3.8</version>
<version>12.3.9</version>
</dependency>
</dependencies>
<build>
Expand Down
6 changes: 3 additions & 3 deletions swiftlets/sys_queuemanager/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<parent>
<groupId>com.swiftmq</groupId>
<artifactId>swiftmq-ce</artifactId>
<version>12.3.8</version>
<version>12.3.9</version>
<relativePath>../../pom.xml</relativePath>
</parent>

<groupId>com.swiftmq.swiftlets</groupId>
<artifactId>sys_queuemanager</artifactId>
<version>12.3.8</version>
<version>12.3.9</version>

<properties>
<jar.finalName>${project.artifactId}</jar.finalName>
Expand All @@ -22,7 +22,7 @@
<dependency>
<groupId>com.swiftmq</groupId>
<artifactId>swiftmq-client</artifactId>
<version>12.3.8</version>
<version>12.3.9</version>
</dependency>
</dependencies>
<build>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
/*
* Copyright 2022 IIT Software GmbH
*
* IIT Software GmbH licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

package com.swiftmq.impl.queue.standard;

import com.swiftmq.ms.MessageSelector;
import com.swiftmq.swiftlet.queue.AbstractQueue;
import com.swiftmq.swiftlet.queue.MessageEntry;
import com.swiftmq.swiftlet.queue.MessageIndex;

import java.util.ArrayList;
import java.util.List;
import java.util.Set;

public class ViewCollector {
private final AbstractQueue abstractQueue;
private final int from;
private List<MessageIndex> collected = null;
private int viewId = -1;
private int index = 0;

public ViewCollector(AbstractQueue abstractQueue, int from, MessageSelector selector, int max) throws Exception {
this.abstractQueue = abstractQueue;
this.from = from;
Set<MessageIndex> queueContent;
if (selector != null) {
this.viewId = abstractQueue.createView(selector);
queueContent = abstractQueue.getQueueIndex(this.viewId);
} else
queueContent = abstractQueue.getQueueIndex();
if (from < queueContent.size())
collected = new ArrayList<>(queueContent).subList(from, Math.min(from + max, queueContent.size()));
else
collected = new ArrayList<>();
}

public int resultSize() {
return collected.size();
}

public long queueSize() throws Exception {
return abstractQueue.getNumberQueueMessages();
}

public ViewEntry next() throws Exception {
ViewEntry viewEntry = null;
MessageEntry messageEntry = null;
for (int i = index; i < collected.size(); i++) {
messageEntry = abstractQueue.getMessageByIndex(collected.get(i));
if (messageEntry != null) {
viewEntry = new ViewEntry(messageEntry, from + i);
index = i + 1;
break;
}
}
return viewEntry;
}

public void close() {
if (viewId != -1)
this.abstractQueue.deleteView(viewId);
}
}
Loading

0 comments on commit 904cd58

Please sign in to comment.