Package com.graphdbapi
Interface Transaction
-
- All Superinterfaces:
AutoCloseable
,Graph
public interface Transaction extends Graph, AutoCloseable
交予客户用的事务API
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
close()
等效于txClose()
void
txClose()
提交事务 提交前需要执行txSuccess()
或txFailure()
否则默认回滚void
txFailure()
long
txId()
事务Idboolean
txIsFailure()
事务是否被标记为失败boolean
txIsOpen()
事务是否仍然存活boolean
txIsSuccess()
事务是否被标记为成功void
txSuccess()
-
Methods inherited from interface com.graphdbapi.Graph
affinities, affinity, beginTransaction, broadcastCallable, broadcastCallable, broadcastRunnable, broadcastRunnable, deleteEdge, deleteVertex, deleteVertex, edgeIteratorFast, edgeIteratorFast, edgeIteratorFast, edgeTypeIndex, executePregel, flushData, getAllEdgeCount, getAllVertexCount, getEdgeCount, getEdgeCount, getEdgeCount, getGraphName, getOrCreateGraphDbAtomicLong, getPk, getSnowId, getVertexCount, getVertexCount, getVertexCount, getVertexes, getVertexIdByPk, getVertexIdByPk, getVertexIdByPk, getVertexIdByPkCompatible, getVertexIdByPkCompatible, getVertexIdByPkCompatible, hasVertex, insertEdgeByVertexId, insertVertexByPk, isStop, localAffinity, meta, putPropertyValue, putPropertyValue, putPropertyValue, putPropertyValue, removePropertyValue, removePropertyValue, removePropertyValue, removePropertyValue, retrieveAllEdges, retrieveAllEdges, retrieveAllVertexes, retrieveAllVertexes, retrieveEdge, retrieveEdgeByVertexId, retrieveEdgeByVertexId, retrieveEdgeByVertexId, retrieveEdgeByVertexId, retrieveEdgeByVertexIdForAlgo, retrieveEdgeByVertexIdForAlgo, retrieveEdgeByVertexIdNoProps, retrieveEdgeCompatible, retrieveLocalEdges, retrieveLocalEdges, retrieveLocalVertexes, retrieveLocalVertexes, retrieveNeighborIdIterator, retrieveOrInsertEdge, retrieveOrInsertVertex, retrieveVertex, retrieveVertexByPk, retrieveVertexByPkCompatible, retrieveVertexCompatible, searchEdgesByIndex, searchVertexesByIndex, updateEdge, updateEdge, updateVertex, updateVertex, upsertEdge, upsertEdge, upsertVertex, upsertVertex, vertexIteratorFast, vertexIteratorFast, vertexIteratorFast, vertexTypeIndex
-
-
-
-
Method Detail
-
txClose
void txClose()
提交事务 提交前需要执行txSuccess()
或txFailure()
否则默认回滚
-
txSuccess
void txSuccess()
-
txIsSuccess
boolean txIsSuccess()
事务是否被标记为成功- Returns:
- 事务是否被标记为成功
-
txFailure
void txFailure()
-
txIsOpen
boolean txIsOpen()
事务是否仍然存活- Returns:
- 事务是否仍然存活
-
txId
long txId()
事务Id- Returns:
- 事务Id
-
txIsFailure
boolean txIsFailure()
事务是否被标记为失败- Returns:
- 事务是否被标记为失败
-
close
default void close() throws Exception
等效于txClose()
- Specified by:
close
in interfaceAutoCloseable
- Throws:
Exception
- 关闭时发生异常
-
-