private SharedDeployment createNewDeployment(GridDeploymentMetadata meta,boolean isCache){
  assert Thread.holdsLock(mux);
  assert meta.parentLoader() == null;
  IgniteUuid ldrId=IgniteUuid.fromUuid(ctx.localNodeId());
  GridDeploymentClassLoader clsLdr;
  if (meta.deploymentMode() == CONTINUOUS || meta.participants() == null) {
    clsLdr=new GridDeploymentClassLoader(ldrId,meta.userVersion(),meta.deploymentMode(),false,ctx,ctx.config().getClassLoader() != null ? ctx.config().getClassLoader() : U.gridClassLoader(),meta.classLoaderId(),meta.senderNodeId(),comm,ctx.config().getNetworkTimeout(),log,ctx.config().getPeerClassLoadingLocalClassPathExclude(),ctx.config().getPeerClassLoadingMissedResourcesCacheSize(),meta.deploymentMode() == CONTINUOUS,false);
    if (meta.participants() != null)     for (    Map.Entry<UUID,IgniteUuid> e : meta.participants().entrySet())     clsLdr.register(e.getKey(),e.getValue());
    if (log.isDebugEnabled())     log.debug("Created class loader in CONTINUOUS mode or without participants " + "[ldr=" + clsLdr + ", meta="+ meta+ ']');
  }
 else {
    assert meta.deploymentMode() == SHARED;
    clsLdr=new GridDeploymentClassLoader(ldrId,meta.userVersion(),meta.deploymentMode(),false,ctx,U.gridClassLoader(),meta.participants(),comm,ctx.config().getNetworkTimeout(),log,ctx.config().getPeerClassLoadingLocalClassPathExclude(),ctx.config().getPeerClassLoadingMissedResourcesCacheSize(),false,false);
    if (log.isDebugEnabled())     log.debug("Created classloader in SHARED mode with participants " + "[ldr=" + clsLdr + ", meta="+ meta+ ']');
  }
  SharedDeployment dep=new SharedDeployment(meta.deploymentMode(),clsLdr,ldrId,meta.userVersion(),meta.alias());
  if (log.isDebugEnabled())   log.debug("Created new deployment: " + dep);
  if (isCache) {
    List<SharedDeployment> deps=F.addIfAbsent(cache,meta.userVersion(),new LinkedList<SharedDeployment>());
    assert deps != null;
    deps.add(dep);
    if (log.isDebugEnabled())     log.debug("Added deployment to cache: " + cache);
  }
  return dep;
}

private SharedDeployment createNewDeployment ( GridDeploymentMetadata meta , boolean isCache ) { assert Thread . holdsLock ( mux ) ; assert meta . parentLoader ( ) == null ; IgniteUuid ldrId = IgniteUuid . fromUuid ( ctx . localNodeId ( ) ) ; GridDeploymentClassLoader clsLdr ; if ( meta . deploymentMode ( ) == CONTINUOUS || meta . participants ( ) == null ) { clsLdr = new GridDeploymentClassLoader ( ldrId , meta . userVersion ( ) , meta . deploymentMode ( ) , false , ctx , ctx . config ( ) . getClassLoader ( ) != null ? ctx . config ( ) . getClassLoader ( ) : U . gridClassLoader ( ) , meta . classLoaderId ( ) , meta . senderNodeId ( ) , comm , ctx . config ( ) . getNetworkTimeout ( ) , log , ctx . config ( ) . getPeerClassLoadingLocalClassPathExclude ( ) , ctx . config ( ) . getPeerClassLoadingMissedResourcesCacheSize ( ) , meta . deploymentMode ( ) == CONTINUOUS , false ) ; if ( meta . participants ( ) != null ) for ( Map . Entry < UUID , IgniteUuid > e : meta . participants ( ) . entrySet ( ) ) clsLdr . register ( e . getKey ( ) , e . getValue ( ) ) ; if ( log . isDebugEnabled ( ) ) log . debug ( "Created class loader in CONTINUOUS mode or without participants " + "[ldr=" + clsLdr + ", meta=" + meta + ']' ) ; } else { assert meta . deploymentMode ( ) == SHARED ; clsLdr = new GridDeploymentClassLoader ( ldrId , meta . userVersion ( ) , meta . deploymentMode ( ) , false , ctx , U . gridClassLoader ( ) , meta . participants ( ) , comm , ctx . config ( ) . getNetworkTimeout ( ) , log , ctx . config ( ) . getPeerClassLoadingLocalClassPathExclude ( ) , ctx . config ( ) . getPeerClassLoadingMissedResourcesCacheSize ( ) , false , false ) ; if ( log . isDebugEnabled ( ) ) log . debug ( "Created classloader in SHARED mode with participants " + "[ldr=" + clsLdr + ", meta=" + meta + ']' ) ; } SharedDeployment dep = new SharedDeployment ( meta . deploymentMode ( ) , clsLdr , ldrId , meta . userVersion ( ) , meta . alias ( ) ) ; if ( log . isDebugEnabled ( ) ) log . debug ( "Created new deployment: " + dep ) ; if ( isCache ) { List < SharedDeployment > deps = F . addIfAbsent ( cache , meta . userVersion ( ) , new LinkedList < SharedDeployment > ( ) ) ; assert deps != null ; deps . add ( dep ) ; if ( log . isDebugEnabled ( ) ) log . debug ( "Added deployment to cache: " + cache ) ; } return dep ; }
creates and caches new deployment .
