Presto实现定时从配置文件读取配置

使用guava的memoizeWithExpiration方法

ForwardingSystemAccessControl.of(memoizeWithExpiration(
        () -> {
            log.info("Refreshing system access control from %s", configFileName);
            return create(configFileName);
        },
        refreshPeriod.toMillis(),
        MILLISECONDS));

 

posted @ 2020-04-21 17:17  码以致用  阅读(425)  评论(0编辑  收藏  举报