Commit ebd0a965 authored by Andre Freyssinet's avatar Andre Freyssinet

Javadoc enhancements and fixes.

parent 7d398326
/*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2001 - 2019 ScalAgent Distributed Technologies
* Copyright (C) 2001 - 2020 ScalAgent Distributed Technologies
* Copyright (C) 1996 - 2000 Dyade
*
* This library is free software; you can redistribute it and/or
......@@ -36,7 +36,6 @@ import java.util.Vector;
import javax.management.openmbean.CompositeData;
import javax.management.openmbean.TabularData;
import org.objectweb.joram.mom.dest.AdminTopic.DestinationDesc;
import org.objectweb.joram.mom.messages.Message;
import org.objectweb.joram.mom.messages.MessageJMXWrapper;
import org.objectweb.joram.mom.messages.MessageView;
......@@ -180,7 +179,7 @@ public class Queue extends Destination implements QueueMBean {
* Sets the delay in seconds use to wait before re-delivering messages
* after a deny.
*
* @param reDeliveryDelay the reDeliveryDelay to set
* @param redeliveryDelay the reDeliveryDelay to set
*/
@Override
public final void setRedeliveryDelay(int redeliveryDelay) {
......@@ -273,6 +272,7 @@ public class Queue extends Destination implements QueueMBean {
* @param properties
* The initial set of properties.
*/
@Override
public void setProperties(Properties properties, boolean firstTime) throws Exception {
super.setProperties(properties, firstTime);
......@@ -643,9 +643,9 @@ public class Queue extends Destination implements QueueMBean {
/**
* Finalizes the destination before it is garbaged.
*
* @param lastime true if the destination is deleted
* @param last true if the destination is deleted
*/
protected void finalize(boolean lastTime) {
protected void finalize(boolean last) {
setSave();
// averageLoadTask.cancel();
// averageLoadTask = null;
......@@ -653,6 +653,7 @@ public class Queue extends Destination implements QueueMBean {
/**
* Returns a string representation of this destination.
* @return a string representation of this destination.
*/
public String toString() {
return "Queue:" + getId().toString();
......@@ -1616,26 +1617,21 @@ public class Queue extends Destination implements QueueMBean {
}
if (samePriorities) {
// Constant priorities: no need to insert the message according to
// its priority.
// Constant priorities: no need to insert the message according to its priority.
if (receiving) {
// Message being received: adding it at the end of the queue.
messages.add(message);
} else {
// Denying or recovery: adding the message according to its original
// arrival order.
long currentO;
// Denying or recovery: adding the message according to its original arrival order.
int i = 0;
for (Iterator ite = messages.iterator(); ite.hasNext();) {
currentO = ((Message) ite.next()).order;
if (currentO > message.order) break;
if (((Message) ite.next()).order > message.order) break;
i++;
}
messages.add(i, message);
}
} else {
// Non constant priorities: inserting the message according to its
// priority.
// Non constant priorities: inserting the message according to its priority.
Message currentMsg;
int currentP;
long currentO;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment