Interface Thread.Builder.OfPlatform
- All Superinterfaces:
- Thread.Builder
- Enclosing interface:
- Thread.Builder
A builder for creating a platform 
Thread or ThreadFactory
 that creates platform threads.
  Unless otherwise specified, passing a null argument to a method in
 this interface causes a NullPointerException to be thrown.
- Since:
- 21
- See Also:
- 
Nested Class SummaryNested classes/interfaces declared in interface java.lang.Thread.BuilderThread.Builder.OfPlatform, Thread.Builder.OfVirtual
- 
Method SummaryModifier and TypeMethodDescriptiondefault Thread.Builder.OfPlatformdaemon()Sets the daemon status totrue.daemon(boolean on) Sets the daemon status.group(ThreadGroup group) Sets the thread group.inheritInheritableThreadLocals(boolean inherit) Sets whether the thread inherits the initial values of inheritable-thread-local variables from the constructing thread.Sets the thread name.Sets the thread name to be the concatenation of a string prefix and the string representation of a counter value.priority(int priority) Sets the thread priority.stackSize(long stackSize) Sets the desired stack size.Sets the uncaught exception handler.Methods declared in interface java.lang.Thread.Builderfactory, start, unstarted
- 
Method Details- 
nameDescription copied from interface:Thread.BuilderSets the thread name.- Specified by:
- namein interface- Thread.Builder
- Parameters:
- name- thread name
- Returns:
- this builder
 
- 
nameDescription copied from interface:Thread.BuilderSets the thread name to be the concatenation of a string prefix and the string representation of a counter value. The counter's initial value isstart. It is incremented after aThreadis created with this builder so that the next thread is named with the new counter value. AThreadFactorycreated with this builder is seeded with the current value of the counter. TheThreadFactoryincrements its copy of the counter afternewThreadis used to create aThread.- Specified by:
- namein interface- Thread.Builder
- Parameters:
- prefix- thread name prefix
- start- the starting value of the counter
- Returns:
- this builder
- Throws:
- IllegalArgumentException- if start is negative
 
- 
inheritInheritableThreadLocalsDescription copied from interface:Thread.BuilderSets whether the thread inherits the initial values of inheritable-thread-local variables from the constructing thread. The default is to inherit.- Specified by:
- inheritInheritableThreadLocalsin interface- Thread.Builder
- Parameters:
- inherit-- trueto inherit,- falseto not inherit
- Returns:
- this builder
 
- 
uncaughtExceptionHandlerDescription copied from interface:Thread.BuilderSets the uncaught exception handler.- Specified by:
- uncaughtExceptionHandlerin interface- Thread.Builder
- Parameters:
- ueh- uncaught exception handler
- Returns:
- this builder
 
- 
groupSets the thread group.- Parameters:
- group- the thread group
- Returns:
- this builder
 
- 
daemonSets the daemon status.- Parameters:
- on-- trueto create daemon threads
- Returns:
- this builder
 
- 
daemonSets the daemon status totrue.- Implementation Requirements:
- The default implementation invokes daemon(boolean) with
 a value of true.
- Returns:
- this builder
 
- 
prioritySets the thread priority.- Parameters:
- priority- priority
- Returns:
- this builder
- Throws:
- IllegalArgumentException- if the priority is less than- Thread.MIN_PRIORITYor greater than- Thread.MAX_PRIORITY
 
- 
stackSizeSets the desired stack size.The stack size is the approximate number of bytes of address space that the Java virtual machine is to allocate for the thread's stack. The effect is highly platform dependent and the Java virtual machine is free to treat the stackSizeparameter as a "suggestion". If the value is unreasonably low for the platform then a platform specific minimum may be used. If the value is unreasonably high then a platform specific maximum may be used. A value of zero is always ignored.- Parameters:
- stackSize- the desired stack size
- Returns:
- this builder
- Throws:
- IllegalArgumentException- if the stack size is negative
 
 
-