class PollableInfoWrapper extends InfoWrapper {

    public boolean isAutoPolledAllowed(long stepMills) {
        if (suggestion == null) {
            return true;
        }
        if (suggestion == AutoPollSuggestion.NEVEL_AUTO_POLL) {
            return false;
        }
        //        if (suggestion == AutoPollSuggestion.POLL_ONCE) {
        //            if (lastPolledTime > 0) {
        //                return false;
        //            }
        //            lastPolledTime = clock.wallTime();//第一次执行后的时间
        //            return true;
        //        }
        if (suggestion == AutoPollSuggestion.POLL_WHEN_UPDATED) {
            //最近发生更新了
            if (lastPolledTime <= ((AutoPollFriendlyInfo) info).lastModifiedTime()) {
                lastPolledTime = clock.wallTime();
                return true;
            }
            return false;
        }

        if (suggestion.intervalMills() < stepMills) {
            return true;//忽略建议间隔
        }
        // 默认会有小于step的误差；
        if (lastPolledTime <= 0
            || (clock.wallTime() - lastPolledTime >= suggestion.intervalMills())) {
            lastPolledTime = clock.wallTime();
            return true;
        }
        return false;
    }

    public  PollableInfoWrapper(Id id, Info info, Clock clock);

}