Index: web-module/src/main/java/egovframework/api/arms/devicelist/batch/DeviceListBatch.java =================================================================== diff -u -rfdf914ee43e64db758ebff17b82063a9504d121e -rd6cfabcdbf63cc4fa4a8d0a6e732d6f11f09edd7 --- web-module/src/main/java/egovframework/api/arms/devicelist/batch/DeviceListBatch.java (.../DeviceListBatch.java) (revision fdf914ee43e64db758ebff17b82063a9504d121e) +++ web-module/src/main/java/egovframework/api/arms/devicelist/batch/DeviceListBatch.java (.../DeviceListBatch.java) (revision d6cfabcdbf63cc4fa4a8d0a6e732d6f11f09edd7) @@ -19,8 +19,8 @@ @Component public class DeviceListBatch { - //@Scheduled(fixedDelay=10000) - //@Scheduled(cron="*/30 * * * * *") + @Scheduled(fixedDelay=60000*5, initialDelay =10000) + //@Scheduled(cron="0 0/5 * * * ?") public void getInfoFromELK() throws Exception { HttpComponentsClientHttpRequestFactory factory = new HttpComponentsClientHttpRequestFactory(); factory.setReadTimeout(5000); // 읽기시간초과, ms Index: web-module/src/main/java/egovframework/api/arms/devicelist/service/DeviceListService.java =================================================================== diff -u -rfdf914ee43e64db758ebff17b82063a9504d121e -rd6cfabcdbf63cc4fa4a8d0a6e732d6f11f09edd7 --- web-module/src/main/java/egovframework/api/arms/devicelist/service/DeviceListService.java (.../DeviceListService.java) (revision fdf914ee43e64db758ebff17b82063a9504d121e) +++ web-module/src/main/java/egovframework/api/arms/devicelist/service/DeviceListService.java (.../DeviceListService.java) (revision d6cfabcdbf63cc4fa4a8d0a6e732d6f11f09edd7) @@ -3,9 +3,20 @@ import egovframework.api.arms.devicelist.vo.DeviceListDTO; import egovframework.com.ext.jstree.springHibernate.core.service.JsTreeHibernateService; +import java.util.HashSet; + /** * Created by Administrator on 2020-11-08. */ public interface DeviceListService extends JsTreeHibernateService { + //database jstree method 를 활용하여 full list를 얻어온다. -> 디비에 등록된 host full list + //elasticsearch api 를 활용해서 full list 를 얻어온다. -> ELK에 등록된 host full list + //차집합을 통해 디비에 등록할 리스트를 추린다. + //추려진 데이터를 jstree method api를 통해 업데이트 한다. + + public HashSet getDeviceListsFromJstree () throws Exception; + public HashSet getDeviceListsFromELK () throws Exception; + public HashSet getDeviceListDifferrence (HashSet jstreeDeviceList, HashSet elkDeviceLists) throws Exception; + public Integer updateDeviceListToJstree (HashSet updateTargets) throws Exception; } Index: web-module/src/main/java/egovframework/api/arms/devicelist/service/DeviceListServiceImpl.java =================================================================== diff -u -rfdf914ee43e64db758ebff17b82063a9504d121e -rd6cfabcdbf63cc4fa4a8d0a6e732d6f11f09edd7 --- web-module/src/main/java/egovframework/api/arms/devicelist/service/DeviceListServiceImpl.java (.../DeviceListServiceImpl.java) (revision fdf914ee43e64db758ebff17b82063a9504d121e) +++ web-module/src/main/java/egovframework/api/arms/devicelist/service/DeviceListServiceImpl.java (.../DeviceListServiceImpl.java) (revision d6cfabcdbf63cc4fa4a8d0a6e732d6f11f09edd7) @@ -6,6 +6,8 @@ import org.slf4j.LoggerFactory; import org.springframework.stereotype.Component; +import java.util.HashSet; + /** * Created by Administrator on 2020-11-08. */ @@ -14,4 +16,23 @@ private final Logger logger = LoggerFactory.getLogger(this.getClass()); + @Override + public HashSet getDeviceListsFromJstree() throws Exception { + return null; + } + + @Override + public HashSet getDeviceListsFromELK() throws Exception { + return null; + } + + @Override + public HashSet getDeviceListDifferrence(HashSet jstreeDeviceList, HashSet elkDeviceLists) throws Exception { + return null; + } + + @Override + public Integer updateDeviceListToJstree(HashSet updateTargets) throws Exception { + return null; + } }