com.clarkparsia.stardog.index
Class IndexOptions

java.lang.Object
  extended by com.clarkparsia.stardog.index.IndexOptions
All Implemented Interfaces:
MetaPropertyProvider

public final class IndexOptions
extends Object
implements MetaPropertyProvider

Set of options for configuring the low-level indexes.

Since:
0.6
Version:
0.9
Author:
Michael Grove, Evren Sirin

Nested Class Summary
static class IndexOptions.IndexType
          Types of indexes.
 
Field Summary
static ConfigProperty<Boolean> AUTO_STATS_UPDATE
          Option to turn on automatic statistics updates.
static InfoProperty<PrintStream> BULK_LOADER_OUTPUT
          Internal use only
static ConfigProperty<Boolean> CANONICAL_LITERALS
          Specify that non-string typed literals are canonicalized in the database.
static ConfigProperty<Integer> DIFF_INDEX_MAX_LIMIT
          The limit for the size of the differential index.
static ConfigProperty<Integer> DIFF_INDEX_MIN_LIMIT
          The limit for the size of the base index when differential indexes will be used.
static InfoProperty<Integer> DIFF_INDEX_SIZE
          Current size of the differential index.
static ConfigProperty<File> HOME
          Intended for internal system use only, not for users.
static ConfigProperty<Boolean> INDEX_NAMED_GRAPHS
          Option to specify whether or not extra indexes will be maintained for named graphs.
static InfoProperty<com.clarkparsia.stardog.index.IndexStrategy> INDEX_STRATEGY
          Intended for internal system use only, not for users.
static ConfigProperty<IndexOptions.IndexType> INDEX_TYPE
          Type of the index.
static ConfigProperty<Boolean> PERSIST
          Option to determine if the contents of the memory database will be persisted on disk.
static InfoProperty<Long> SIZE
          Current size of the database.
static InfoProperty<Long> STATS_UPDATE_COUNT
          Internal use only.
static InfoProperty<Long> STATS_UPDATE_DB_MIN_SIZE
           
static ConfigProperty<Boolean> SYNC
          Persistence type for a memory database, Setting this option to true indicates the db should be persisted within the commit.
 
Method Summary
static File home(Metadata theOptions)
          Return the value of the home directory option
static boolean isDisk(Metadata theOptions)
           
static boolean isMemory(Metadata theOptions)
           
static boolean isPersist(Metadata theOptions)
          Return whehter or not the PERSIST option is set
static boolean isSync(Metadata theOptions)
           
static Metadata memory()
           
static Metadata memory(String theName)
           
static Metadata memoryDefaults()
           
static Metadata memoryPersistable(String theName, boolean theSync, File theHome)
           
static String name(Metadata theOptions)
          Return the value of the name option
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HOME

public static final ConfigProperty<File> HOME
Intended for internal system use only, not for users. Home directory for the database, which is automatically determined by Stardog based on the Stardog home directory.


SIZE

public static final InfoProperty<Long> SIZE
Current size of the database. Provided only for information purposes and cannot be modified by users.


PERSIST

public static final ConfigProperty<Boolean> PERSIST
Option to determine if the contents of the memory database will be persisted on disk. If memory database is persisted on disk, its contents can be reloaded at a later time when Stardog server is restarted. This option is always true for disk databases.


SYNC

public static final ConfigProperty<Boolean> SYNC
Persistence type for a memory database, Setting this option to true indicates the db should be persisted within the commit. Otherwise, the persist will happen asynchronously after the commit is complete. This flag has no effect against disk indexes.


INDEX_TYPE

public static final ConfigProperty<IndexOptions.IndexType> INDEX_TYPE
Type of the index.


CANONICAL_LITERALS

public static final ConfigProperty<Boolean> CANONICAL_LITERALS
Specify that non-string typed literals are canonicalized in the database. Improves query & loading performance, but does change literal values to a canonical form. For example, "1"^^xsd:byte is canonicalized to "1"^^xsd:integer. Set this option to false if you require literals to be exactly as specified, rather than canonicalized. The default value is 'true'. note that, this value can only be set at database creation time and cannot be changed at a future time.


INDEX_NAMED_GRAPHS

public static final ConfigProperty<Boolean> INDEX_NAMED_GRAPHS
Option to specify whether or not extra indexes will be maintained for named graphs.


INDEX_STRATEGY

public static final InfoProperty<com.clarkparsia.stardog.index.IndexStrategy> INDEX_STRATEGY
Intended for internal system use only, not for users. Index strategy used by the database.


DIFF_INDEX_SIZE

public static final InfoProperty<Integer> DIFF_INDEX_SIZE
Current size of the differential index. The differential index is used for storing additions and removals separately from the main index so updates to the database can be performed faster. The query answering will take all the data stored in the main index and the differential index so the query answers will not change. There is slight overhead for query answering with differential indexes if the differential index size gets too large. For this reason, the differential index will be merged to the main index when its size reaches the DIFF_INDEX_MAX_LIMIT. There is no benefit of differential indexes if the main index itself is too small. For this reason, the differential index is not used until the main index size reaches DIFF_INDEX_MAX_LIMIT.


DIFF_INDEX_MIN_LIMIT

public static final ConfigProperty<Integer> DIFF_INDEX_MIN_LIMIT
The limit for the size of the base index when differential indexes will be used. If the main index size is below this limit, all the changes will be applied to the main index.

See Also:
DIFF_INDEX_SIZE

DIFF_INDEX_MAX_LIMIT

public static final ConfigProperty<Integer> DIFF_INDEX_MAX_LIMIT
The limit for the size of the differential index. If the differential index size exceeds this limit, it will automatically be merged to the main index.

See Also:
DIFF_INDEX_SIZE

BULK_LOADER_OUTPUT

public static final InfoProperty<PrintStream> BULK_LOADER_OUTPUT
Internal use only


STATS_UPDATE_COUNT

public static final InfoProperty<Long> STATS_UPDATE_COUNT
Internal use only.


STATS_UPDATE_DB_MIN_SIZE

public static final InfoProperty<Long> STATS_UPDATE_DB_MIN_SIZE

AUTO_STATS_UPDATE

public static final ConfigProperty<Boolean> AUTO_STATS_UPDATE
Option to turn on automatic statistics updates. When this option is set to true, Stardog will decide when to update statistics as the database is modified through additions and removals and update statistics is needed. If this option is set to false, Stardog will never update the statistics regardless of how much the database is updated.

Method Detail

isSync

public static boolean isSync(Metadata theOptions)

isMemory

public static boolean isMemory(Metadata theOptions)

isDisk

public static boolean isDisk(Metadata theOptions)

memoryDefaults

public static Metadata memoryDefaults()

memory

public static Metadata memory()

memory

public static Metadata memory(String theName)

memoryPersistable

public static Metadata memoryPersistable(String theName,
                                         boolean theSync,
                                         File theHome)

isPersist

public static boolean isPersist(Metadata theOptions)
Return whehter or not the PERSIST option is set

Parameters:
theOptions - the options
Returns:
true if the persist option is set, false otherwise

home

public static File home(Metadata theOptions)
Return the value of the home directory option

Parameters:
theOptions - the options
Returns:
the home directory set in the options, or null if it is not set

name

public static String name(Metadata theOptions)
Return the value of the name option

Parameters:
theOptions - the options
Returns:
the value of the name option if it is set, false otherwise


Copyright © 2010-2013 Clark & Parsia. All Rights Reserved.