public abstract class OrientConfigurableGraph extends Object
Modifier and Type | Class and Description |
---|---|
static class |
OrientConfigurableGraph.Settings |
static class |
OrientConfigurableGraph.THREAD_MODE |
Modifier | Constructor and Description |
---|---|
protected |
OrientConfigurableGraph() |
Modifier and Type | Method and Description |
---|---|
abstract void |
declareIntent(OIntent iIntent) |
String |
getConnectionStrategy() |
int |
getEdgeContainerEmbedded2TreeThreshold()
Returns the minimum number of edges for edge containers to transform the underlying structure
from embedded to tree.
|
int |
getEdgeContainerTree2EmbeddedThreshold()
Returns the minimum number of edges for edge containers to transform the underlying structure
from tree to embedded.
|
int |
getMaxRetries()
Returns the maximum number of retries in case of auto managed OConcurrentModificationException
(like addEdge).
|
protected abstract Map<String,Object> |
getProperties() |
protected abstract Object |
getProperty(String iName) |
OrientConfigurableGraph.THREAD_MODE |
getThreadMode()
Returns the current thread mode:
MANUAL the user has to manually invoke the current database in Thread Local:
ODatabaseRecordThreadLocal.instance().set(graph.getRawGraph());
AUTOSET_IFNULL (default) each call assures the current graph instance is set in
the Thread Local only if no one was set before
ALWAYS_AUTOSET each call assures the current graph instance is set in the Thread
Local
|
protected void |
init(org.apache.commons.configuration.Configuration configuration)
Builds a OrientGraph instance passing a configuration.
|
boolean |
isAutoScaleEdgeType()
Returns true if is using auto scale edge type, otherwise false.
|
boolean |
isAutoStartTx()
Tells if a transaction is started automatically when the graph is changed.
|
boolean |
isKeepInMemoryReferences()
Returns true if the references are kept in memory.
|
boolean |
isRequireTransaction() |
boolean |
isSaveOriginalIds()
Returns true if it saves the original Id, otherwise false.
|
boolean |
isStandardElementConstraints()
Returns true if Blueprints standard constraints are applied to elements.
|
boolean |
isStandardExceptions()
Returns true if Blueprints standard exceptions are used:
IllegalStateException instead of ORecordNotFoundException when the record was not found
|
boolean |
isTxRequiredForSQLGraphOperations()
Returns true if usage of transactions is needed on graph modification for SQL commands
(create/remove vertex, create/remove edge).
|
boolean |
isUseClassForEdgeLabel()
Returns true if the class are use for Edge labels.
|
boolean |
isUseClassForVertexLabel()
Returns true if the class are use for Vertex labels.
|
boolean |
isUseLightweightEdges()
Returns true if is using lightweight edges, otherwise false.
|
boolean |
isUseVertexFieldsForEdgeLabels()
Returns true if the out/in fields in vertex are post-fixed with edge labels.
|
boolean |
isWarnOnForceClosingTx()
Returns true if the warning is generated on force the graph closing.
|
OrientConfigurableGraph |
setAutoScaleEdgeType(boolean autoScaleEdgeType)
Changes the setting about usage of auto scale edge type.
|
void |
setAutoStartTx(boolean autoStartTx)
If enabled auto starts a new transaction right before the graph is changed.
|
void |
setConnectionStrategy(String connectionStrategy) |
OrientConfigurableGraph |
setEdgeContainerEmbedded2TreeThreshold(int edgeContainerEmbedded2TreeThreshold)
Changes the minimum number of edges for edge containers to transform the underlying structure
from embedded to tree.
|
OrientConfigurableGraph |
setEdgeContainerTree2EmbeddedThreshold(int edgeContainerTree2EmbeddedThreshold)
Changes the minimum number of edges for edge containers to transform the underlying structure
from tree to embedded.
|
OrientConfigurableGraph |
setKeepInMemoryReferences(boolean useReferences)
Changes the setting about using references in memory.
|
void |
setMaxRetries(int maxRetries)
Changes the maximum number of retries in case of auto managed OConcurrentModificationException
(like addEdge).
|
protected abstract Object |
setProperty(String iName,
Object iValue) |
void |
setRequireTransaction(boolean requireTransaction) |
OrientConfigurableGraph |
setSaveOriginalIds(boolean saveIds)
Changes the setting about usage of lightweight edges.
|
OrientConfigurableGraph |
setStandardElementConstraints(boolean allowsPropertyValueNull)
Changes the setting to apply the Blueprints standard constraints against elements.
|
OrientConfigurableGraph |
setStandardExceptions(boolean stdExceptions)
Changes the setting to throw Blueprints standard exceptions:
IllegalStateException instead of ORecordNotFoundException when the record was not found
|
OrientConfigurableGraph |
setThreadMode(OrientConfigurableGraph.THREAD_MODE iControl)
Changes the thread mode:
MANUAL the user has to manually invoke the current database in Thread Local:
ODatabaseRecordThreadLocal.instance().set(graph.getRawGraph());
AUTOSET_IFNULL (default) each call assures the current graph instance is set in
the Thread Local only if no one was set before
ALWAYS_AUTOSET each call assures the current graph instance is set in the Thread
Local
|
OrientConfigurableGraph |
setTxRequiredForSQLGraphOperations(boolean useTransaction)
Changes the setting about usage of transactions on graph modification for SQL commands
(create/remove vertex, create/remove edge).
|
OrientConfigurableGraph |
setUseClassForEdgeLabel(boolean useCustomClassesForEdges)
Changes the setting to use the Edge class for Edge labels.
|
OrientConfigurableGraph |
setUseClassForVertexLabel(boolean useCustomClassesForVertex)
Changes the setting to use the Vertex class for Vertex labels.
|
OrientConfigurableGraph |
setUseLightweightEdges(boolean useDynamicEdges)
Changes the setting about usage of lightweight edges.
|
OrientConfigurableGraph |
setUseLog(boolean useLog) |
OrientConfigurableGraph |
setUseVertexFieldsForEdgeLabels(boolean useVertexFieldsForEdgeLabels)
Deprecated.
|
OrientConfigurableGraph |
setWarnOnForceClosingTx(boolean warnOnSchemaChangeInTx)
Changes the setting to generate a warning if the graph closing has been forced.
|
protected OrientConfigurableGraph.Settings settings
protected static final boolean USE_LIGHTWEIGHT_EDGES_DEFAULT
protected static final boolean USE_CLASS_FOR_EDGE_LABEL_DEFAULT
protected static final boolean USE_CLASS_FOR_VERTEX_LABEL_DEFAULT
protected static final boolean KEEP_IN_MEMORY_REFERENCES_DEFAULT
protected static final boolean USE_VERTEX_FIELDS_FOR_EDGE_LABELS
protected static final boolean SAVE_ORIGINAL_IDS_DEFAULT
protected static final boolean STANDARD_ELEMENT_CONSTRAINTS_DEFAULT
protected static final boolean STANDARD_EXCEPTIONS
protected static final boolean WARN_ON_FORCE_CLOSING_TX_DEFAULT
protected static final boolean AUTO_SCALE_EDGE_TYPE_DEFAULT
protected static final boolean USE_LOG_DEFAULT
protected static final int EDGE_CONTAINER_EMBEDDED_2_TREE_THRESHOLD_DEFAULT
protected static final int EDGE_CONTAINER_TREE_2_EMBEDDED_THRESHOLD_DEFAULT
protected static final OrientConfigurableGraph.THREAD_MODE THREAD_MODE_DEFAULT
protected static final boolean AUTO_START_TX_DEFAULT
protected static final boolean REQUIRE_TRANSACTION_DEFAULT
protected static final boolean STANDARD_TX_REQUIRE_FOR_SQL_OPERATIONS
protected static final int STANDARD_MAX_RETRIES
public abstract void declareIntent(OIntent iIntent)
public boolean isUseLightweightEdges()
public OrientConfigurableGraph setUseLightweightEdges(boolean useDynamicEdges)
public boolean isTxRequiredForSQLGraphOperations()
public OrientConfigurableGraph setTxRequiredForSQLGraphOperations(boolean useTransaction)
public boolean isAutoScaleEdgeType()
public OrientConfigurableGraph setAutoScaleEdgeType(boolean autoScaleEdgeType)
public int getEdgeContainerEmbedded2TreeThreshold()
public OrientConfigurableGraph setEdgeContainerEmbedded2TreeThreshold(int edgeContainerEmbedded2TreeThreshold)
public int getEdgeContainerTree2EmbeddedThreshold()
public OrientConfigurableGraph setEdgeContainerTree2EmbeddedThreshold(int edgeContainerTree2EmbeddedThreshold)
public boolean isAutoStartTx()
public void setAutoStartTx(boolean autoStartTx)
autoStartTx
- public boolean isRequireTransaction()
public void setRequireTransaction(boolean requireTransaction)
public boolean isSaveOriginalIds()
public OrientConfigurableGraph setSaveOriginalIds(boolean saveIds)
public boolean isKeepInMemoryReferences()
public OrientConfigurableGraph setKeepInMemoryReferences(boolean useReferences)
public boolean isUseClassForEdgeLabel()
public OrientConfigurableGraph setUseClassForEdgeLabel(boolean useCustomClassesForEdges)
public boolean isUseClassForVertexLabel()
public OrientConfigurableGraph setUseClassForVertexLabel(boolean useCustomClassesForVertex)
public boolean isUseVertexFieldsForEdgeLabels()
@Deprecated public OrientConfigurableGraph setUseVertexFieldsForEdgeLabels(boolean useVertexFieldsForEdgeLabels)
public boolean isStandardElementConstraints()
public OrientConfigurableGraph setStandardElementConstraints(boolean allowsPropertyValueNull)
public boolean isStandardExceptions()
public OrientConfigurableGraph setStandardExceptions(boolean stdExceptions)
public boolean isWarnOnForceClosingTx()
public OrientConfigurableGraph setWarnOnForceClosingTx(boolean warnOnSchemaChangeInTx)
public OrientConfigurableGraph.THREAD_MODE getThreadMode()
setThreadMode(THREAD_MODE)
public OrientConfigurableGraph setThreadMode(OrientConfigurableGraph.THREAD_MODE iControl)
iControl
- Value to setgetThreadMode()
public OrientConfigurableGraph setUseLog(boolean useLog)
public String getConnectionStrategy()
public void setConnectionStrategy(String connectionStrategy)
public int getMaxRetries()
public void setMaxRetries(int maxRetries)
protected void init(org.apache.commons.configuration.Configuration configuration)
Name | Description | Default value |
blueprints.orientdb.url | Database URL | - |
blueprints.orientdb.username | User name | admin |
blueprints.orientdb.password | User password | admin |
blueprints.orientdb.saveOriginalIds | Saves the original element IDs by using the property origId. This could be useful on import of graph to preserve original ids | false |
blueprints.orientdb.keepInMemoryReferences | Avoid to keep records in memory but only RIDs | false |
blueprints.orientdb.useCustomClassesForEdges | Use Edge's label as OrientDB class. If doesn't exist create it under the hood | true |
blueprints.orientdb.useCustomClassesForVertex | Use Vertex's label as OrientDB class. If doesn't exist create it under the hood | true |
blueprints.orientdb.useVertexFieldsForEdgeLabels | Store the edge relationships in vertex by using the Edge's class. This allow to use multiple fields and make faster traversal by edge's label (class) | true |
blueprints.orientdb.lightweightEdges | Uses lightweight edges. This avoid to create a physical document per edge. Documents are created only when they have properties | true |
blueprints.orientdb.autoScaleEdgeType | Set auto scale of edge type. True means one edge is managed as LINK, 2 or more are managed with a LINKBAG | false |
blueprints.orientdb.edgeContainerEmbedded2TreeThreshold | Changes the minimum number of edges for edge containers to transform the underlying structure from embedded to tree. Use -1 to disable transformation | -1 |
blueprints.orientdb.edgeContainerTree2EmbeddedThreshold | Changes the minimum number of edges for edge containers to transform the underlying structure from tree to embedded. Use -1 to disable transformation | -1 |
configuration
- of graphCopyright © 2009–2020 OrientDB. All rights reserved.