mirror of https://github.com/apache/activemq.git
added size() method to return amount of disk space the store occupies on disk
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@900420 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
27186c5ce2
commit
2e98d40065
|
@ -172,6 +172,17 @@ public class JobSchedulerStore extends ServiceSupport {
|
||||||
public void setDirectory(File directory) {
|
public void setDirectory(File directory) {
|
||||||
this.directory = directory;
|
this.directory = directory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public long size() {
|
||||||
|
if ( !isStarted() ) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
return journal.getDiskSize() + pageFile.getDiskSize();
|
||||||
|
} catch (IOException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public JobScheduler getJobScheduler(final String name) throws Exception {
|
public JobScheduler getJobScheduler(final String name) throws Exception {
|
||||||
JobSchedulerImpl result = this.schedulers.get(name);
|
JobSchedulerImpl result = this.schedulers.get(name);
|
||||||
|
|
Loading…
Reference in New Issue