From ebc282a22ddc2cb97bc1af4fe3fa0fedc290fe1b Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Fri, 6 Oct 2006 02:52:03 +0000 Subject: Removed RepositoryReference class. --- .../java/com/amazon/carbonado/repo/logging/LoggingRepository.java | 7 ++++--- .../amazon/carbonado/repo/logging/LoggingRepositoryBuilder.java | 4 +++- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'src/main/java/com/amazon/carbonado/repo/logging') 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 mRootRef; private final Repository mRepo; private final Log mLog; // Map of storages by storable class private final Map, LoggingStorage> mStorages; - LoggingRepository(RepositoryReference rootRef, Repository actual, Log log) { + LoggingRepository(AtomicReference 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 rootRef) throws RepositoryException { if (mName == null) { if (mRepoBuilder != null) { mName = mRepoBuilder.getName(); -- cgit v1.2.3