summaryrefslogtreecommitdiff
path: root/src/main/java/com/amazon/carbonado/repo
diff options
context:
space:
mode:
authorBrian S. O'Neill <bronee@gmail.com>2006-10-02 06:08:44 +0000
committerBrian S. O'Neill <bronee@gmail.com>2006-10-02 06:08:44 +0000
commitfb3696bc72ce7bcbf17a5188b7fec1c5b690ad23 (patch)
treef71aec688dd3be3188ee179c7bfdac5668c3758e /src/main/java/com/amazon/carbonado/repo
parent83dc6080af2a6e00e6aa383af5fe6d3382eea43c (diff)
Add support SNAPSHOT isolation level.
Diffstat (limited to 'src/main/java/com/amazon/carbonado/repo')
-rw-r--r--src/main/java/com/amazon/carbonado/repo/jdbc/JDBCRepository.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCRepository.java b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCRepository.java
index 6e53354..97be915 100644
--- a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCRepository.java
+++ b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCRepository.java
@@ -92,6 +92,9 @@ public class JDBCRepository
return Connection.TRANSACTION_READ_COMMITTED;
case REPEATABLE_READ:
return Connection.TRANSACTION_REPEATABLE_READ;
+ case SNAPSHOT:
+ // TODO: not accurate for all databases.
+ return Connection.TRANSACTION_SERIALIZABLE;
case SERIALIZABLE:
return Connection.TRANSACTION_SERIALIZABLE;
}
@@ -117,6 +120,9 @@ public class JDBCRepository
case REPEATABLE_READ:
desiredLevel = IsolationLevel.SERIALIZABLE;
break;
+ case SNAPSHOT:
+ desiredLevel = IsolationLevel.SERIALIZABLE;
+ break;
case SERIALIZABLE: default:
return null;
}