package cc.smtweb.framework.core.mvc.scheduler;

import cc.smtweb.framework.core.common.SwMap;

/**
 * 定时器断点数据
 *
 * @author xkliu
 */
public class SchedulerPoint {
    SwMap value;
    boolean changed;
    boolean insert;

    public SchedulerPoint() {
        insert = true;
        value = new SwMap();
    }

    public SchedulerPoint(SwMap value) {
        this.value = value;
    }

    public Object get(String key) {
        return value.get(key);
    }

    public Long readLong(String key) {
        return value.readLong(key);
    }

    public Long readLong(String key, Long defaultValue) {
        return value.readLong(key, defaultValue);
    }

    public SchedulerPoint put(String key, Object value) {
        this.value.put(key, value);
        this.changed = true;

        return this;
    }
}
