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/indexed/IndexedRepository.java | 7 ++++--- .../amazon/carbonado/repo/indexed/IndexedRepositoryBuilder.java | 4 +++- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'src/main/java/com/amazon/carbonado/repo/indexed') diff --git a/src/main/java/com/amazon/carbonado/repo/indexed/IndexedRepository.java b/src/main/java/com/amazon/carbonado/repo/indexed/IndexedRepository.java index 4d6e371..59a359b 100644 --- a/src/main/java/com/amazon/carbonado/repo/indexed/IndexedRepository.java +++ b/src/main/java/com/amazon/carbonado/repo/indexed/IndexedRepository.java @@ -23,11 +23,12 @@ import java.util.Arrays; import java.util.Map; import java.util.IdentityHashMap; +import java.util.concurrent.atomic.AtomicReference; + import com.amazon.carbonado.Cursor; import com.amazon.carbonado.IsolationLevel; import com.amazon.carbonado.MalformedTypeException; 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; @@ -56,12 +57,12 @@ class IndexedRepository implements Repository, StorableInfoCapability, IndexEntryAccessCapability { - private final RepositoryReference mRootRef; + private final AtomicReference mRootRef; private final Repository mRepository; private final String mName; private final Map, IndexedStorage> mStorages; - IndexedRepository(RepositoryReference rootRef, String name, Repository repository) { + IndexedRepository(AtomicReference rootRef, String name, Repository repository) { mRootRef = rootRef; mRepository = repository; mName = name; diff --git a/src/main/java/com/amazon/carbonado/repo/indexed/IndexedRepositoryBuilder.java b/src/main/java/com/amazon/carbonado/repo/indexed/IndexedRepositoryBuilder.java index f3ec04b..a1aa45e 100644 --- a/src/main/java/com/amazon/carbonado/repo/indexed/IndexedRepositoryBuilder.java +++ b/src/main/java/com/amazon/carbonado/repo/indexed/IndexedRepositoryBuilder.java @@ -20,6 +20,8 @@ package com.amazon.carbonado.repo.indexed; 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; @@ -48,7 +50,7 @@ public class IndexedRepositoryBuilder extends AbstractRepositoryBuilder { public IndexedRepositoryBuilder() { } - public Repository build(RepositoryReference rootRef) throws RepositoryException { + public Repository build(AtomicReference rootRef) throws RepositoryException { assertReady(); Repository wrapped; -- cgit v1.2.3