congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ThreadUtils
Code IndexAdd Tabnine to your IDE (free)

How to use
ThreadUtils
in
org.apache.karaf.util

Best Java code snippets using org.apache.karaf.util.ThreadUtils (Showing top 7 results out of 315)

origin: apache/karaf

public AutoEncryptionSupport(Map<String, Object> properties) {
  running = true;
  encryptionSupport = new EncryptionSupport(properties);
  executor = Executors.newSingleThreadExecutor(ThreadUtils.namedThreadFactory("encryption"));
  executor.execute(this);
}
origin: org.apache.karaf.jaas/org.apache.karaf.jaas.modules

public AutoEncryptionSupport(Map<String, Object> properties) {
  running = true;
  encryptionSupport = new EncryptionSupport(properties);
  executor = Executors.newSingleThreadExecutor(ThreadUtils.namedThreadFactory("encryption"));
  executor.execute(this);
}
origin: apache/karaf

/**
 * Main method to generate custom Karaf distribution using configuration provided with builder-like methods.
 * @throws Exception
 */
public void generateAssembly() throws Exception {
  if (javase == null) {
    throw new IllegalArgumentException("javase is not set");
  }
  if (homeDirectory == null) {
    throw new IllegalArgumentException("homeDirectory is not set");
  }
  try {
    executor = Executors.newScheduledThreadPool(8, ThreadUtils.namedThreadFactory("builder"));
    systemDirectory = homeDirectory.resolve("system");
    etcDirectory = homeDirectory.resolve("etc");
    doGenerateAssembly();
  } finally {
    if (executor != null) {
      executor.shutdownNow();
    }
  }
}
origin: org.apache.karaf.profile/org.apache.karaf.profile.core

/**
 * Main method to generate custom Karaf distribution using configuration provided with builder-like methods.
 * @throws Exception
 */
public void generateAssembly() throws Exception {
  if (javase == null) {
    throw new IllegalArgumentException("javase is not set");
  }
  if (homeDirectory == null) {
    throw new IllegalArgumentException("homeDirectory is not set");
  }
  try {
    executor = Executors.newScheduledThreadPool(8, ThreadUtils.namedThreadFactory("builder"));
    systemDirectory = homeDirectory.resolve("system");
    etcDirectory = homeDirectory.resolve("etc");
    doGenerateAssembly();
  } finally {
    if (executor != null) {
      executor.shutdownNow();
    }
  }
}
origin: apache/karaf

protected DownloadManager createDownloadManager() throws IOException {
  Dictionary<String, String> props = getMavenConfig();
  MavenResolver resolver = MavenResolvers.createMavenResolver(props, "org.ops4j.pax.url.mvn");
  ScheduledThreadPoolExecutor executor = new ScheduledThreadPoolExecutor(cfg.downloadThreads, ThreadUtils.namedThreadFactory("downloader"));
  executor.setMaximumPoolSize(cfg.downloadThreads);
  return DownloadManagers.createDownloadManager(resolver, executor, cfg.scheduleDelay, cfg.scheduleMaxRun);
}
origin: apache/karaf

public FeaturesServiceImpl(StateStorage storage,
              FeatureRepoFinder featureFinder,
              ConfigurationAdmin configurationAdmin,
              Resolver resolver,
              BundleInstallSupport installSupport,
              org.osgi.service.repository.Repository globalRepository,
              FeaturesServiceConfig cfg) {
  this.storage = storage;
  this.featureFinder = featureFinder;
  this.configurationAdmin = configurationAdmin;
  this.resolver = resolver;
  this.installSupport = installSupport;
  this.globalRepository = globalRepository;
  this.featuresProcessor = new FeaturesProcessorImpl(cfg);
  this.repositories = new RepositoryCacheImpl(featuresProcessor);
  this.cfg = cfg;
  this.executor = Executors.newSingleThreadExecutor(ThreadUtils.namedThreadFactory("features"));
  loadState();
  checkResolve();
}
origin: apache/karaf

    1L, TimeUnit.SECONDS,
    new LinkedBlockingQueue<>(),
    ThreadUtils.namedThreadFactory("resolver"));
Resolver resolver = new ResolverImpl(new Slf4jResolverLog(LoggerFactory.getLogger(ResolverImpl.class)), executorService);
URLStreamHandlerService mvnUrlHandler = getTrackedService(URLStreamHandlerService.class);
org.apache.karaf.utilThreadUtils

Most used methods

  • namedThreadFactory

Popular in Java

  • Reading from database using SQL prepared statement
  • getSupportFragmentManager (FragmentActivity)
  • requestLocationUpdates (LocationManager)
  • onRequestPermissionsResult (Fragment)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • JTextField (javax.swing)
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now