summaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorBrian S. O'Neill <bronee@gmail.com>2008-05-02 22:33:47 +0000
committerBrian S. O'Neill <bronee@gmail.com>2008-05-02 22:33:47 +0000
commitf1ca557cc885fd86859901f3acd2897919ae1b72 (patch)
tree9f0af1025805404f82492656499409ef791f274c /src/main/java
parent02907e327a657b6038d1eeec898bc42caa3b5ce3 (diff)
Replicated repository returns replica's capabilities and not master's. Access to master is provided via resync capability.
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/com/amazon/carbonado/repo/replicated/ReplicatedRepository.java7
-rw-r--r--src/main/java/com/amazon/carbonado/repo/replicated/ReplicatedRepositoryBuilder.java5
2 files changed, 5 insertions, 7 deletions
diff --git a/src/main/java/com/amazon/carbonado/repo/replicated/ReplicatedRepository.java b/src/main/java/com/amazon/carbonado/repo/replicated/ReplicatedRepository.java
index b28fab5..3e2894d 100644
--- a/src/main/java/com/amazon/carbonado/repo/replicated/ReplicatedRepository.java
+++ b/src/main/java/com/amazon/carbonado/repo/replicated/ReplicatedRepository.java
@@ -242,12 +242,7 @@ class ReplicatedRepository
return (C) this;
}
- C cap = mMasterRepository.getCapability(capabilityType);
- if (cap == null) {
- cap = mReplicaRepository.getCapability(capabilityType);
- }
-
- return cap;
+ return mReplicaRepository.getCapability(capabilityType);
}
public void close() {
diff --git a/src/main/java/com/amazon/carbonado/repo/replicated/ReplicatedRepositoryBuilder.java b/src/main/java/com/amazon/carbonado/repo/replicated/ReplicatedRepositoryBuilder.java
index 3ab2146..da242e6 100644
--- a/src/main/java/com/amazon/carbonado/repo/replicated/ReplicatedRepositoryBuilder.java
+++ b/src/main/java/com/amazon/carbonado/repo/replicated/ReplicatedRepositoryBuilder.java
@@ -36,9 +36,12 @@ import com.amazon.carbonado.spi.BelatedRepositoryCreator;
/**
* Repository builder for the replicated repository.
* <p>
- * The following extra capabilities are supported:
+ * In addition to providing all the replica's capabilities, the following extra
+ * capabilities are supported:
* <ul>
* <li>{@link com.amazon.carbonado.capability.ResyncCapability ResyncCapability}
+ * <li>{@link com.amazon.carbonado.capability.ShutdownCapability ShutdownCapability}
+ * <li>{@link com.amazon.carbonado.capability.StorableInfoCapability StorableInfoCapability}
* </ul>
*
* @author Don Schneider