Overview | Package | Class | Use | Tree | Deprecated | Index | Help

Neo4j Community
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.neo4j.kernel
Class PlaceboTransaction

    java.lang.Object
      org.neo4j.kernel.PlaceboTransaction

All Implemented Interfaces:
  Transaction

    public class PlaceboTransaction

extends Object
implements Transaction

Field Summary
`static Lock` | `NO_LOCK`

Constructor Summary
`PlaceboTransaction(TransactionManager transactionManager)`

Method Summary
`Lock` | `acquireReadLock(PropertyContainer entity)` Acquires a read lock for `entity` for this transaction.
`Lock` | `acquireWriteLock(PropertyContainer entity)` Acquires a write lock for `entity` for this transaction.
`void` | `failure()` Marks this transaction as failed, which means that it will unconditionally be rolled back when `Transaction.finish()` is called.
`void` | `finish()` Commits or marks this transaction for rollback, depending on whether `Transaction.success()` or `Transaction.failure()` has been previously invoked.
`void` | `success()` Marks this transaction as successful, which means that it will be committed upon invocation of `Transaction.finish()` unless `Transaction.failure()` has or will be invoked before then.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### NO_LOCK

    public static final Lock NO_LOCK

Constructor Detail

### PlaceboTransaction

    public PlaceboTransaction(TransactionManager transactionManager)

Method Detail

### failure

    public void failure()

  Description copied from interface: `Transaction`
  Marks this transaction as failed, which means that it will unconditionally be rolled back when `Transaction.finish()` is called. Once this method has been invoked, it doesn't matter if `Transaction.success()` is invoked afterwards -- the transaction will still be rolled back.

  Specified by:
    `failure` in interface `Transaction`

### success

    public void success()

  Description copied from interface: `Transaction`
  Marks this transaction as successful, which means that it will be committed upon invocation of `Transaction.finish()` unless `Transaction.failure()` has or will be invoked before then.

  Specified by:
    `success` in interface `Transaction`

### finish

    public void finish()

  Description copied from interface: `Transaction`
  Commits or marks this transaction for rollback, depending on whether `Transaction.success()` or `Transaction.failure()` has been previously invoked.

  Specified by:
    `finish` in interface `Transaction`

### acquireWriteLock

    public Lock acquireWriteLock(PropertyContainer entity)

  Description copied from interface: `Transaction`
  Acquires a write lock for `entity` for this transaction. The lock (returned from this method) can be released manually, but if not it's released automatically when the transaction finishes.

  Specified by:
    `acquireWriteLock` in interface `Transaction`
  Parameters:
    `entity` - the entity to acquire a lock for. If another transaction currently holds a write lock to that entity this call will wait until it's released.
  Returns:
    a `Lock` which optionally can be used to release this lock earlier than when the transaction finishes. If not released (with `Lock.release()` it's going to be released with the transaction finishes.

### acquireReadLock

    public Lock acquireReadLock(PropertyContainer entity)

  Description copied from interface: `Transaction`
  Acquires a read lock for `entity` for this transaction. The lock (returned from this method) can be released manually, but if not it's released automatically when the transaction finishes.

  Specified by:
    `acquireReadLock` in interface `Transaction`
  Parameters:
    `entity` - the entity to acquire a lock for. If another transaction currently hold a write lock to that entity this call will wait until it's released.
  Returns:
    a `Lock` which optionally can be used to release this lock earlier than when the transaction finishes. If not released (with `Lock.release()` it's going to be released with the transaction finishes.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

Neo4j Community
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002-2013 The Neo4j Graph Database Project. All Rights Reserved.