Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Real-Time Decisions
11g Release 1 (11.1.1)

E17787-02


com.sigmadynamics.server.DataServices.DatabaseProvider
Interface DeadlockHandler

All Known Implementing Classes:
DefaultDeadlockHandler

public interface DeadlockHandler

Method Summary
 void clear()
           
 java.sql.SQLException deadlockCheck(java.sql.SQLException e)
          This method checks to see whether an exception is for a deadlock.
 java.sql.SQLException getDeadlockException()
           
 int getRetryCount()
           
 boolean isDeadlockException(java.sql.SQLException e)
           

 

Method Detail

clear

void clear()

getRetryCount

int getRetryCount()

isDeadlockException

boolean isDeadlockException(java.sql.SQLException e)

deadlockCheck

java.sql.SQLException deadlockCheck(java.sql.SQLException e)
This method checks to see whether an exception is for a deadlock. If it isn't, then it just returns the exception. If it is for a deadlock, then it checks whether the number of retries has reached the maximum and, if so, returns the exception. If it still wants to retry, then it does any sleeping that it's going to do and then returns a null.

It is important that the caller either calls clear when the original operation has succeeded or if it receives an exception for which it doesn't call this method so that the count value is reset properly.

Parameters:
e - the original exception that should be checked
Returns:
Either an exception that the caller will probably throw or null to indicate that it was a deadlock exception and the caller should retry the operation.

getDeadlockException

java.sql.SQLException getDeadlockException()
Returns:
Returns the deadlock exception if any

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Real-Time Decisions
11g Release 1 (11.1.1)

E17787-02


Copyright © 2010, 2011, Oracle. All rights reserved.