com.hp.hpl.jena.graph
Interface TransactionHandler

All Known Implementing Classes:
BaseInfGraph.InfTransactionHandler, com.hp.hpl.jena.graph.impl.TransactionHandlerBase

public interface TransactionHandler

Preliminary interface for graphs supporting transactions.

Author:
kers

Method Summary
 void abort()
          If transactions are supported and there is a tranaction in progress, abort it.
 void begin()
          If transactions are supported, begin a new transaction.
 void commit()
          If transactions are supported and there is a tranaction in progress, commit it.
 Object executeInTransaction(Command c)
          If transactions are supported, execute the command c within a transaction and return its result.
 boolean transactionsSupported()
          Does this handler support transactions at all?
 

Method Detail

transactionsSupported

boolean transactionsSupported()
Does this handler support transactions at all?

Returns:
true iff begin/abort/commit are implemented and make sense.

begin

void begin()
If transactions are supported, begin a new transaction. If tranactions are not supported, or they are but this tranaction is nested and nested transactions are not supported, throw an UnsupportedOperationException.


abort

void abort()
If transactions are supported and there is a tranaction in progress, abort it. If transactions are not supported, or there is no transaction in progress, throw an UnsupportedOperationException.


commit

void commit()
If transactions are supported and there is a tranaction in progress, commit it. If transactions are not supported, , or there is no transaction in progress, throw an UnsupportedOperationException.


executeInTransaction

Object executeInTransaction(Command c)
If transactions are supported, execute the command c within a transaction and return its result. If not, throw an UnsupportedOperationException.



Licenced under the Apache License, Version 2.0