コード例 #1
0
 // requires synchronization between host platform and db.
 public List<Host> loadFromPlatform() {
   List<Host> hosts = adapter.getHosts();
   List<Engine> engines = adapter.bindEngineAndHost(engineService.getAllEngines(), hosts);
   _pm.beginTransaction();
   engines.stream().forEach(e -> _pm.exec(e, HibernateEngine.DB_UPDATE));
   hosts.stream().forEach(h -> _pm.exec(h, HibernateEngine.DB_UPDATE));
   _pm.commit();
   return hosts;
 }
コード例 #2
0
 public void reloadHosts() {
   adapter.getHosts();
 }