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

How to use
Runnable
in
java.lang

Best Java code snippets using java.lang.Runnable (Showing top 20 results out of 44,271)

origin: ReactiveX/RxJava

  @Override
  public T call() throws Exception {
    runnable.run();
    return null;
  }
}
origin: google/guava

@Override
public void setUp() throws Exception {
 if (setUp != null) {
  setUp.run();
 }
}
origin: google/guava

 @Override
 public void run() {
  task.run();
 }
};
origin: google/guava

 @Override
 public Void call() throws Exception {
  combiner.run();
  return null;
 }
},
origin: google/guava

@Override
public void tearDown() throws Exception {
 if (tearDown != null) {
  tearDown.run();
 }
}
origin: spring-projects/spring-framework

/**
 * Save model attributes in the session based on a type-level declarations
 * in an {@code @SessionAttributes} annotation.
 */
public void saveModel() {
  if (this.saveModelOperation != null) {
    this.saveModelOperation.run();
  }
}
origin: spring-projects/spring-framework

private void invoke(List<Runnable> callbacks) {
  for (Runnable runnable : callbacks) {
    try {
      runnable.run();
    }
    catch (Throwable ex) {
      // ignore
    }
  }
}
origin: spring-projects/spring-framework

private void decreaseActiveInvokerCount() {
  activeInvokerCount--;
  if (stopCallback != null && activeInvokerCount == 0) {
    stopCallback.run();
    stopCallback = null;
  }
}
origin: spring-projects/spring-framework

/**
 * Delegates execution to the underlying Runnable.
 */
@Override
public void run() {
  this.delegate.run();
}
origin: ReactiveX/RxJava

void doTerminate() {
  Runnable r = onTerminate.getAndSet(null);
  if (r != null) {
    r.run();
  }
}
origin: ReactiveX/RxJava

void doTerminate() {
  Runnable r = onTerminate.get();
  if (r != null && onTerminate.compareAndSet(r, null)) {
    r.run();
  }
}
origin: spring-projects/spring-framework

/**
 * Invoke all registered destruction callbacks.
 * To be called on ServletContext shutdown.
 * @see org.springframework.web.context.ContextCleanupListener
 */
@Override
public void destroy() {
  for (Runnable runnable : this.destructionCallbacks.values()) {
    runnable.run();
  }
  this.destructionCallbacks.clear();
}
origin: spring-projects/spring-framework

public void addDispatchHandler(Runnable handler) {
  Assert.notNull(handler, "Dispatch handler must not be null");
  synchronized (this) {
    if (this.dispatchedPath == null) {
      this.dispatchHandlers.add(handler);
    }
    else {
      handler.run();
    }
  }
}
origin: iluwatar/java-design-patterns

private void processPendingCommands() {
 Iterator<Runnable> iterator = pendingCommands.iterator();
 while (iterator.hasNext()) {
  Runnable command = iterator.next();
  command.run();
  iterator.remove();
 }
}
origin: ReactiveX/RxJava

@Override
public void run() {
  runner = Thread.currentThread();
  try {
    decoratedRun.run();
  } finally {
    dispose();
    runner = null;
  }
}
origin: ReactiveX/RxJava

  @Override
  public void execute(Runnable r) {
    r.run();
  }
}, true);
origin: ReactiveX/RxJava

  @Override
  public Void call() throws Exception {
    runner = Thread.currentThread();
    try {
      runnable.run();
    } finally {
      lazySet(FINISHED);
      runner = null;
    }
    return null;
  }
}
origin: ReactiveX/RxJava

  @Override
  public void execute(Runnable r) {
    r.run();
  }
}, true);
origin: ReactiveX/RxJava

  @Override
  public void execute(Runnable r) {
    r.run();
  }
});
origin: ReactiveX/RxJava

  @Override
  public void run() {
    try {
      action.run();
    } finally {
      actionCompletable.onComplete();
    }
  }
}
java.langRunnable

Javadoc

Represents a command that can be executed. Often used to run code in a different Thread.

Most used methods

  • run
    Starts executing the active part of the class' code. This method is called when a thread is started
  • <init>

Popular in Java

  • Running tasks concurrently on multiple threads
  • getSharedPreferences (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • getExternalFilesDir (Context)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • CodeWhisperer alternatives
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