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
|
@ -173,6 +173,17 @@ public class JobSchedulerStore extends ServiceSupport {
|
|||
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 {
|
||||
JobSchedulerImpl result = this.schedulers.get(name);
|
||||
if (result == null) {
|
||||
|
|
Loading…
Reference in New Issue