diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/JobSchedulerStore.java b/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/JobSchedulerStore.java index 99eeaa2acd..3dfe1f0f26 100644 --- a/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/JobSchedulerStore.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/JobSchedulerStore.java @@ -172,6 +172,17 @@ public class JobSchedulerStore extends ServiceSupport { public void setDirectory(File 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 { JobSchedulerImpl result = this.schedulers.get(name);