List of usage examples for java.lang ThreadGroup ThreadGroup
public ThreadGroup(String name)
From source file:org.siddhiesb.transport.passthru.workerpool.NativeWorkerPool.java
public NativeWorkerPool(int core, int max, int keepAlive, int queueLength, String threadGroupName, String threadGroupId) {//from w w w .j a v a 2 s.co m if (log.isDebugEnabled()) { log.debug("Using native util.concurrent package.."); } blockingQueue = (queueLength == -1 ? new LinkedBlockingQueue<Runnable>() : new LinkedBlockingQueue<Runnable>(queueLength)); executor = new PassThruThreadPoolExecutor(core, max, keepAlive, TimeUnit.SECONDS, blockingQueue, new NativeThreadFactory(new ThreadGroup(threadGroupName), threadGroupId)); }
From source file:org.apache.hedwig.server.proxy.HedwigProxy.java
public HedwigProxy(final ProxyConfiguration cfg, final UncaughtExceptionHandler exceptionHandler) { this.cfg = cfg; tg = new ThreadGroup("hedwigproxy") { @Override/*from w w w. j av a 2 s.com*/ public void uncaughtException(Thread t, Throwable e) { exceptionHandler.uncaughtException(t, e); } }; }
From source file:org.apache.pulsar.functions.runtime.ThreadRuntimeFactory.java
@VisibleForTesting public ThreadRuntimeFactory(String threadGroupName, PulsarClient pulsarClient, String storageServiceUrl, SecretsProvider secretsProvider, CollectorRegistry collectorRegistry) { this.secretsProvider = secretsProvider; this.fnCache = new FunctionCacheManagerImpl(); this.threadGroup = new ThreadGroup(threadGroupName); this.pulsarClient = pulsarClient; this.storageServiceUrl = storageServiceUrl; this.collectorRegistry = collectorRegistry; }
From source file:org.apache.axis2.transport.base.threads.NativeWorkerPool.java
public NativeWorkerPool(int core, int max, int keepAlive, int queueLength, String threadGroupName, String threadGroupId, BlockingQueue<Runnable> queue) { if (log.isDebugEnabled()) { log.debug("Using native util.concurrent package.."); }//ww w . ja v a 2s .co m if (queue == null) { blockingQueue = (queueLength == -1 ? new LinkedBlockingQueue<Runnable>() : new LinkedBlockingQueue<Runnable>(queueLength)); } else { blockingQueue = queue; } executor = new Axis2ThreadPoolExecutor(core, max, keepAlive, TimeUnit.SECONDS, blockingQueue, new NativeThreadFactory(new ThreadGroup(threadGroupName), threadGroupId)); }
From source file:org.novelang.outfit.shell.ProcessShell.java
protected ProcessShell(final File workingDirectory, final String nickname, final List<String> processArguments, final Predicate<String> startupSensor) { checkArgument(workingDirectory.isDirectory()); this.workingDirectory = workingDirectory; this.processArguments = processArguments == null ? NO_PARAMETERS : processArguments; this.startupSensor = checkNotNull(startupSensor); checkArgument(!StringUtils.isBlank(nickname)); this.nickname = nickname; threadGroup = new ThreadGroup(getClass().getSimpleName() + "-" + nickname); }
From source file:com.mnt.base.stream.comm.PacketProcessorManager.java
private void initProcessorThreads(int maxThreads) { processorThreadGroup = new ThreadGroup(PacketProcessorManager.class.getSimpleName()); processorThreadGroup.setDaemon(true); runningFlag = true;//w ww. ja v a 2 s .c o m Thread t = null; for (int i = 0; i < maxThreads; i++) { t = new Thread(processorThreadGroup, this); t.setDaemon(true); t.start(); } }
From source file:org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.RamDiskAsyncLazyPersistService.java
/** * Create a RamDiskAsyncLazyPersistService with a set of volumes (specified by their * root directories)./*from w w w . j a v a 2s .c o m*/ * * The RamDiskAsyncLazyPersistService uses one ThreadPool per volume to do the async * disk operations. */ RamDiskAsyncLazyPersistService(DataNode datanode) { this.datanode = datanode; this.threadGroup = new ThreadGroup(getClass().getSimpleName()); }
From source file:org.siddhiesb.transport.passthru.workerpool.NativeWorkerPool.java
public NativeWorkerPool(int core, int max, int keepAlive, int queueLength, String threadGroupName, String threadGroupId, BlockingQueue<Runnable> queue) { if (log.isDebugEnabled()) { log.debug("Using native util.concurrent package.."); }/*from ww w. j a v a 2s . c om*/ if (queue == null) { blockingQueue = (queueLength == -1 ? new LinkedBlockingQueue<Runnable>() : new LinkedBlockingQueue<Runnable>(queueLength)); } else { blockingQueue = queue; } executor = new PassThruThreadPoolExecutor(core, max, keepAlive, TimeUnit.SECONDS, blockingQueue, new NativeThreadFactory(new ThreadGroup(threadGroupName), threadGroupId)); }
From source file:com.cohesionforce.dis.ConvertCSV.java
public ConvertCSV() { threadGroup = new ThreadGroup("LoggerThreads"); }
From source file:net.wimpi.telnetd.net.ConnectionManager.java
public ConnectionManager() { m_ThreadGroup = new ThreadGroup( new StringBuffer().append(this.toString()).append("Connections").toString()); m_ClosedConnections = new Stack(); m_OpenConnections = Collections.synchronizedList(new ArrayList(100)); }