org.multiverse.api.exceptions
Class UncommittedReadConflict

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Error
          extended by org.multiverse.api.exceptions.ControlFlowError
              extended by org.multiverse.api.exceptions.ReadConflict
                  extended by org.multiverse.api.exceptions.UncommittedReadConflict
All Implemented Interfaces:
Serializable

public class UncommittedReadConflict
extends ReadConflict

An ReadConflict that is thrown when an object is loaded but has not been committed yet. There are 2 why reasons this can happen:

  1. an TransactionalObject has escaped and is used by another transaction, before the transaction creating that object has committed.
  2. an TransactionalObject is used, after the transaction in which the TransactionalObject is created is aborted.
In either case, the cause is a misuse of the STM, so a programming error and is not recoverable.

There is no reason for this exception to be reused is because this exception indicates a programming failure, and you want to have good feedback when that happens.

Author:
Peter Veentjer.
See Also:
Serialized Form

Field Summary
static UncommittedReadConflict INSTANCE
           
static boolean reuse
           
 
Constructor Summary
UncommittedReadConflict()
           
UncommittedReadConflict(String message)
           
UncommittedReadConflict(String message, Throwable cause)
           
UncommittedReadConflict(Throwable cause)
           
 
Method Summary
static UncommittedReadConflict createUncommittedReadConflict()
           
 String getDescription()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INSTANCE

public static final UncommittedReadConflict INSTANCE

reuse

public static final boolean reuse
Constructor Detail

UncommittedReadConflict

public UncommittedReadConflict()

UncommittedReadConflict

public UncommittedReadConflict(String message)

UncommittedReadConflict

public UncommittedReadConflict(String message,
                               Throwable cause)

UncommittedReadConflict

public UncommittedReadConflict(Throwable cause)
Method Detail

createUncommittedReadConflict

public static UncommittedReadConflict createUncommittedReadConflict()

getDescription

public String getDescription()
Specified by:
getDescription in class ControlFlowError


Copyright © 2008-2010 Multiverse. All Rights Reserved.