summaryrefslogtreecommitdiff
path: root/src/main/java/com/amazon/carbonado/spi
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/spi
parent96895b1a9ed69231c9450eee2e4efc16d5f82441 (diff)
Removed RepositoryReference class.
Diffstat (limited to 'src/main/java/com/amazon/carbonado/spi')
-rw-r--r--src/main/java/com/amazon/carbonado/spi/AbstractRepositoryBuilder.java4
-rw-r--r--src/main/java/com/amazon/carbonado/spi/BelatedRepositoryCreator.java9
2 files changed, 8 insertions, 5 deletions
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<Repository>());
}
/**
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<Repository, SupportException> {
final Log mLog;
final RepositoryBuilder mBuilder;
- final RepositoryReference mRootRef;
+ final AtomicReference<Repository> mRootRef;
/**
* @param log error reporting log
@@ -56,7 +57,7 @@ public class BelatedRepositoryCreator extends BelatedCreator<Repository, Support
* to create object after failure; if negative, never retry
*/
public BelatedRepositoryCreator(Log log, RepositoryBuilder builder, int minRetryDelayMillis) {
- this(log, builder, new RepositoryReference(), minRetryDelayMillis);
+ this(log, builder, new AtomicReference<Repository>(), minRetryDelayMillis);
}
/**
@@ -68,7 +69,7 @@ public class BelatedRepositoryCreator extends BelatedCreator<Repository, Support
*/
public BelatedRepositoryCreator(Log log,
RepositoryBuilder builder,
- RepositoryReference rootRef,
+ AtomicReference<Repository> rootRef,
int minRetryDelayMillis)
{
super(Repository.class, minRetryDelayMillis);