Search in sources :

Example 1 with CacheInfo

use of com.xiaomi.linden.thrift.common.CacheInfo in project linden by XiaoMi.

the class CoreLindenServiceImpl method getServiceInfo.

@Override
public Future<LindenServiceInfo> getServiceInfo() {
    return instanceExecutorPool.apply(new Function0<LindenServiceInfo>() {

        @Override
        public LindenServiceInfo apply() {
            LindenServiceInfo serviceInfo;
            try {
                serviceInfo = lindenCore.getServiceInfo();
                CacheInfo cacheInfo = lindenCluster.getCacheInfo();
                serviceInfo.setCacheInfo(cacheInfo);
            } catch (Exception e) {
                serviceInfo = new LindenServiceInfo();
                LOGGER.error("get service info failed : {}", Throwables.getStackTraceAsString(e));
            }
            return serviceInfo;
        }
    });
}
Also used : LindenServiceInfo(com.xiaomi.linden.thrift.common.LindenServiceInfo) CacheInfo(com.xiaomi.linden.thrift.common.CacheInfo) IOException(java.io.IOException)

Aggregations

CacheInfo (com.xiaomi.linden.thrift.common.CacheInfo)1 LindenServiceInfo (com.xiaomi.linden.thrift.common.LindenServiceInfo)1 IOException (java.io.IOException)1