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/spi/AbstractRepositoryBuilder.java | 4 +++- .../java/com/amazon/carbonado/spi/BelatedRepositoryCreator.java | 9 +++++---- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'src/main/java/com/amazon/carbonado/spi') diff --git a/src/main/java/com/amazon/carbonado/spi/AbstractRepositoryBuilder.java b/src/main/java/com/amazon/carbonado/spi/AbstractRepositoryBuilder.java index 902d516..a8f0169 100644 --- a/src/main/java/com/amazon/carbonado/spi/AbstractRepositoryBuilder.java +++ b/src/main/java/com/amazon/carbonado/spi/AbstractRepositoryBuilder.java @@ -21,6 +21,8 @@ package com.amazon.carbonado.spi; import java.util.ArrayList; 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; @@ -37,7 +39,7 @@ public abstract class AbstractRepositoryBuilder implements RepositoryBuilder { } public Repository build() throws ConfigurationException, RepositoryException { - return build(new RepositoryReference()); + return build(new AtomicReference()); } /** diff --git a/src/main/java/com/amazon/carbonado/spi/BelatedRepositoryCreator.java b/src/main/java/com/amazon/carbonado/spi/BelatedRepositoryCreator.java index 9674560..f0ad404 100644 --- a/src/main/java/com/amazon/carbonado/spi/BelatedRepositoryCreator.java +++ b/src/main/java/com/amazon/carbonado/spi/BelatedRepositoryCreator.java @@ -18,12 +18,13 @@ package com.amazon.carbonado.spi; +import java.util.concurrent.atomic.AtomicReference; + import org.apache.commons.logging.Log; import com.amazon.carbonado.IsolationLevel; import com.amazon.carbonado.Repository; import com.amazon.carbonado.RepositoryBuilder; -import static com.amazon.carbonado.RepositoryBuilder.RepositoryReference; import com.amazon.carbonado.RepositoryException; import com.amazon.carbonado.Storable; import com.amazon.carbonado.Storage; @@ -47,7 +48,7 @@ import com.amazon.carbonado.util.BelatedCreator; public class BelatedRepositoryCreator extends BelatedCreator { final Log mLog; final RepositoryBuilder mBuilder; - final RepositoryReference mRootRef; + final AtomicReference mRootRef; /** * @param log error reporting log @@ -56,7 +57,7 @@ public class BelatedRepositoryCreator extends BelatedCreator(), minRetryDelayMillis); } /** @@ -68,7 +69,7 @@ public class BelatedRepositoryCreator extends BelatedCreator rootRef, int minRetryDelayMillis) { super(Repository.class, minRetryDelayMillis); -- cgit v1.2.3