public class QueryConfiguration extends Object
Modifier and Type | Field and Description |
---|---|
static long |
DFLT_LONG_QRY_EXEC_TIMEOUT
Default query execution time interpreted as long query (3 seconds).
|
static boolean |
DFLT_USE_OPTIMIZED_SERIALIZER
Default value for
setUseOptimizedSerializer(boolean) flag. |
Constructor and Description |
---|
QueryConfiguration() |
Modifier and Type | Method and Description |
---|---|
Class<?>[] |
getIndexCustomFunctionClasses()
Gets classes with methods annotated by
QuerySqlFunction
to be used as user-defined functions from SQL queries. |
String |
getInitialScriptPath()
Gets script path to be ran against H2 database after opening.
|
long |
getLongQueryExecutionTimeout()
Get long query execution time timeout.
|
long |
getMaxOffHeapMemory()
Gets maximum amount of memory available to off-heap storage.
|
String[] |
getSearchPath()
Gets the optional search path consisting of space names to search SQL schema objects.
|
boolean |
isLongQueryExplain()
Gets flag marking SPI should print SQL execution plan for long queries (explain SQL query).
|
boolean |
isUseOptimizedSerializer()
The flag indicating that serializer for H2 database will be set to Ignite's marshaller.
|
void |
setIndexCustomFunctionClasses(Class<?>... idxCustomFuncClss)
Sets classes with methods annotated by
QuerySqlFunction
to be used as user-defined functions from SQL queries. |
void |
setInitialScriptPath(String initScriptPath)
Sets script path to be ran against H2 database after opening.
|
void |
setLongQueryExecutionTimeout(long longQryExecTimeout)
Set query execution time threshold.
|
void |
setLongQueryExplain(boolean longQryExplain)
If
true , SPI will print SQL execution plan for long queries (explain SQL query). |
void |
setMaxOffHeapMemory(long maxOffHeapMemory)
Sets maximum amount of memory available to off-heap storage.
|
void |
setMaxOffheapRowsCacheSize(int size)
Specifies max allowed size of cache for deserialized offheap rows to avoid deserialization costs for most
frequently used ones.
|
void |
setSearchPath(String... searchPath)
Sets the optional search path consisting of space names to search SQL schema objects.
|
void |
setUseOptimizedSerializer(boolean useOptimizedSerializer)
The flag indicating that serializer for H2 database will be set to Ignite's marshaller.
|
public static final long DFLT_LONG_QRY_EXEC_TIMEOUT
public static final boolean DFLT_USE_OPTIMIZED_SERIALIZER
setUseOptimizedSerializer(boolean)
flag.public void setMaxOffHeapMemory(long maxOffHeapMemory)
-1
- Means that off-heap storage is disabled.0
- Ignite will not limit off-heap storage (it's up to user to properly
add and remove entries from cache to ensure that off-heap storage does not grow
indefinitely.
-1
, which means that off-heap storage is disabled by default.
Use off-heap storage to load gigabytes of data in memory without slowing down Garbage Collection. Essentially in this case you should allocate very small amount of memory to JVM and Ignite will cache most of the data in off-heap space without affecting JVM performance at all.
maxOffHeapMemory
- Maximum memory in bytes available to off-heap memory space.public long getMaxOffHeapMemory()
public void setMaxOffheapRowsCacheSize(int size)
size
- Cache size in items.public void setSearchPath(String... searchPath)
searchPath
- Search path.@Nullable public String[] getSearchPath()
@Nullable public String getInitialScriptPath()
public void setInitialScriptPath(String initScriptPath)
initScriptPath
- Script path.public void setIndexCustomFunctionClasses(Class<?>... idxCustomFuncClss)
QuerySqlFunction
to be used as user-defined functions from SQL queries.idxCustomFuncClss
- List of classes.@Nullable public Class<?>[] getIndexCustomFunctionClasses()
QuerySqlFunction
to be used as user-defined functions from SQL queries.public long getLongQueryExecutionTimeout()
public void setLongQueryExecutionTimeout(long longQryExecTimeout)
setLongQueryExplain(boolean)
is
set to true
, then execution plan will be printed out as well.
If not provided, default value is defined by DFLT_LONG_QRY_EXEC_TIMEOUT
.
longQryExecTimeout
- Long query execution timeout.setLongQueryExplain(boolean)
public boolean isLongQueryExplain()
public void setLongQueryExplain(boolean longQryExplain)
true
, SPI will print SQL execution plan for long queries (explain SQL query).
The time threshold of long queries is controlled via setLongQueryExecutionTimeout(long)
parameter.
If not provided, default value is false
.
longQryExplain
- Flag marking SPI should print SQL execution plan for long queries (explain SQL query).setLongQueryExecutionTimeout(long)
public void setUseOptimizedSerializer(boolean useOptimizedSerializer)
Default is DFLT_USE_OPTIMIZED_SERIALIZER
.
useOptimizedSerializer
- Flag value.public boolean isUseOptimizedSerializer()
Default is DFLT_USE_OPTIMIZED_SERIALIZER
.
Follow @ApacheIgnite
Apache Ignite Fabric : ver. 1.0.0-RC3 Release Date : March 24 2015