Tabnine Logo
Executors.defaultThreadFactory
Code IndexAdd Tabnine to your IDE (free)

How to use
defaultThreadFactory
method
in
java.util.concurrent.Executors

Best Java code snippets using java.util.concurrent.Executors.defaultThreadFactory (Showing top 20 results out of 4,032)

Refine searchRefine arrow

  • ThreadFactory.newThread
origin: dropwizard/dropwizard

private static ThreadFactory buildThreadFactory(String nameFormat) {
  return r -> {
    final Thread thread = Executors.defaultThreadFactory().newThread(r);
    if (nameFormat != null) {
      thread.setName(String.format(Locale.ROOT, nameFormat, COUNT.incrementAndGet()));
    }
    return thread;
  };
}
origin: dropwizard/dropwizard

private static ThreadFactory buildThreadFactory(String nameFormat, boolean daemon) {
  return r -> {
    final Thread thread = Executors.defaultThreadFactory().newThread(r);
    if (nameFormat != null) {
      thread.setName(String.format(Locale.ROOT, nameFormat, COUNT.incrementAndGet()));
    }
    thread.setDaemon(daemon);
    return thread;
  };
}
origin: aws/aws-sdk-java

  @Override
  public Thread newThread(Runnable runnable) {
    Thread thread = Executors.defaultThreadFactory().newThread(runnable);
    thread.setDaemon(true);
    return thread;
  }
}
origin: apache/kylin

  @Override
  public Thread newThread(Runnable r) {
    Thread t = Executors.defaultThreadFactory().newThread(r);
    t.setDaemon(true);
    return t;
  }
}
origin: aws/aws-sdk-java

  public Thread newThread(Runnable r) {
    Thread t = Executors.defaultThreadFactory().newThread(r);
    t.setName("instance-profile-credentials-refresh");
    t.setDaemon(true);
    return t;
  }
});
origin: liyiorg/weixin-popular

  @Override
  public Thread newThread(Runnable arg0) {
    Thread thread = Executors.defaultThreadFactory().newThread(arg0);
    thread.setDaemon(true);
    return thread;
  }
});
origin: liyiorg/weixin-popular

  @Override
  public Thread newThread(Runnable arg0) {
    Thread thread = Executors.defaultThreadFactory().newThread(arg0);
    //设置守护线程
    thread.setDaemon(daemon);
    return thread;
  }
});
origin: deeplearning4j/nd4j

  @Override
  public Thread newThread(Runnable r) {
    Thread t = Executors.defaultThreadFactory().newThread(r);
    t.setDaemon(true);
    return t;
  }
});
origin: liyiorg/weixin-popular

  @Override
  public Thread newThread(Runnable arg0) {
    Thread thread = Executors.defaultThreadFactory().newThread(arg0);
    //设置守护线程
    thread.setDaemon(daemon);
    return thread;
  }
});
origin: oracle/opengrok

    @Override
    public Thread newThread(Runnable runnable) {
      Thread thread = Executors.defaultThreadFactory().newThread(runnable);
      thread.setName("invalidate-repos-" + thread.getId());
      return thread;
    }
});
origin: oracle/opengrok

  @Override
  public Thread newThread(Runnable runnable) {
    Thread thread = Executors.defaultThreadFactory().newThread(runnable);
    thread.setName("search-" + thread.getId());
    return thread;
  }
});
origin: apache/nifi

  @Override
  public Thread newThread(final Runnable r) {
    final Thread t = Executors.defaultThreadFactory().newThread(r);
    t.setName("Index Provenance Events");
    return t;
  }
});
origin: pentaho/pentaho-kettle

 public Thread newThread( Runnable r ) {
  Thread t = Executors.defaultThreadFactory().newThread( r );
  t.setDaemon( true );
  t.setName( CarteStatusCache.class.getSimpleName() );
  return t;
 }
} );
origin: apache/hive

 @Override
 public Thread newThread(Runnable r) {
  Thread t = Executors.defaultThreadFactory().newThread(r);
  t.setName("CachedStore-CacheUpdateService: Thread-" + t.getId());
  t.setDaemon(true);
  return t;
 }
});
origin: pentaho/pentaho-kettle

 @Override public Thread newThread( Runnable r ) {
  Thread thread = Executors.defaultThreadFactory().newThread( r );
  thread.setDaemon( true );
  thread.setName( SIMPLE_NAME + " thread " + threadNum.getAndIncrement() );
  return thread;
 }
} );
origin: apache/nifi

  @Override
  public Thread newThread(final Runnable r) {
    final Thread t = Executors.defaultThreadFactory().newThread(r);
    t.setName("Notification Service Dispatcher");
    t.setDaemon(true);
    return t;
  }
});
origin: apache/nifi

  @Override
  public Thread newThread(final Runnable runnable) {
    final Thread t = Executors.defaultThreadFactory().newThread(runnable);
    t.setDaemon(true);
    t.setName("NiFi Bootstrap Command Listener");
    return t;
  }
});
origin: apache/nifi

  @Override
  public Thread newThread(final Runnable r) {
    final Thread thread = Executors.defaultThreadFactory().newThread(r);
    thread.setName("Http Site-to-Site Transaction Maintenance");
    thread.setDaemon(true);
    return thread;
  }
});
origin: apache/nifi

  @Override
  public Thread newThread(final Runnable r) {
    final Thread thread = Executors.defaultThreadFactory().newThread(r);
    thread.setName("Variable Registry Update Thread");
    thread.setDaemon(true);
    return thread;
  }
});
origin: apache/nifi

  @Override
  public Thread newThread(final Runnable runnable) {
    final Thread t = Executors.defaultThreadFactory().newThread(runnable);
    t.setDaemon(true);
    t.setName("NiFi logging handler");
    return t;
  }
});
java.util.concurrentExecutorsdefaultThreadFactory

Javadoc

Returns a default thread factory used to create new threads. This factory creates all new threads used by an Executor in the same ThreadGroup. Each new thread is created as a non-daemon thread with priority set to the smaller of Thread.NORM_PRIORITY and the maximum priority permitted in the thread group. New threads have names accessible via Thread#getName of pool-N-thread-M, where N is the sequence number of this factory, and M is the sequence number of the thread created by this factory.

Popular methods of Executors

  • newFixedThreadPool
    Creates a thread pool that reuses a fixed number of threads operating off a shared unbounded queue,
  • newSingleThreadExecutor
    Creates an Executor that uses a single worker thread operating off an unbounded queue, and uses the
  • newCachedThreadPool
    Creates a thread pool that creates new threads as needed, but will reuse previously constructed thre
  • newSingleThreadScheduledExecutor
    Creates a single-threaded executor that can schedule commands to run after a given delay, or to exec
  • newScheduledThreadPool
    Creates a thread pool that can schedule commands to run after a given delay, or to execute periodica
  • callable
    Returns a Callable object that, when called, runs the given privileged exception action and returns
  • unconfigurableScheduledExecutorService
    Returns an object that delegates all defined ScheduledExecutorService methods to the given executor,
  • unconfigurableExecutorService
    Returns an object that delegates all defined ExecutorService methods to the given executor, but not
  • newWorkStealingPool
    Creates a thread pool that maintains enough threads to support the given parallelism level, and may
  • privilegedThreadFactory
    Legacy security code; do not use.
  • privilegedCallable
    Legacy security code; do not use.
  • privilegedCallableUsingCurrentClassLoader
    Legacy security code; do not use.
  • privilegedCallable,
  • privilegedCallableUsingCurrentClassLoader

Popular in Java

  • Finding current android device location
  • setScale (BigDecimal)
  • onCreateOptionsMenu (Activity)
  • getContentResolver (Context)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Best plugins for Eclipse
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