Class OrientConfigurableGraph.Settings

java.lang.Object
com.tinkerpop.blueprints.impls.orient.OrientConfigurableGraph.Settings
Enclosing class:
OrientConfigurableGraph

public static class OrientConfigurableGraph.Settings extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    void
    copies only not null settings from the input settings object
     
    int
    Returns the minimum number of edges for edge containers to transform the underlying structure from embedded to tree.
    int
    Returns the minimum number of edges for edge containers to transform the underlying structure from tree to embedded.
    int
    Returns 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 Local
    boolean
    Returns true if is using auto scale edge type, otherwise false.
    boolean
    Tells if a transaction is started automatically when the graph is changed.
    boolean
    Returns true if the references are kept in memory.
    boolean
    Returns true if it is required that all modification operations are executed inside a transaction.
    boolean
    Returns true if it saves the original Id, otherwise false.
    boolean
    Returns true if Blueprints standard exceptions are used: IllegalStateException instead of ORecordNotFoundException when the record was not found
    boolean
    Returns true if the warning is generated on force the graph closing.
    boolean
    Returns true if usage of transactions is needed on graph modification for SQL commands (create/remove vertex, create/remove edge).
    boolean
    Returns true if the class are use for Edge labels.
    boolean
    Returns true if the class are use for Vertex labels.
    boolean
    Returns true if is using lightweight edges, otherwise false.
    boolean
    Returns true if is using transaction logs.
    boolean
    Returns true if the out/in fields in vertex are post-fixed with edge labels.
    boolean
    Returns true if the warning is generated on force the graph closing.
    void
    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)
     
    void
    setEdgeContainerEmbedded2TreeThreshold(int edgeContainerEmbedded2TreeThreshold)
    Changes the minimum number of edges for edge containers to transform the underlying structure from embedded to tree.
    void
    setEdgeContainerTree2EmbeddedThreshold(int edgeContainerTree2EmbeddedThreshold)
    Changes the minimum number of edges for edge containers to transform the underlying structure from tree to embedded.
    void
    setKeepInMemoryReferences(boolean useReferences)
    Changes the setting about using references in memory.
    void
    setMaxRetries(int maxRetries)
    Changes the maximum number of retry in case of auto managed OConcurrentModificationException (like addEdge).
    void
    setRequireTransaction(boolean requireTransaction)
    Changes the setting about if all modification operations are executed inside a transaction.
    void
    setSaveOriginalIds(boolean saveIds)
    Changes the setting about usage of lightweight edges.
    void
    setStandardElementConstraints(boolean allowsPropertyValueNull)
    Changes the setting to apply the Blueprints standard constraints against elements.
    void
    setStandardExceptions(boolean stdExceptions)
    Changes the setting to throw Blueprints standard exceptions: IllegalStateException instead of ORecordNotFoundException when the record was not found
    void
    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
    void
    Changes the setting about usage of transactions on graph modification for SQL commands (create/remove vertex, create/remove edge).
    void
    setUseClassForEdgeLabel(boolean useCustomClassesForEdges)
    Changes the setting to use the Edge class for Edge labels.
    void
    setUseClassForVertexLabel(boolean useCustomClassesForVertex)
    Changes the setting to use the Vertex class for Vertex labels.
    void
    setUseLightweightEdges(boolean useDynamicEdges)
    Changes the setting about usage of lightweight edges.
    void
    setUseLog(boolean useLog)
    Changes the setting about usage of transaction log.
    void
    setUseVertexFieldsForEdgeLabels(boolean useVertexFieldsForEdgeLabels)
    Changes the setting to postfix vertices fields with edge labels.
    void
    setWarnOnForceClosingTx(boolean warnOnSchemaChangeInTx)
    Changes the setting to generate a warning if the graph closing has been forced.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Settings

      public Settings()
  • Method Details

    • copy

    • copyFrom

      public void copyFrom(OrientConfigurableGraph.Settings settings)
      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

      public String getConnectionStrategy()
    • setConnectionStrategy

      public void setConnectionStrategy(String connectionStrategy)
    • 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

      public 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
      Returns:
      Current Graph instance to allow calls in chain (fluent interface)
      See Also:
    • setThreadMode

      public void 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
      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).