diff options
author | Brian S. O'Neill <bronee@gmail.com> | 2006-10-06 02:52:03 +0000 |
---|---|---|
committer | Brian S. O'Neill <bronee@gmail.com> | 2006-10-06 02:52:03 +0000 |
commit | ebc282a22ddc2cb97bc1af4fe3fa0fedc290fe1b (patch) | |
tree | 995577d73d42df83a91a73decc471086d4b7bd3d /src/main/java/com/amazon/carbonado/repo/jdbc | |
parent | 96895b1a9ed69231c9450eee2e4efc16d5f82441 (diff) |
Removed RepositoryReference class.
Diffstat (limited to 'src/main/java/com/amazon/carbonado/repo/jdbc')
-rw-r--r-- | src/main/java/com/amazon/carbonado/repo/jdbc/JDBCRepository.java | 7 | ||||
-rw-r--r-- | src/main/java/com/amazon/carbonado/repo/jdbc/JDBCRepositoryBuilder.java | 5 |
2 files changed, 8 insertions, 4 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 97be915..bcdd0c4 100644 --- a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCRepository.java +++ b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCRepository.java @@ -24,6 +24,8 @@ import java.sql.SQLException; import java.util.Map;
import java.util.IdentityHashMap;
+import java.util.concurrent.atomic.AtomicReference;
+
import javax.sql.DataSource;
import org.apache.commons.logging.Log;
@@ -39,7 +41,6 @@ import com.amazon.carbonado.SupportException; import com.amazon.carbonado.MalformedTypeException;
import com.amazon.carbonado.PersistException;
import com.amazon.carbonado.Repository;
-import static com.amazon.carbonado.RepositoryBuilder.RepositoryReference;
import com.amazon.carbonado.RepositoryException;
import com.amazon.carbonado.Transaction;
import com.amazon.carbonado.UnsupportedTypeException;
@@ -134,7 +135,7 @@ public class JDBCRepository private final String mName;
final boolean mIsMaster;
- private final RepositoryReference mRootRef;
+ private final AtomicReference<Repository> mRootRef;
private final String mDatabaseProductName;
private final DataSource mDataSource;
private final String mCatalog;
@@ -176,7 +177,7 @@ public class JDBCRepository * database independent
*/
@SuppressWarnings("unchecked")
- JDBCRepository(RepositoryReference rootRef,
+ JDBCRepository(AtomicReference<Repository> rootRef,
String name, boolean isMaster,
DataSource dataSource, String catalog, String schema)
throws RepositoryException
diff --git a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCRepositoryBuilder.java b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCRepositoryBuilder.java index 507d70a..3a797e8 100644 --- a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCRepositoryBuilder.java +++ b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCRepositoryBuilder.java @@ -21,9 +21,12 @@ package com.amazon.carbonado.repo.jdbc; import java.sql.SQLException;
import java.util.Collection;
+import java.util.concurrent.atomic.AtomicReference;
+
import javax.sql.DataSource;
import com.amazon.carbonado.ConfigurationException;
+import com.amazon.carbonado.Repository;
import com.amazon.carbonado.RepositoryException;
import com.amazon.carbonado.spi.AbstractRepositoryBuilder;
@@ -66,7 +69,7 @@ public class JDBCRepositoryBuilder extends AbstractRepositoryBuilder { public JDBCRepositoryBuilder() {
}
- public JDBCRepository build(RepositoryReference rootRef) throws RepositoryException {
+ public JDBCRepository build(AtomicReference<Repository> rootRef) throws RepositoryException {
assertReady();
JDBCRepository repo = new JDBCRepository
(rootRef, getName(), isMaster(), getDataSource(), mCatalog, mSchema);
|