This closes #797
This commit is contained in:
commit
061ca9ce50
|
@ -403,6 +403,24 @@ public interface ActiveMQServerControl {
|
|||
@Attribute(desc = "whether the initial replication synchronization process with the backup server is complete")
|
||||
boolean isReplicaSync();
|
||||
|
||||
/**
|
||||
* Returns how often the server checks for disk space usage.
|
||||
*/
|
||||
@Attribute(desc = "how often to check for disk space usage, in milliseconds")
|
||||
int getDiskScanPeriod();
|
||||
|
||||
/**
|
||||
* Returns the disk use max limit.
|
||||
*/
|
||||
@Attribute(desc = "maximum limit for disk use, in percentage")
|
||||
int getMaxDiskUsage();
|
||||
|
||||
/**
|
||||
* Returns the global max bytes limit for in-memory messages.
|
||||
*/
|
||||
@Attribute(desc = "global maximum limit for in-memory messages, in bytes")
|
||||
long getGlobalMaxSize();
|
||||
|
||||
// Operations ----------------------------------------------------
|
||||
|
||||
/**
|
||||
|
|
|
@ -545,6 +545,45 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDiskScanPeriod() {
|
||||
checkStarted();
|
||||
|
||||
clearIO();
|
||||
try {
|
||||
return configuration.getDiskScanPeriod();
|
||||
}
|
||||
finally {
|
||||
blockOnIO();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxDiskUsage() {
|
||||
checkStarted();
|
||||
|
||||
clearIO();
|
||||
try {
|
||||
return configuration.getMaxDiskUsage();
|
||||
}
|
||||
finally {
|
||||
blockOnIO();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getGlobalMaxSize() {
|
||||
checkStarted();
|
||||
|
||||
clearIO();
|
||||
try {
|
||||
return configuration.getGlobalMaxSize();
|
||||
}
|
||||
finally {
|
||||
blockOnIO();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deployQueue(final String address, final String name, final String filterString) throws Exception {
|
||||
checkStarted();
|
||||
|
|
|
@ -509,6 +509,21 @@ public class ActiveMQServerControlUsingCoreTest extends ActiveMQServerControlTes
|
|||
return (Boolean) proxy.retrieveAttributeValue("PersistenceEnabled");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDiskScanPeriod() {
|
||||
return (Integer) proxy.retrieveAttributeValue("DiskScanPeriod", Integer.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxDiskUsage() {
|
||||
return (Integer) proxy.retrieveAttributeValue("MaxDiskUsage", Integer.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getGlobalMaxSize() {
|
||||
return (Long) proxy.retrieveAttributeValue("GlobalMaxSize", Long.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addSecuritySettings(String addressMatch,
|
||||
String sendRoles,
|
||||
|
|
Loading…
Reference in New Issue