Class SqlgTransaction

java.lang.Object
org.apache.tinkerpop.gremlin.structure.util.AbstractTransaction
org.apache.tinkerpop.gremlin.structure.util.AbstractThreadLocalTransaction
org.umlg.sqlg.structure.SqlgTransaction
All Implemented Interfaces:
AutoCloseable, org.apache.tinkerpop.gremlin.structure.Transaction

public class SqlgTransaction extends org.apache.tinkerpop.gremlin.structure.util.AbstractThreadLocalTransaction
This class is a singleton. Instantiated and owned by SqlGraph. It manages the opening, commit, rollback and close of the java.sql.Connection in a threadvar. Date: 2014/07/12 Time: 2:18 PM
  • Field Details

  • Method Details

    • doOpen

      protected void doOpen()
      Specified by:
      doOpen in class org.apache.tinkerpop.gremlin.structure.util.AbstractTransaction
    • doCommit

      protected void doCommit() throws org.apache.tinkerpop.gremlin.structure.util.TransactionException
      Specified by:
      doCommit in class org.apache.tinkerpop.gremlin.structure.util.AbstractTransaction
      Throws:
      org.apache.tinkerpop.gremlin.structure.util.TransactionException
    • doRollback

      protected void doRollback() throws org.apache.tinkerpop.gremlin.structure.util.TransactionException
      Specified by:
      doRollback in class org.apache.tinkerpop.gremlin.structure.util.AbstractTransaction
      Throws:
      org.apache.tinkerpop.gremlin.structure.util.TransactionException
    • unlockTopology

      public void unlockTopology()
      If Topology.isLocked() then this method will unlock the Topology for the duration of the transaction. It will automatically be locked again on commit or rollback.
    • isTopologyLocked

      public boolean isTopologyLocked()
      Returns:
      Returns false if the topology is unlocked or the current transaction has not unlocked it.
    • streamingWithLockBatchModeOn

      public void streamingWithLockBatchModeOn()
    • streamingBatchModeOn

      public void streamingBatchModeOn()
    • batchMode

      public void batchMode(BatchManager.BatchModeType batchModeType)
    • normalBatchModeOn

      public void normalBatchModeOn()
    • isInBatchMode

      public boolean isInBatchMode()
    • isInNormalBatchMode

      public boolean isInNormalBatchMode()
    • isInStreamingBatchMode

      public boolean isInStreamingBatchMode()
    • isInStreamingWithLockBatchMode

      public boolean isInStreamingWithLockBatchMode()
    • getBatchModeType

      public BatchManager.BatchModeType getBatchModeType()
    • getBatchManager

      public BatchManager getBatchManager()
    • getConnection

      public Connection getConnection()
    • flush

      public void flush()
    • beforeCommit

      public void beforeCommit(BeforeCommit beforeCommitFunction)
    • afterCommit

      public void afterCommit(AfterCommit afterCommitFunction)
    • afterRollback

      public void afterRollback(AfterRollback afterCommitFunction)
    • isOpen

      public boolean isOpen()
    • add

      public void add(PreparedStatement preparedStatement)
    • getPreparedStatementCache

      public PreparedStatementCache getPreparedStatementCache()
    • isLazyQueries

      public boolean isLazyQueries()
      are we reading the SQL query results lazily?
      Returns:
      true if we are processing the results lazily, false otherwise
    • setLazyQueries

      public void setLazyQueries(boolean lazy)
      set the laziness on query result reading
      Parameters:
      lazy - boolean to set the query as lazy or not.
    • setDefaultFetchSize

      public void setDefaultFetchSize(Integer fetchSize)
      set default fetch size
      Parameters:
      fetchSize - Set the jdbc fetch size
    • getFetchSize

      public Integer getFetchSize()
      get fetch size for current transaction
      Returns:
      The jdbc fetch for the current transaction
    • setFetchSize

      public void setFetchSize(Integer fetchSize)
      set fetch size for current transaction
      Parameters:
      fetchSize - Set the current transaction's jdbc fetch size
    • isWriteTransaction

      public boolean isWriteTransaction()
    • setWriteTransaction

      public void setWriteTransaction(boolean b)
    • checkMultiplicity

      public void checkMultiplicity(org.apache.tinkerpop.gremlin.structure.Vertex vertex, org.apache.tinkerpop.gremlin.structure.Direction direction, EdgeLabel edgeLabel, VertexLabel otherSide)
    • checkMultiplicity

      public void checkMultiplicity(VertexLabel vertexLabel, org.apache.tinkerpop.gremlin.structure.Direction direction, EdgeLabel edgeLabel, VertexLabel otherSide)
      Utilizes LEFT JOIN but COUNT on the far side.