1 24 package org.objectweb.cjdbc.common.monitor.scheduler; 25 26 import org.objectweb.cjdbc.common.monitor.AbstractDataCollector; 27 import org.objectweb.cjdbc.controller.core.Controller; 28 import org.objectweb.cjdbc.controller.scheduler.AbstractScheduler; 29 import org.objectweb.cjdbc.controller.virtualdatabase.VirtualDatabase; 30 31 35 public abstract class AbstractSchedulerDataCollector 36 extends 37 AbstractDataCollector 38 { 39 private String virtualDatabaseName; 40 41 46 public AbstractSchedulerDataCollector(String virtualDatabaseName) 47 { 48 super(); 49 this.virtualDatabaseName = virtualDatabaseName; 50 } 51 52 55 public long collectValue() 56 { 57 VirtualDatabase vdb = ((Controller)controller).getVirtualDatabase( 58 virtualDatabaseName); 59 AbstractScheduler scheduler = vdb.getRequestManager().getScheduler(); 60 return this.getValue(scheduler); 61 } 62 63 69 public abstract long getValue(Object scheduler); 70 71 72 73 76 public String getTargetName() 77 { 78 return virtualDatabaseName; 79 } 80 } 81 | Popular Tags |