@Generated(value="config_generator.py") public class RuntimeConfig extends AbstractRuntimeConfig
Modifier and Type | Class and Description |
---|---|
static class |
RuntimeConfig.Field
Fields of PGX Runtime Config
|
Modifier and Type | Method and Description |
---|---|
ArrayFactoryStrategy |
getArrayFactoryStrategy()
java_arrays = use normal java arrays only (limited to 32bit in length)
java_2d_arrays = use Java 2D arrays only (achieve arrays of 64bit in length with the cost of indirection) off_heap_arrays = use arrays allocated off-heap (achieve 64bit in length without performance penalty, but with the price of breaking out of the JVM) dynamic = decide at run-time which allocation strategy to use based on the requested array length |
Integer |
getBfsThresholdReadBased()
threshold of BFS traversal level items to switch to read-based visiting strategy
|
Integer |
getBfsThresholdSingleThreaded()
until what number of BFS traversal level items vertices are visited single-threaded
|
Charset |
getCharset()
Gets the charset.
|
Integer |
getCniDiffFactorDefault()
default diff factor value used in the common neighbor iterator implementations.
|
Integer |
getCniSmallDefault()
default value used in the common neighbor iterator implementations, to indicate below which threshold a subarray is considered small.
|
Integer |
getCniStopRecursionDefault()
default value used in the common neighbor iterator implementations, to indicate the minimum size where the binary search approach is applied.
|
Integer |
getDfsThresholdLarge()
value that determines at which number of visited vertices the DFS implementation will switch to data-structures that are more optimized for larger numbers of vertices.
|
ArrayFactoryStrategy |
getLargeArrayStrategy()
[relevant for dynamic array factory only] array factory strategy to use when requested array size is exceeding large_array_threshold
|
Integer |
getLargeArrayThreshold()
[relevant for dynamic array factory only] use large_array_strategy when requested array size is exceeding this number.
|
Integer |
getMaxOffHeapSize()
maximum amount of off-heap memory PGX is allowed to allocate in megabytes, before an OutOfMemoryError will be thrown.
|
Integer |
getNumSpinLocks()
how many spin locks each generated app will create at instantiation.
|
Integer |
getParallelism()
number of worker threads to be used in thread pool.
|
ParallelizationStrategy |
getParallelizationStrategy()
which parallelization strategy to use.
|
Integer |
getSmallTaskLength()
task length if total amount of work is small than default task length (only relevant for task-stealing strategies)
|
Integer |
getTaskLength()
default task length (only relevant for task-stealing strategies).
|
Map<RuntimeConfig.Field,Object> |
getValues()
Gets the parsed values.
|
Map<RuntimeConfig.Field,Object> |
getValuesWithoutDefaults()
Gets the values without defaults.
|
boolean |
hasDefaultValue(RuntimeConfig.Field field)
Checks for default value.
|
Boolean |
isExplicitSpinLocks()
true means spin explicitly in a loop until lock becomes available. |
Boolean |
isUseStringPool()
If
true , PGX will store string properties in a pool in order to consume less memory on string properties |
static RuntimeConfig |
parse(InputStream is, boolean strict, File parent)
Parses an input stream.
|
static RuntimeConfig |
parse(Map<String,Object> raw, boolean strict, File parent)
Parses a raw key/value mapping.
|
static RuntimeConfig |
parse(Properties props, boolean strict)
Parses a properties file.
|
String |
toString() |
get, init, init, init, isInitialized, reset
setSerializable
public ArrayFactoryStrategy getArrayFactoryStrategy()
public Integer getBfsThresholdReadBased()
public Integer getBfsThresholdSingleThreaded()
public Charset getCharset()
public Integer getCniDiffFactorDefault()
public Integer getCniSmallDefault()
public Integer getCniStopRecursionDefault()
public Integer getDfsThresholdLarge()
public ArrayFactoryStrategy getLargeArrayStrategy()
public Integer getLargeArrayThreshold()
Integer.MAX_VALUE - 3
)public Integer getMaxOffHeapSize()
public Integer getNumSpinLocks()
public Integer getParallelism()
public ParallelizationStrategy getParallelizationStrategy()
public Integer getSmallTaskLength()
public Integer getTaskLength()
public Map<RuntimeConfig.Field,Object> getValues()
public Map<RuntimeConfig.Field,Object> getValuesWithoutDefaults()
public boolean hasDefaultValue(RuntimeConfig.Field field)
field
- the fieldpublic Boolean isExplicitSpinLocks()
true
means spin explicitly in a loop until lock becomes available. false
means using JDK locks which rely on the JVM to decide whether to context switch or spin. Our experiments showed that setting this value to true
results in better performance.public Boolean isUseStringPool()
true
, PGX will store string properties in a pool in order to consume less memory on string propertiespublic static RuntimeConfig parse(InputStream is, boolean strict, File parent) throws IOException
is
- the input streamstrict
- if true, parses in strict modeparent
- if not null, resolves relative paths against this parentIOException
- Signals that an I/O exception has occurred.public static RuntimeConfig parse(Map<String,Object> raw, boolean strict, File parent)
raw
- the raw key/value mapping to parsestrict
- if true, parses in strict modeparent
- if not null, resolves relative paths against this parentpublic static RuntimeConfig parse(Properties props, boolean strict)
props
- the properties to parsestrict
- if true, parses in strict modeCopyright © 2015. All rights reserved.