Package com.gi.server.core.service.mapservice

Examples of com.gi.server.core.service.mapservice.MapServicePool


      // Clear map instances
      HashMap<String, MapService> mapServices = ServiceManager.getMapServices();
      for(Iterator<Entry<String, MapService>> itr=mapServices.entrySet().iterator();itr.hasNext();){
        Entry<String, MapService> entry = itr.next();
        MapService mapService = entry.getValue();
        MapServicePool mapServicePool = mapService.getMapServicePool();
        mapServicePool.shrinkPool();
      }

    }
  }
View Full Code Here


          String name = entry.getKey();
          MapService mapService = entry.getValue();
          restBody += "<li>";
          restBody += "&nbsp;&nbsp;<b>" + name + "</b>";
          if (mapService.isStarted()) {
            MapServicePool pool = mapService.getMapServicePool();
            restBody += "&nbsp;&nbsp;Running("
                + pool.getWorkingInstanceCount() + ")";
            restBody += "&nbsp;&nbsp;Totle("
                + (pool.getWorkingInstanceCount() + pool
                    .getIdleInstanceCount()) + ")";
            restBody += "&nbsp;&nbsp;Max(" + pool.getMaxInstances()
                + ")";
            restBody += "&nbsp;&nbsp;[<a href='" + thisURI
                + "stop?service=map>" + name + "'>Stop</a>]";
            restBody += "&nbsp;&nbsp;[<a href='" + thisURI
                + "reload?service=map>" + name
                + "'>Reload</a>]";
            long startupSeconds = pool.getStartupTime() / 1000;
            long s = startupSeconds;
            long m = 0;
            long h = 0;
            long d = 0;
            if (s >= 60) {
View Full Code Here

  public static void removeMapServices() {
    for (Iterator<Entry<String, MapService>> itr = mapServices.entrySet()
        .iterator(); itr.hasNext();) {
      Entry<String, MapService> entry = itr.next();
      MapService mapService = entry.getValue();
      MapServicePool mapServicePool = mapService.getMapServicePool();
      mapServicePool.dispose();
    }

    mapServices.clear();
  }
View Full Code Here

TOP

Related Classes of com.gi.server.core.service.mapservice.MapServicePool

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.