ARTEMIS-3196 - expose journal pool files in JMX
https://issues.apache.org/jira/browse/ARTEMIS-3196
This commit is contained in:
parent
5a137fa0b7
commit
bb94d0a5b3
|
@ -183,6 +183,12 @@ public interface ActiveMQServerControl {
|
|||
@Attribute(desc = "Size of the internal buffer on the journal")
|
||||
int getJournalBufferSize();
|
||||
|
||||
/**
|
||||
* Number of files that would be acceptable to keep on a pool
|
||||
*/
|
||||
@Attribute(desc = "Number of files that would be acceptable to keep on a pool")
|
||||
int getJournalPoolFiles();
|
||||
|
||||
/**
|
||||
* Returns the timeout (in nanoseconds) used to flush internal buffers on the journal.
|
||||
*/
|
||||
|
|
|
@ -311,6 +311,21 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getJournalPoolFiles() {
|
||||
if (AuditLogger.isEnabled()) {
|
||||
AuditLogger.getJournalBufferSize(this.server);
|
||||
}
|
||||
checkStarted();
|
||||
|
||||
clearIO();
|
||||
try {
|
||||
return configuration.getJournalPoolFiles();
|
||||
} finally {
|
||||
blockOnIO();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getJournalBufferSize() {
|
||||
if (AuditLogger.isEnabled()) {
|
||||
|
|
|
@ -197,6 +197,7 @@ public class ActiveMQServerControlTest extends ManagementTestBase {
|
|||
Assert.assertEquals(conf.getJournalCompactMinFiles(), serverControl.getJournalCompactMinFiles());
|
||||
Assert.assertEquals(conf.getJournalCompactPercentage(), serverControl.getJournalCompactPercentage());
|
||||
Assert.assertEquals(conf.isPersistenceEnabled(), serverControl.isPersistenceEnabled());
|
||||
Assert.assertEquals(conf.getJournalPoolFiles(), serverControl.getJournalPoolFiles());
|
||||
Assert.assertTrue(serverControl.isActive());
|
||||
}
|
||||
|
||||
|
|
|
@ -747,6 +747,11 @@ public class ActiveMQServerControlUsingCoreTest extends ActiveMQServerControlTes
|
|||
return (Integer) proxy.retrieveAttributeValue("JournalBufferSize", Integer.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getJournalPoolFiles() {
|
||||
return (Integer) proxy.retrieveAttributeValue("getJournalPoolFiles", Integer.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getJournalBufferTimeout() {
|
||||
return (Integer) proxy.retrieveAttributeValue("JournalBufferTimeout", Integer.class);
|
||||
|
|
Loading…
Reference in New Issue