Beispiel #1
0
 /**
  * Start the discovery of Provisioners
  *
  * @param dm The DiscoveryManagement to use
  * @throws IOException if discovery cannot be initialized
  * @throws ConfigurationException if the configuration cannot be used
  */
 void initializeProvisionDiscovery(DiscoveryManagement dm)
     throws IOException, ConfigurationException {
   ServiceTemplate template =
       new ServiceTemplate(null, new Class[] {ProvisionManager.class}, null);
   LookupCachePool lcPool = LookupCachePool.getInstance();
   lCache = lcPool.getLookupCache(dm, template);
   lCache.addListener(this);
 }
Beispiel #2
0
 /** Destroy the ServiceConsumer */
 void destroy() {
   try {
     adapter.getComputeResource().deleteObserver(computeResourceObserver);
     lCache.removeListener(this);
     cancelRegistrations();
     synchronized (provisioners) {
       provisioners.clear();
     }
   } finally {
     destroyed = true;
   }
 }
Beispiel #3
0
 /*
  * Remove a ProvisionManager from the collection
  */
 void removeProvisionManager(ProvisionManager pm, ServiceID sid) {
   lCache.discard(pm);
   synchronized (provisioners) {
     if (provisioners.remove(sid)) {
       if (logger.isLoggable(Level.INFO))
         logger.log(
             Level.INFO,
             "Dropping ProvisionManager, now connected "
                 + "to ["
                 + provisioners.size()
                 + "] "
                 + "ProvisionMonitor instances");
     }
   }
   cancelRegistration(pm);
 }
 private void removeLookupCache() {
   lookupCache.removeListener(this);
   lookupCache.terminate();
   if (clm != null) clm.terminate();
   // System.out.println("JAM LAUNCHER terminated " + key);
 }