Class FedXConfig
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
The block size for a bound join, i.e.int
Returns the max number of results to be consumed byConsumingIteration
boolean
Returns a flag indicating whether vectored evaluation using the VALUES clause shall be applied for SERVICE expressions.int
Get the maximum query time in seconds used for query evaluation.boolean
int
The (maximum) number of join worker threads used in theControlledWorkerScheduler
for join operations.int
The (maximum) number of left join worker threads used in theControlledWorkerScheduler
for join operations.Returns the path to a property file containing prefix declarations as "namespace=prefix" pairs (one per line).Returns theSourceSelectionCacheFactory
(if any).Returns the configuredCacheBuilderSpec
(if any) for theSourceSelectionMemoryCache
.Returns aTaskWrapper
which may be used for wrapping any backgroundRunnable
s.int
The (maximum) number of union worker threads used in theControlledWorkerScheduler
for join operations.boolean
The debug mode for query plan.boolean
Flag to enable/disable monitoring features.boolean
Flag to enable/disable query logging viaQueryLog
.boolean
Flag to enable/disable query plan logging viaQueryPlanLog
.withBoundJoinBlockSize
(int boundJoinBlockSize) Set the bound join block size.Set the CollectionFactory to be used by the federationwithConsumingIterationMax
(int max) Set the max number of results to be consumed byConsumingIteration
.withDebugQueryPlan
(boolean flag) Set whether the query plan shall be debugged.withEnableMonitoring
(boolean flag) Enable monitoring.withEnableServiceAsBoundJoin
(boolean flag) Whether external SERVICE clauses are evaluated using bound join (i.e.withEnforceMaxQueryTime
(int enforceMaxQueryTime) Set enforce max query time.withIncludeInferredDefault
(boolean flag) Set the default value supplied toOperation.setIncludeInferred(boolean)
withJoinWorkerThreads
(int joinWorkerThreads) Set the number of join worker threads.withLeftJoinWorkerThreads
(int leftJoinWorkerThreads) Set the number of left join worker threads.withLogQueries
(boolean flag) Set whether to log queries.withLogQueryPlan
(boolean flag) Whether to log the query plan withQueryPlanLog
.withPrefixDeclarations
(String prefixFile) Set the optional prefix declarations file.TheSourceSelectionCacheFactory
to be used.withSourceSelectionCacheSpec
(String cacheSpec) The cache specification for theSourceSelectionMemoryCache
.withTaskWrapper
(TaskWrapper taskWrapper) Sets aTaskWrapper
which may be used for wrapping any backgroundRunnable
s.withUnionWorkerThreads
(int unionWorkerThreads) Set the number of union worker threads.
-
Field Details
-
DEFAULT_CONFIG
-
-
Constructor Details
-
FedXConfig
public FedXConfig()
-
-
Method Details
-
withDebugQueryPlan
Set whether the query plan shall be debugged. SeeisDebugQueryPlan()
.Can be set after federation construction and initialize.
- Parameters:
flag
-- Returns:
- the current config
-
withLogQueries
Set whether to log queries. SeeisLogQueries()
.Can only be set before federation initialization.
- Parameters:
flag
-- Returns:
- the current config
-
withEnforceMaxQueryTime
Set enforce max query time. SeegetEnforceMaxQueryTime()
.Can be set after federation construction and initialize.
- Parameters:
enforceMaxQueryTime
- time in seconds, 0 to disable- Returns:
- the current config
-
withIncludeInferredDefault
Set the default value supplied toOperation.setIncludeInferred(boolean)
- Parameters:
flag
-- Returns:
- the current config
-
withEnableMonitoring
Enable monitoring. SeeisEnableMonitoring()
.Can only be set before federation initialization.
- Parameters:
flag
-- Returns:
- the current config
-
withBoundJoinBlockSize
Set the bound join block size. SeegetBoundJoinBlockSize()
.Can only be set before federation initialization.
- Parameters:
boundJoinBlockSize
-- Returns:
- the current config
-
withJoinWorkerThreads
Set the number of join worker threads. SeegetJoinWorkerThreads()
.Can only be set before federation initialization.
- Parameters:
joinWorkerThreads
-- Returns:
- the current config
-
withLeftJoinWorkerThreads
Set the number of left join worker threads. SeegetLeftJoinWorkerThreads()
.Can only be set before federation initialization.
- Parameters:
leftJoinWorkerThreads
-- Returns:
- the current config
-
withUnionWorkerThreads
Set the number of union worker threads. SeegetUnionWorkerThreads()
.Can only be set before federation initialization.
- Parameters:
unionWorkerThreads
-- Returns:
- the current config
-
withPrefixDeclarations
Set the optional prefix declarations file. SeegetPrefixDeclarations()
.Can only be set before federation initialization.
- Parameters:
prefixFile
-- Returns:
- config
-
withLogQueryPlan
Whether to log the query plan withQueryPlanLog
. SeeisLogQueryPlan()
.Can only be set before federation initialization.
- Parameters:
flag
-- Returns:
- the current config
-
withEnableServiceAsBoundJoin
Whether external SERVICE clauses are evaluated using bound join (i.e. with the VALUES clause). Default true- Parameters:
flag
-- Returns:
- the current config.
-
withSourceSelectionCacheSpec
The cache specification for theSourceSelectionMemoryCache
. If not set explicitly, theSourceSelectionMemoryCache.DEFAULT_CACHE_SPEC
is used.- Parameters:
cacheSpec
- theCacheBuilderSpec
for theSourceSelectionCache
- Returns:
- the current config
- See Also:
-
withSourceSelectionCacheFactory
TheSourceSelectionCacheFactory
to be used. If not set explicitly, the default in memory implementation is used with the configuedgetSourceSelectionCacheSpec()
.- Parameters:
factory
- theSourceSelectionCacheFactory
- Returns:
- the current config
-
withTaskWrapper
Sets aTaskWrapper
which may be used for wrapping any backgroundRunnable
s. If no such wrapper is explicitly configured, the unmodified task is returned. SeeTaskWrapper
for more information.- Parameters:
taskWrapper
- theTaskWrapper
- Returns:
- the current config
- See Also:
-
getJoinWorkerThreads
public int getJoinWorkerThreads()The (maximum) number of join worker threads used in theControlledWorkerScheduler
for join operations. Default is 20.- Returns:
- the number of join worker threads
-
getUnionWorkerThreads
public int getUnionWorkerThreads()The (maximum) number of union worker threads used in theControlledWorkerScheduler
for join operations. Default is 20- Returns:
- number of union worker threads
-
getLeftJoinWorkerThreads
public int getLeftJoinWorkerThreads()The (maximum) number of left join worker threads used in theControlledWorkerScheduler
for join operations. Default is 10.- Returns:
- the number of left join worker threads
-
getBoundJoinBlockSize
public int getBoundJoinBlockSize()The block size for a bound join, i.e. the number of bindings that are integrated in a single subquery. Default is 15.- Returns:
- the bound join block size
-
getEnableServiceAsBoundJoin
public boolean getEnableServiceAsBoundJoin()Returns a flag indicating whether vectored evaluation using the VALUES clause shall be applied for SERVICE expressions. Default: false Note: for todays endpoints it is more efficient to disable vectored evaluation of SERVICE.- Returns:
- whether SERVICE expressions are evaluated using bound joins
-
getEnforceMaxQueryTime
public int getEnforceMaxQueryTime()Get the maximum query time in seconds used for query evaluation. Applied ifQueryManager
is used to create queries.Set to 0 to disable query timeouts.
The timeout is also applied for individual fine-granular join or union operations as a max time.- Returns:
- the maximum query time in seconds
-
getIncludeInferredDefault
public boolean getIncludeInferredDefault()- Returns:
- the default for
Operation.getIncludeInferred()
-
isEnableMonitoring
public boolean isEnableMonitoring()Flag to enable/disable monitoring features. Default=false.- Returns:
- whether monitoring is enabled
-
isLogQueryPlan
public boolean isLogQueryPlan()Flag to enable/disable query plan logging viaQueryPlanLog
. Default=false TheQueryPlanLog
facility allows to retrieve the query execution plan from a variable local to the executing thread.- Returns:
- whether the query plan shall be logged
-
isLogQueries
public boolean isLogQueries()Flag to enable/disable query logging viaQueryLog
. Default=false TheQueryLog
facility allows to log all queries to a file. SeeQueryLog
for details. RequiresisEnableMonitoring()
to be active.- Returns:
- whether queries are logged
-
getPrefixDeclarations
Returns the path to a property file containing prefix declarations as "namespace=prefix" pairs (one per line).Default: no prefixes are replaced. Note that prefixes are only replaced when using the
QueryManager
to create/evaluate queries. Example:foaf=http://xmlns.com/foaf/0.1/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# =http://mydefaultns.org/
- Returns:
- the location of the prefix declarations or
null
if not configured
-
getSourceSelectionCacheSpec
Returns the configuredCacheBuilderSpec
(if any) for theSourceSelectionMemoryCache
. If not defined, theSourceSelectionMemoryCache.DEFAULT_CACHE_SPEC
is used. IfgetSourceSelectionCacheFactory()
is configured, this setting is ignored.- Returns:
- the
CacheBuilderSpec
ornull
-
getSourceSelectionCacheFactory
Returns theSourceSelectionCacheFactory
(if any). If not defined, theSourceSelectionCache
is instantiated using the default implementation and respectsgetSourceSelectionCacheSpec()
.- Returns:
SourceSelectionCacheFactory
-
isDebugQueryPlan
public boolean isDebugQueryPlan()The debug mode for query plan. If enabled, the query execution plan is printed to stdout- Returns:
- whether the query plan is printed to std out
-
getTaskWrapper
Returns aTaskWrapper
which may be used for wrapping any backgroundRunnable
s. If no such wrapper is explicitly configured, the unmodified task is returned. SeeTaskWrapper
for more information.- Returns:
- the
TaskWrapper
, an emptyOptional
if none is explicitly configured
-
withConsumingIterationMax
Set the max number of results to be consumed byConsumingIteration
. SeegetConsumingIterationMax()
.Can only be set before federation initialization.
- Parameters:
max
-- Returns:
- the current config
-
getConsumingIterationMax
public int getConsumingIterationMax()Returns the max number of results to be consumed byConsumingIteration
-
withCollectionFactory
Set the CollectionFactory to be used by the federationCan only be set before federation initialization.
- Parameters:
cf
-- Returns:
- the current config
-