This is an automated email from the ASF dual-hosted git repository.
remm pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.1.x by this push:
new 8eb7bdc872 Add javadoc
8eb7bdc872 is described below
commit 8eb7bdc87216074590f939cb825dddcfbc34c4bd
Author: remm <[email protected]>
AuthorDate: Thu Apr 2 15:00:17 2026 +0200
Add javadoc
---
.../catalina/tribes/group/AbsoluteOrder.java | 42 ++++++++++++++++++++++
1 file changed, 42 insertions(+)
diff --git a/java/org/apache/catalina/tribes/group/AbsoluteOrder.java
b/java/org/apache/catalina/tribes/group/AbsoluteOrder.java
index e9c6c350eb..94525fe5a7 100644
--- a/java/org/apache/catalina/tribes/group/AbsoluteOrder.java
+++ b/java/org/apache/catalina/tribes/group/AbsoluteOrder.java
@@ -82,18 +82,46 @@ public class AbsoluteOrder {
return result;
}
+ /**
+ * Compare the IP addresses of two members.
+ *
+ * @param m1 First member
+ * @param m2 Second member
+ * @return comparison result
+ */
public int compareIps(Member m1, Member m2) {
return compareBytes(m1.getHost(), m2.getHost());
}
+ /**
+ * Compare the ports of two members.
+ *
+ * @param m1 First member
+ * @param m2 Second member
+ * @return comparison result
+ */
public int comparePorts(Member m1, Member m2) {
return compareInts(m1.getPort(), m2.getPort());
}
+ /**
+ * Compare the unique IDs of two members.
+ *
+ * @param m1 First member
+ * @param m2 Second member
+ * @return comparison result
+ */
public int compareIds(Member m1, Member m2) {
return compareBytes(m1.getUniqueId(), m2.getUniqueId());
}
+ /**
+ * Compare two byte arrays.
+ *
+ * @param d1 First byte array
+ * @param d2 Second byte array
+ * @return comparison result
+ */
protected int compareBytes(byte[] d1, byte[] d2) {
int result = 0;
if (d1.length == d2.length) {
@@ -108,10 +136,24 @@ public class AbsoluteOrder {
return result;
}
+ /**
+ * Compare two bytes.
+ *
+ * @param b1 First byte
+ * @param b2 Second byte
+ * @return comparison result
+ */
protected int compareBytes(byte b1, byte b2) {
return compareInts(b1, b2);
}
+ /**
+ * Compare two integers.
+ *
+ * @param b1 First integer
+ * @param b2 Second integer
+ * @return comparison result
+ */
protected int compareInts(int b1, int b2) {
return Integer.compare(b1, b2);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]