static boolean enable(final Host host) {
   if (!host.hasDatabase() || Bootstrap.isShuttingDown()) {
     return false;
   } else if (!Hosts.contains(host.getGroupsId())) {
     Hosts.remove(host.getGroupsId());
     return false;
   } else {
     if (host.isLocalHost()) {
       if (SyncState.SYNCING.set()) {
         try {
           runDbStateChange(ActivateHostFunction.INSTANCE.apply(host));
           SyncState.SYNCED.set();
           return true;
         } catch (LockTimeoutException ex) {
           SyncState.NOTSYNCED.set();
           return false;
         } catch (Exception ex) {
           SyncState.NOTSYNCED.set();
           LOG.error(ex);
           Logs.extreme().error(ex, ex);
           return false;
         }
       } else if (!SyncState.SYNCING.isCurrent()) {
         try {
           runDbStateChange(ActivateHostFunction.INSTANCE.apply(host));
           return true;
         } catch (LockTimeoutException ex) {
           return false;
         } catch (Exception ex) {
           LOG.error(ex);
           Logs.extreme().error(ex, ex);
           return false;
         }
       } else {
         try {
           runDbStateChange(ActivateHostFunction.INSTANCE.apply(host));
           SyncState.SYNCED.set();
           return true;
         } catch (LockTimeoutException ex) {
           SyncState.NOTSYNCED.set();
           return false;
         } catch (Exception ex) {
           SyncState.NOTSYNCED.set();
           LOG.error(ex, ex);
           return false;
         }
       }
     } else if (!ActiveHostSet.ACTIVATED.get().contains(host.getDisplayName())) {
       try {
         runDbStateChange(ActivateHostFunction.INSTANCE.apply(host));
         return true;
       } catch (LockTimeoutException ex) {
         return false;
       } catch (Exception ex) {
         Logs.extreme().debug(ex);
         ActivateHostFunction.rollback(host, ex);
         return false;
       }
     } else {
       return ActiveHostSet.ACTIVATED.get().contains(host.getDisplayName());
     }
   }
 }
 /** @return LockTimeoutException */
 public static Boolean isSynchronized() {
   return SyncState.SYNCED.isCurrent();
 }