Ejemplo n.º 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;
 }
Ejemplo n.º 2
0
 public void reloadHosts() {
   adapter.getHosts();
 }