1 25 26 package org.jrobin.core; 27 28 import java.io.IOException ; 29 30 abstract class DataImporter { 31 32 abstract String getVersion() throws RrdException, IOException ; 34 abstract long getLastUpdateTime() throws RrdException, IOException ; 35 abstract long getStep() throws RrdException, IOException ; 36 abstract int getDsCount() throws RrdException, IOException ; 37 abstract int getArcCount() throws RrdException, IOException ; 38 39 abstract String getDsName(int dsIndex) throws RrdException, IOException ; 41 abstract String getDsType(int dsIndex) throws RrdException, IOException ; 42 abstract long getHeartbeat(int dsIndex) throws RrdException, IOException ; 43 abstract double getMinValue(int dsIndex) throws RrdException, IOException ; 44 abstract double getMaxValue(int dsIndex) throws RrdException, IOException ; 45 46 abstract double getLastValue(int dsIndex) throws RrdException, IOException ; 48 abstract double getAccumValue(int dsIndex) throws RrdException, IOException ; 49 abstract long getNanSeconds(int dsIndex) throws RrdException, IOException ; 50 51 abstract String getConsolFun(int arcIndex) throws RrdException, IOException ; 53 abstract double getXff(int arcIndex) throws RrdException, IOException ; 54 abstract int getSteps(int arcIndex) throws RrdException, IOException ; 55 abstract int getRows(int arcIndex) throws RrdException, IOException ; 56 57 abstract double getStateAccumValue(int arcIndex, int dsIndex) throws RrdException, IOException ; 59 abstract int getStateNanSteps(int arcIndex, int dsIndex) throws RrdException, IOException ; 60 abstract double[] getValues(int arcIndex, int dsIndex) throws RrdException, IOException ; 61 62 long getEstimatedSize() throws RrdException, IOException { 63 int dsCount = getDsCount(); 64 int arcCount = getArcCount(); 65 int rowCount = 0; 66 for(int i = 0; i < arcCount; i++) { 67 rowCount += getRows(i); 68 } 69 return RrdDef.calculateSize(dsCount, arcCount, rowCount); 70 } 71 72 void release() throws RrdException, IOException { 73 } 75 76 } | Popular Tags |