Expose disk-scan-period, max-disk-usage, and global-max-size in server control
This commit is contained in:
parent
70199f3a1d
commit
b69af66f47
|
@ -403,6 +403,24 @@ public interface ActiveMQServerControl {
|
||||||
@Attribute(desc = "whether the initial replication synchronization process with the backup server is complete")
|
@Attribute(desc = "whether the initial replication synchronization process with the backup server is complete")
|
||||||
boolean isReplicaSync();
|
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 ----------------------------------------------------
|
// 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
|
@Override
|
||||||
public void deployQueue(final String address, final String name, final String filterString) throws Exception {
|
public void deployQueue(final String address, final String name, final String filterString) throws Exception {
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
|
|
@ -509,6 +509,21 @@ public class ActiveMQServerControlUsingCoreTest extends ActiveMQServerControlTes
|
||||||
return (Boolean) proxy.retrieveAttributeValue("PersistenceEnabled");
|
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
|
@Override
|
||||||
public void addSecuritySettings(String addressMatch,
|
public void addSecuritySettings(String addressMatch,
|
||||||
String sendRoles,
|
String sendRoles,
|
||||||
|
|
Loading…
Reference in New Issue