Tabnine Logo
BackgroundExecutor
Code IndexAdd Tabnine to your IDE (free)

How to use
BackgroundExecutor
in
ch.cyberduck.core.threading

Best Java code snippets using ch.cyberduck.core.threading.BackgroundExecutor (Showing top 2 results out of 315)

origin: iterate-ch/cyberduck

/**
 * Will queue up the <code>BackgroundAction</code> to be run in a background thread
 *
 * @param action The runnable to execute in a secondary thread
 */
@Override
public <T> Future<T> background(final BackgroundAction<T> action) {
  if(registry.contains(action)) {
    log.warn(String.format("Skip duplicate background action %s found in registry", action));
    return ConcurrentUtils.constantFuture(null);
  }
  return DefaultBackgroundExecutor.get().execute(this, registry, action);
}
origin: iterate-ch/cyberduck

/**
 * Quits the Rendezvous daemon and saves all preferences
 *
 * @param notification Notification name
 */
@Override
public void applicationWillTerminate(NSNotification notification) {
  if(log.isDebugEnabled()) {
    log.debug(String.format("Application will quit with notification %s", notification));
  }
  this.invalidate();
  // Clear temporary files
  TemporaryFileServiceFactory.get().shutdown();
  //Terminating rendezvous discovery
  RendezvousFactory.instance().quit();
  // Remove notifications from center
  NotificationServiceFactory.get().unregister();
  // Disable update
  updater.unregister();
  //Writing usage info
  preferences.setProperty("uses", preferences.getInteger("uses") + 1);
  preferences.save();
  DefaultBackgroundExecutor.get().shutdown();
}
ch.cyberduck.core.threadingBackgroundExecutor

Most used methods

  • execute
  • shutdown
    Close thread pool

Popular in Java

  • Reading from database using SQL prepared statement
  • getApplicationContext (Context)
  • getExternalFilesDir (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • Path (java.nio.file)
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Best IntelliJ 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