package com.walker.store.task; import com.walker.store.Storeable; import com.walker.store.Task; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public abstract class AbstractTask implements Task { protected transient final Logger logger = LoggerFactory.getLogger(getClass()); public static final String DEFAULT_RESULT = "OK"; Storeable store = null; String name; // 任务名称 public AbstractTask(Storeable store, String name){ if(store == null){ throw new IllegalArgumentException("请先设置参数:'AbstractStore'"); } // this.reposityory = reposityory; // this.metaDataEngine = metaDataEngine; this.store = store; this.name = name; } public String getName() { return name; } // public class LogInfo { // private long spanTime = 0; // private int writeCount = 0; // // /** // * 返回本次日志的记录时间,秒 // * @return // */ // public long getSpanTime() { // return spanTime; // } // public LogInfo setSpanTime(long spanTime) { // this.spanTime = spanTime; // return this; // } // // /** // * 返回本次记录的采集数据量 // * @return // */ // public int getWriteCount() { // return writeCount; // } // public LogInfo setWriteCount(int writeCount) { // this.writeCount = writeCount; // return this; // } // // @Override // public String toString(){ // return new StringBuilder().append("[spanTime=").append(this.spanTime) // .append(", writeCount=").append(this.writeCount) // .append("]").toString(); // } // } }