public class ConcurrencyTools
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.lang.Object |
evaluateFuture(java.util.concurrent.Future future,
org.apache.log4j.Logger logger,
boolean doThrow,
java.lang.String text)
Blocks until all passed Futures have completed.
|
static java.lang.Object |
evaluateFuture(java.util.concurrent.Future future,
org.apache.log4j.Logger logger,
boolean doThrow,
java.lang.String progressStart,
java.lang.String progress,
java.lang.String progressFinish)
Blocks until the passed Future has completed.
|
static java.util.List<java.lang.Object> |
evaluateFutures(java.util.List<java.util.concurrent.Future> futures,
org.apache.log4j.Logger logger,
boolean doThrow,
java.lang.String text)
Blocks until all passed Futures have completed.
|
static java.util.List<java.lang.Object> |
evaluateFutures(java.util.List<java.util.concurrent.Future> futures,
org.apache.log4j.Logger logger,
boolean doThrow,
java.lang.String progressStart,
java.lang.String progress,
java.lang.String progressFinish)
Blocks until all passed Futures have completed.
|
static int |
getReasonableParallelity()
Returns the number of parallel tasks the system can handle without overloading,
based on the number of available processors and predefined rules to reserve CPUs
for system tasks.
|
public static final int getReasonableParallelity()
Note: This is an idealized number assuming minimal other parallel work on the system.
Rules for parallel task calculation:
public static final java.lang.Object evaluateFuture(java.util.concurrent.Future future, org.apache.log4j.Logger logger, boolean doThrow, java.lang.String progressStart, java.lang.String progress, java.lang.String progressFinish)
public static final java.lang.Object evaluateFuture(java.util.concurrent.Future future, org.apache.log4j.Logger logger, boolean doThrow, java.lang.String text)
public static final java.util.List<java.lang.Object> evaluateFutures(java.util.List<java.util.concurrent.Future> futures, org.apache.log4j.Logger logger, boolean doThrow, java.lang.String progressStart, java.lang.String progress, java.lang.String progressFinish)
public static final java.util.List<java.lang.Object> evaluateFutures(java.util.List<java.util.concurrent.Future> futures, org.apache.log4j.Logger logger, boolean doThrow, java.lang.String text)
Copyright © 2000-2025 OAshi S.à r.l. All Rights Reserved.