This closes #3675
This commit is contained in:
commit
b15bd46a74
|
@ -2843,4 +2843,12 @@ public interface AuditLogger extends BasicLogger {
|
||||||
@LogMessage(level = Logger.Level.INFO)
|
@LogMessage(level = Logger.Level.INFO)
|
||||||
@Message(id = 601747, value = "User {0} is getting auto-created property on target resource: {1} {2}", format = Message.Format.MESSAGE_FORMAT)
|
@Message(id = 601747, value = "User {0} is getting auto-created property on target resource: {1} {2}", format = Message.Format.MESSAGE_FORMAT)
|
||||||
void isAutoCreated(String user, Object source, Object... args);
|
void isAutoCreated(String user, Object source, Object... args);
|
||||||
|
|
||||||
|
static void getMaxRetryInterval(Object source) {
|
||||||
|
BASE_LOGGER.getMaxRetryInterval(getCaller(), source);
|
||||||
|
}
|
||||||
|
|
||||||
|
@LogMessage(level = Logger.Level.INFO)
|
||||||
|
@Message(id = 601748, value = "User {0} is getting max retry interval on target resource: {1} {2}", format = Message.Format.MESSAGE_FORMAT)
|
||||||
|
void getMaxRetryInterval(String user, Object source, Object... args);
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,6 +89,12 @@ public interface BridgeControl extends ActiveMQComponentControl {
|
||||||
@Attribute(desc = "retry interval multiplier used by this bridge")
|
@Attribute(desc = "retry interval multiplier used by this bridge")
|
||||||
double getRetryIntervalMultiplier();
|
double getRetryIntervalMultiplier();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the max retry interval used by this bridge.
|
||||||
|
*/
|
||||||
|
@Attribute(desc = "max retry interval used by this bridge")
|
||||||
|
long getMaxRetryInterval();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the number of reconnection attempts used by this bridge.
|
* Returns the number of reconnection attempts used by this bridge.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -171,6 +171,19 @@ public class BridgeControlImpl extends AbstractControl implements BridgeControl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getMaxRetryInterval() {
|
||||||
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
|
AuditLogger.getMaxRetryInterval(this.bridge);
|
||||||
|
}
|
||||||
|
clearIO();
|
||||||
|
try {
|
||||||
|
return configuration.getMaxRetryInterval();
|
||||||
|
} finally {
|
||||||
|
blockOnIO();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getTransformerClassName() {
|
public String getTransformerClassName() {
|
||||||
if (AuditLogger.isBaseLoggingEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
|
|
|
@ -63,6 +63,7 @@ public class BridgeControlTest extends ManagementTestBase {
|
||||||
Assert.assertEquals(bridgeConfig.getFilterString(), bridgeControl.getFilterString());
|
Assert.assertEquals(bridgeConfig.getFilterString(), bridgeControl.getFilterString());
|
||||||
Assert.assertEquals(bridgeConfig.getRetryInterval(), bridgeControl.getRetryInterval());
|
Assert.assertEquals(bridgeConfig.getRetryInterval(), bridgeControl.getRetryInterval());
|
||||||
Assert.assertEquals(bridgeConfig.getRetryIntervalMultiplier(), bridgeControl.getRetryIntervalMultiplier(), 0.000001);
|
Assert.assertEquals(bridgeConfig.getRetryIntervalMultiplier(), bridgeControl.getRetryIntervalMultiplier(), 0.000001);
|
||||||
|
Assert.assertEquals(bridgeConfig.getMaxRetryInterval(), bridgeControl.getMaxRetryInterval());
|
||||||
Assert.assertEquals(bridgeConfig.getReconnectAttempts(), bridgeControl.getReconnectAttempts());
|
Assert.assertEquals(bridgeConfig.getReconnectAttempts(), bridgeControl.getReconnectAttempts());
|
||||||
Assert.assertEquals(bridgeConfig.isUseDuplicateDetection(), bridgeControl.isUseDuplicateDetection());
|
Assert.assertEquals(bridgeConfig.isUseDuplicateDetection(), bridgeControl.isUseDuplicateDetection());
|
||||||
Map<String, Object> bridgeMetrics = bridgeControl.getMetrics();
|
Map<String, Object> bridgeMetrics = bridgeControl.getMetrics();
|
||||||
|
|
|
@ -67,6 +67,7 @@ public class BridgeControlUsingCoreTest extends ManagementTestBase {
|
||||||
Assert.assertEquals(bridgeConfig.getFilterString(), proxy.retrieveAttributeValue("filterString"));
|
Assert.assertEquals(bridgeConfig.getFilterString(), proxy.retrieveAttributeValue("filterString"));
|
||||||
Assert.assertEquals(bridgeConfig.getRetryInterval(), proxy.retrieveAttributeValue("retryInterval", Long.class));
|
Assert.assertEquals(bridgeConfig.getRetryInterval(), proxy.retrieveAttributeValue("retryInterval", Long.class));
|
||||||
Assert.assertEquals(bridgeConfig.getRetryIntervalMultiplier(), proxy.retrieveAttributeValue("retryIntervalMultiplier", Double.class));
|
Assert.assertEquals(bridgeConfig.getRetryIntervalMultiplier(), proxy.retrieveAttributeValue("retryIntervalMultiplier", Double.class));
|
||||||
|
Assert.assertEquals(bridgeConfig.getMaxRetryInterval(), proxy.retrieveAttributeValue("maxRetryInterval", Long.class));
|
||||||
Assert.assertEquals(bridgeConfig.getReconnectAttempts(), proxy.retrieveAttributeValue("reconnectAttempts", Integer.class));
|
Assert.assertEquals(bridgeConfig.getReconnectAttempts(), proxy.retrieveAttributeValue("reconnectAttempts", Integer.class));
|
||||||
Assert.assertEquals(bridgeConfig.isUseDuplicateDetection(), proxy.retrieveAttributeValue("useDuplicateDetection", Boolean.class));
|
Assert.assertEquals(bridgeConfig.isUseDuplicateDetection(), proxy.retrieveAttributeValue("useDuplicateDetection", Boolean.class));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue