From f1ca557cc885fd86859901f3acd2897919ae1b72 Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Fri, 2 May 2008 22:33:47 +0000 Subject: Replicated repository returns replica's capabilities and not master's. Access to master is provided via resync capability. --- .../com/amazon/carbonado/repo/replicated/ReplicatedRepository.java | 7 +------ .../carbonado/repo/replicated/ReplicatedRepositoryBuilder.java | 5 ++++- 2 files changed, 5 insertions(+), 7 deletions(-) (limited to 'src/main') 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. *

- * The following extra capabilities are supported: + * In addition to providing all the replica's capabilities, the following extra + * capabilities are supported: *

* * @author Don Schneider -- cgit v1.2.3