Class OrientConfigurableGraph.Settings
java.lang.Object
com.tinkerpop.blueprints.impls.orient.OrientConfigurableGraph.Settings
- Enclosing class:
- OrientConfigurableGraph
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy()voidcopyFrom(OrientConfigurableGraph.Settings settings) copies only not null settings from the input settings objectintReturns the minimum number of edges for edge containers to transform the underlying structure from embedded to tree.intReturns the minimum number of edges for edge containers to transform the underlying structure from tree to embedded.intReturns the maximum number of retry in case of auto managed OConcurrentModificationException (like addEdge).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 LocalbooleanReturns true if is using auto scale edge type, otherwise false.booleanTells if a transaction is started automatically when the graph is changed.booleanReturns true if the references are kept in memory.booleanReturns true if it is required that all modification operations are executed inside a transaction.booleanReturns true if it saves the original Id, otherwise false.booleanReturns true if Blueprints standard exceptions are used: IllegalStateException instead of ORecordNotFoundException when the record was not foundbooleanReturns true if the warning is generated on force the graph closing.booleanReturns true if usage of transactions is needed on graph modification for SQL commands (create/remove vertex, create/remove edge).booleanReturns true if the class are use for Edge labels.booleanReturns true if the class are use for Vertex labels.booleanReturns true if is using lightweight edges, otherwise false.booleanisUseLog()Returns true if is using transaction logs.booleanReturns true if the out/in fields in vertex are post-fixed with edge labels.booleanReturns true if the warning is generated on force the graph closing.voidsetAutoScaleEdgeType(boolean autoScaleEdgeType) Changes the setting about usage of auto scale edge type.voidsetAutoStartTx(boolean autoStartTx) If enabled auto starts a new transaction right before the graph is changed.voidsetConnectionStrategy(String connectionStrategy) voidsetEdgeContainerEmbedded2TreeThreshold(int edgeContainerEmbedded2TreeThreshold) Changes the minimum number of edges for edge containers to transform the underlying structure from embedded to tree.voidsetEdgeContainerTree2EmbeddedThreshold(int edgeContainerTree2EmbeddedThreshold) Changes the minimum number of edges for edge containers to transform the underlying structure from tree to embedded.voidsetKeepInMemoryReferences(boolean useReferences) Changes the setting about using references in memory.voidsetMaxRetries(int maxRetries) Changes the maximum number of retry in case of auto managed OConcurrentModificationException (like addEdge).voidsetRequireTransaction(boolean requireTransaction) Changes the setting about if all modification operations are executed inside a transaction.voidsetSaveOriginalIds(boolean saveIds) Changes the setting about usage of lightweight edges.voidsetStandardElementConstraints(boolean allowsPropertyValueNull) Changes the setting to apply the Blueprints standard constraints against elements.voidsetStandardExceptions(boolean stdExceptions) Changes the setting to throw Blueprints standard exceptions: IllegalStateException instead of ORecordNotFoundException when the record was not foundvoidChanges 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 LocalvoidsetTxRequiredForSQLGraphOperations(boolean iValue) Changes the setting about usage of transactions on graph modification for SQL commands (create/remove vertex, create/remove edge).voidsetUseClassForEdgeLabel(boolean useCustomClassesForEdges) Changes the setting to use the Edge class for Edge labels.voidsetUseClassForVertexLabel(boolean useCustomClassesForVertex) Changes the setting to use the Vertex class for Vertex labels.voidsetUseLightweightEdges(boolean useDynamicEdges) Changes the setting about usage of lightweight edges.voidsetUseLog(boolean useLog) Changes the setting about usage of transaction log.voidsetUseVertexFieldsForEdgeLabels(boolean useVertexFieldsForEdgeLabels) Changes the setting to postfix vertices fields with edge labels.voidsetWarnOnForceClosingTx(boolean warnOnSchemaChangeInTx) Changes the setting to generate a warning if the graph closing has been forced.
-
Constructor Details
-
Settings
public Settings()
-
-
Method Details
-
copy
-
copyFrom
copies only not null settings from the input settings object- Parameters:
settings-
-
isUseLightweightEdges
public boolean isUseLightweightEdges()Returns true if is using lightweight edges, otherwise false. -
setUseLightweightEdges
public void setUseLightweightEdges(boolean useDynamicEdges) Changes the setting about usage of lightweight edges. -
isAutoScaleEdgeType
public boolean isAutoScaleEdgeType()Returns true if is using auto scale edge type, otherwise false. -
setAutoScaleEdgeType
public void setAutoScaleEdgeType(boolean autoScaleEdgeType) Changes the setting about usage of auto scale edge type. -
isUseLog
public boolean isUseLog()Returns true if is using transaction logs. -
setUseLog
public void setUseLog(boolean useLog) Changes the setting about usage of transaction log. -
getConnectionStrategy
-
setConnectionStrategy
-
getEdgeContainerEmbedded2TreeThreshold
public int getEdgeContainerEmbedded2TreeThreshold()Returns the minimum number of edges for edge containers to transform the underlying structure from embedded to tree. -
setEdgeContainerEmbedded2TreeThreshold
public void setEdgeContainerEmbedded2TreeThreshold(int edgeContainerEmbedded2TreeThreshold) Changes the minimum number of edges for edge containers to transform the underlying structure from embedded to tree. Use -1 to disable transformation. -
getEdgeContainerTree2EmbeddedThreshold
public int getEdgeContainerTree2EmbeddedThreshold()Returns the minimum number of edges for edge containers to transform the underlying structure from tree to embedded. -
setEdgeContainerTree2EmbeddedThreshold
public void setEdgeContainerTree2EmbeddedThreshold(int edgeContainerTree2EmbeddedThreshold) Changes the minimum number of edges for edge containers to transform the underlying structure from tree to embedded. Use -1 to disable transformation. -
isAutoStartTx
public boolean isAutoStartTx()Tells if a transaction is started automatically when the graph is changed. This affects only when a transaction hasn't been started. Default is true.- Returns:
-
setAutoStartTx
public void setAutoStartTx(boolean autoStartTx) If enabled auto starts a new transaction right before the graph is changed. This affects only when a transaction hasn't been started. Default is true.- Parameters:
autoStartTx-
-
isRequireTransaction
public boolean isRequireTransaction()Returns true if it is required that all modification operations are executed inside a transaction. -
setRequireTransaction
public void setRequireTransaction(boolean requireTransaction) Changes the setting about if all modification operations are executed inside a transaction. -
setTxRequiredForSQLGraphOperations
public void setTxRequiredForSQLGraphOperations(boolean iValue) Changes the setting about usage of transactions on graph modification for SQL commands (create/remove vertex, create/remove edge).- Since:
- v2.2.0
-
isTxRequiredForSQLGraphOperations
public boolean isTxRequiredForSQLGraphOperations()Returns true if usage of transactions is needed on graph modification for SQL commands (create/remove vertex, create/remove edge).- Since:
- v2.2.0
-
isSaveOriginalIds
public boolean isSaveOriginalIds()Returns true if it saves the original Id, otherwise false. -
setSaveOriginalIds
public void setSaveOriginalIds(boolean saveIds) Changes the setting about usage of lightweight edges. -
isKeepInMemoryReferences
public boolean isKeepInMemoryReferences()Returns true if the references are kept in memory. -
setKeepInMemoryReferences
public void setKeepInMemoryReferences(boolean useReferences) Changes the setting about using references in memory. -
isUseClassForEdgeLabel
public boolean isUseClassForEdgeLabel()Returns true if the class are use for Edge labels. -
setUseClassForEdgeLabel
public void setUseClassForEdgeLabel(boolean useCustomClassesForEdges) Changes the setting to use the Edge class for Edge labels. -
isUseClassForVertexLabel
public boolean isUseClassForVertexLabel()Returns true if the class are use for Vertex labels. -
setUseClassForVertexLabel
public void setUseClassForVertexLabel(boolean useCustomClassesForVertex) Changes the setting to use the Vertex class for Vertex labels. -
isUseVertexFieldsForEdgeLabels
public boolean isUseVertexFieldsForEdgeLabels()Returns true if the out/in fields in vertex are post-fixed with edge labels. This improves traversal time by partitioning edges on different collections, one per Edge's class. -
setUseVertexFieldsForEdgeLabels
public void setUseVertexFieldsForEdgeLabels(boolean useVertexFieldsForEdgeLabels) Changes the setting to postfix vertices fields with edge labels. This improves traversal time by partitioning edges on different collections, one per Edge's class. -
isStandardElementConstraints
public boolean isStandardElementConstraints()Returns true if Blueprints standard exceptions are used:-
IllegalStateException instead of ORecordNotFoundException when the record was not found
-
setStandardElementConstraints
public void setStandardElementConstraints(boolean allowsPropertyValueNull) Changes the setting to apply the Blueprints standard constraints against elements. -
isStandardExceptions
public boolean isStandardExceptions()Returns true if the warning is generated on force the graph closing. -
setStandardExceptions
public void setStandardExceptions(boolean stdExceptions) Changes the setting to throw Blueprints standard exceptions:-
IllegalStateException instead of ORecordNotFoundException when the record was not found
-
isWarnOnForceClosingTx
public boolean isWarnOnForceClosingTx()Returns true if the warning is generated on force the graph closing. -
setWarnOnForceClosingTx
public void setWarnOnForceClosingTx(boolean warnOnSchemaChangeInTx) Changes the setting to generate a warning if the graph closing has been forced. -
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
- Returns:
- Current Graph instance to allow calls in chain (fluent interface)
- See Also:
-
setThreadMode
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
- Parameters:
iControl- Value to set- See Also:
-
getMaxRetries
public int getMaxRetries()Returns the maximum number of retry in case of auto managed OConcurrentModificationException (like addEdge). -
setMaxRetries
public void setMaxRetries(int maxRetries) Changes the maximum number of retry in case of auto managed OConcurrentModificationException (like addEdge).
-