mirror of
https://github.com/apache/activemq.git
synced 2025-02-16 15:08:10 +00:00
https://issues.apache.org/jira/browse/AMQ-3205 - Update ActivationSpec, patch applied with thanks
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1079331 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
373417c0df
commit
8fba621a08
@ -618,9 +618,20 @@ public class ActiveMQActivationSpec implements MessageActivationSpec, Serializab
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public void setBackOffMultiplier(short backOffMultiplier) {
|
public void setBackOffMultiplier(double backOffMultiplier) {
|
||||||
lazyCreateRedeliveryPolicy().setBackOffMultiplier(backOffMultiplier);
|
lazyCreateRedeliveryPolicy().setBackOffMultiplier(backOffMultiplier);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public long getMaximumRedeliveryDelay() {
|
||||||
|
if (redeliveryPolicy == null) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return redeliveryPolicy.getMaximumRedeliveryDelay();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMaximumRedeliveryDelay(long maximumRedeliveryDelay) {
|
||||||
|
lazyCreateRedeliveryPolicy().setMaximumRedeliveryDelay(maximumRedeliveryDelay);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -205,6 +205,10 @@ public class ActiveMQConnectionRequestInfo implements ConnectionRequestInfo, Ser
|
|||||||
return Long.valueOf(redeliveryPolicy().getInitialRedeliveryDelay());
|
return Long.valueOf(redeliveryPolicy().getInitialRedeliveryDelay());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Long getMaximumRedeliveryDelay() {
|
||||||
|
return Long.valueOf(redeliveryPolicy().getMaximumRedeliveryDelay());
|
||||||
|
}
|
||||||
|
|
||||||
public Integer getMaximumRedeliveries() {
|
public Integer getMaximumRedeliveries() {
|
||||||
return Integer.valueOf(redeliveryPolicy().getMaximumRedeliveries());
|
return Integer.valueOf(redeliveryPolicy().getMaximumRedeliveries());
|
||||||
}
|
}
|
||||||
@ -225,6 +229,12 @@ public class ActiveMQConnectionRequestInfo implements ConnectionRequestInfo, Ser
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setMaximumRedeliveryDelay(Long value) {
|
||||||
|
if (value != null) {
|
||||||
|
redeliveryPolicy().setMaximumRedeliveryDelay(value.longValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void setMaximumRedeliveries(Integer value) {
|
public void setMaximumRedeliveries(Integer value) {
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
redeliveryPolicy().setMaximumRedeliveries(value.intValue());
|
redeliveryPolicy().setMaximumRedeliveries(value.intValue());
|
||||||
|
@ -235,6 +235,24 @@ public class ActiveMQConnectionSupport {
|
|||||||
info.setInitialRedeliveryDelay(value);
|
info.setInitialRedeliveryDelay(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return initial redelivery delay
|
||||||
|
*/
|
||||||
|
public Long getMaximumRedeliveryDelay() {
|
||||||
|
return info.getMaximumRedeliveryDelay();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param value
|
||||||
|
*/
|
||||||
|
public void setMaximumRedeliveryDelay(Long value) {
|
||||||
|
if ( log.isDebugEnabled() ) {
|
||||||
|
log.debug("setting [maximumRedeliveryDelay] to: " + value);
|
||||||
|
}
|
||||||
|
info.setMaximumRedeliveryDelay(value);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return input stream prefetch
|
* @return input stream prefetch
|
||||||
*/
|
*/
|
||||||
|
@ -116,6 +116,8 @@ public interface MessageActivationSpec extends ActivationSpec {
|
|||||||
String getMaxMessagesPerBatch();
|
String getMaxMessagesPerBatch();
|
||||||
|
|
||||||
double getBackOffMultiplier();
|
double getBackOffMultiplier();
|
||||||
|
|
||||||
|
long getMaximumRedeliveryDelay();
|
||||||
|
|
||||||
long getInitialRedeliveryDelay();
|
long getInitialRedeliveryDelay();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user