Tabnine Logo
Thread.getName
Code IndexAdd Tabnine to your IDE (free)

How to use
getName
method
in
java.lang.Thread

Best Java code snippets using java.lang.Thread.getName (Showing top 20 results out of 23,760)

origin: iluwatar/java-design-patterns

 @Override
 public void run() {
  LOGGER.info("{} processing {}", Thread.currentThread().getName(), task.toString());
  try {
   Thread.sleep(task.getTimeMs());
  } catch (InterruptedException e) {
   e.printStackTrace();
  }
 }
}
origin: ReactiveX/RxJava

  @Override
  public void accept(Throwable e) throws Exception {
    name[0] = Thread.currentThread().getName();
  }
})
origin: ReactiveX/RxJava

  @Override
  public void run() throws Exception {
    name[0] = Thread.currentThread().getName();
  }
})
origin: ReactiveX/RxJava

  @Override
  public String apply(Integer v) throws Exception {
    return v + ": " + Thread.currentThread().getName();
  }
})
origin: ReactiveX/RxJava

  @Override
  public void run() throws Exception {
    name[0] = Thread.currentThread().getName();
    cdl.countDown();
  }
})
origin: ReactiveX/RxJava

  @Override
  public Object apply(Integer v) throws Exception {
    return Thread.currentThread().getName().substring(0, 4);
  }
}),
origin: ReactiveX/RxJava

  @Override
  public Object apply(Integer v) throws Exception {
    return Thread.currentThread().getName().substring(0, 4);
  }
}),
origin: ReactiveX/RxJava

  @Override
  public Object apply(Integer v) throws Exception {
    return Thread.currentThread().getName().substring(0, 4);
  }
})
origin: ReactiveX/RxJava

  @Override
  public void run() throws Exception {
    name[0] = Thread.currentThread().getName();
    cdl.countDown();
  }
})
origin: ReactiveX/RxJava

  @Override
  public Object apply(Integer v) throws Exception {
    return Thread.currentThread().getName().substring(0, 4);
  }
})
origin: ReactiveX/RxJava

  @Override
  public Object apply(Integer v) throws Exception {
    return Thread.currentThread().getName().substring(0, 4);
  }
}),
origin: ReactiveX/RxJava

@Override
public void onComplete() {
  name.set(Thread.currentThread().getName());
  cdl.countDown();
}
origin: ReactiveX/RxJava

  @Override
  public void accept(Integer t) {
    System.out.println("Thread: " + Thread.currentThread().getName());
    System.out.println("t: " + t);
    count.incrementAndGet();
  }
});
origin: ReactiveX/RxJava

  @Override
  public void onError(Throwable e) {
    name.set(Thread.currentThread().getName());
    err.set(e);
    cdl.countDown();
  }
});
origin: ReactiveX/RxJava

  @Override
  public String apply(Integer t) {
    assertTrue(Thread.currentThread().getName().equals(currentThreadName));
    return "Value_" + t + "_Thread_" + Thread.currentThread().getName();
  }
});
origin: ReactiveX/RxJava

@Override
public void accept(String s) {
  String threadName = Thread.currentThread().getName();
  System.out.println("Source ThreadName: " + threadName + "  Expected => " + parentThreadName);
  assertEquals(parentThreadName, threadName);
}
origin: ReactiveX/RxJava

@Override
public void accept(String s) {
  String threadName = Thread.currentThread().getName();
  System.out.println("Source ThreadName: " + threadName + "  Expected => " + parentThreadName);
  assertEquals(parentThreadName, threadName);
}
origin: ReactiveX/RxJava

  @Override
  public void subscribe(CompletableObserver observer) {
    name.set(Thread.currentThread().getName());
    EmptyDisposable.complete(observer);
  }
}).subscribeOn(Schedulers.computation());
origin: ReactiveX/RxJava

@Before
public void before() {
  stringObserver = TestHelper.mockObserver();
  for (Thread t : Thread.getAllStackTraces().keySet()) {
    if (t.getName().startsWith("RxNewThread")) {
      count++;
    }
  }
}
origin: ReactiveX/RxJava

@Before
public void before() {
  stringSubscriber = TestHelper.mockSubscriber();
  for (Thread t : Thread.getAllStackTraces().keySet()) {
    if (t.getName().startsWith("RxNewThread")) {
      count++;
    }
  }
}
java.langThreadgetName

Javadoc

Returns this thread's name.

Popular methods of Thread

  • currentThread
  • sleep
    Causes the currently executing thread to sleep (temporarily cease execution) for the specified numbe
  • <init>
    Constructs a new Thread with no Runnable object, the given name and belonging to the ThreadGroup pas
  • start
    Causes this thread to begin execution; the Java Virtual Machine calls the run method of this thread
  • getContextClassLoader
    Returns the context ClassLoader for this Thread. The context ClassLoader is provided by the creator
  • interrupt
    Interrupts this thread. Unless the current thread is interrupting itself, which is always permitted,
  • setDaemon
    Marks this thread as either a #isDaemon thread or a user thread. The Java Virtual Machine exits when
  • join
    Waits at most millis milliseconds plus nanos nanoseconds for this thread to die. This implementatio
  • setContextClassLoader
    Sets the context ClassLoader for this Thread. The context ClassLoader can be set when a thread is cr
  • setName
    Changes the name of this thread to be equal to the argumentname. First the checkAccess method of thi
  • interrupted
    Tests whether the current thread has been interrupted. Theinterrupted status of the thread is cleare
  • getStackTrace
    Returns an array of stack trace elements representing the stack dump of this thread. This method wil
  • interrupted,
  • getStackTrace,
  • getId,
  • isInterrupted,
  • isAlive,
  • setPriority,
  • yield,
  • getThreadGroup,
  • getPriority

Popular in Java

  • Reactive rest calls using spring rest template
  • onRequestPermissionsResult (Fragment)
  • setScale (BigDecimal)
  • scheduleAtFixedRate (Timer)
  • Socket (java.net)
    Provides a client-side TCP socket.
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • JComboBox (javax.swing)
  • Runner (org.openjdk.jmh.runner)
  • Top Sublime Text 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