summaryrefslogtreecommitdiff
path: root/src/main/java/com/amazon/carbonado/repo/logging
diff options
context:
space:
mode:
authorBrian S. O'Neill <bronee@gmail.com>2006-10-06 02:52:03 +0000
committerBrian S. O'Neill <bronee@gmail.com>2006-10-06 02:52:03 +0000
commitebc282a22ddc2cb97bc1af4fe3fa0fedc290fe1b (patch)
tree995577d73d42df83a91a73decc471086d4b7bd3d /src/main/java/com/amazon/carbonado/repo/logging
parent96895b1a9ed69231c9450eee2e4efc16d5f82441 (diff)
Removed RepositoryReference class.
Diffstat (limited to 'src/main/java/com/amazon/carbonado/repo/logging')
-rw-r--r--src/main/java/com/amazon/carbonado/repo/logging/LoggingRepository.java7
-rw-r--r--src/main/java/com/amazon/carbonado/repo/logging/LoggingRepositoryBuilder.java4
2 files changed, 7 insertions, 4 deletions
diff --git a/src/main/java/com/amazon/carbonado/repo/logging/LoggingRepository.java b/src/main/java/com/amazon/carbonado/repo/logging/LoggingRepository.java
index e44e3b7..3f17d17 100644
--- a/src/main/java/com/amazon/carbonado/repo/logging/LoggingRepository.java
+++ b/src/main/java/com/amazon/carbonado/repo/logging/LoggingRepository.java
@@ -21,9 +21,10 @@ package com.amazon.carbonado.repo.logging;
import java.util.IdentityHashMap;
import java.util.Map;
+import java.util.concurrent.atomic.AtomicReference;
+
import com.amazon.carbonado.IsolationLevel;
import com.amazon.carbonado.Repository;
-import static com.amazon.carbonado.RepositoryBuilder.RepositoryReference;
import com.amazon.carbonado.RepositoryException;
import com.amazon.carbonado.Storable;
import com.amazon.carbonado.Storage;
@@ -38,14 +39,14 @@ import com.amazon.carbonado.capability.Capability;
* @author Brian S O'Neill
*/
class LoggingRepository implements Repository, LogAccessCapability {
- private final RepositoryReference mRootRef;
+ private final AtomicReference<Repository> mRootRef;
private final Repository mRepo;
private final Log mLog;
// Map of storages by storable class
private final Map<Class<?>, LoggingStorage<?>> mStorages;
- LoggingRepository(RepositoryReference rootRef, Repository actual, Log log) {
+ LoggingRepository(AtomicReference<Repository> rootRef, Repository actual, Log log) {
mRootRef = rootRef;
mRepo = actual;
mLog = log;
diff --git a/src/main/java/com/amazon/carbonado/repo/logging/LoggingRepositoryBuilder.java b/src/main/java/com/amazon/carbonado/repo/logging/LoggingRepositoryBuilder.java
index 5f06cd5..956c947 100644
--- a/src/main/java/com/amazon/carbonado/repo/logging/LoggingRepositoryBuilder.java
+++ b/src/main/java/com/amazon/carbonado/repo/logging/LoggingRepositoryBuilder.java
@@ -20,6 +20,8 @@ package com.amazon.carbonado.repo.logging;
import java.util.Collection;
+import java.util.concurrent.atomic.AtomicReference;
+
import com.amazon.carbonado.ConfigurationException;
import com.amazon.carbonado.Repository;
import com.amazon.carbonado.RepositoryBuilder;
@@ -56,7 +58,7 @@ public class LoggingRepositoryBuilder extends AbstractRepositoryBuilder {
public LoggingRepositoryBuilder() {
}
- public Repository build(RepositoryReference rootRef) throws RepositoryException {
+ public Repository build(AtomicReference<Repository> rootRef) throws RepositoryException {
if (mName == null) {
if (mRepoBuilder != null) {
mName = mRepoBuilder.getName();