diff options
author | Jesse Morgan <jesse@jesterpm.net> | 2013-10-25 01:36:27 +0000 |
---|---|---|
committer | Jesse Morgan <jesse@jesterpm.net> | 2013-10-25 01:36:27 +0000 |
commit | bcfaaffa3751f8c7883e41c162ba4030fd9bd21a (patch) | |
tree | 7e2416a6ec9d3733a20e45e7028bf60410ac7504 /src/main/java/com/amazon/carbonado/spi | |
parent | 1a6cb41e1db610d6cea249b5b33ad65cfd945b2f (diff) |
Fixing ReplicatedRepository so that transactions may be entered when the master
is unavailable as long as no changes are made to replicated storables.
Diffstat (limited to 'src/main/java/com/amazon/carbonado/spi')
-rw-r--r-- | src/main/java/com/amazon/carbonado/spi/BelatedRepositoryCreator.java | 5 | ||||
-rw-r--r-- | src/main/java/com/amazon/carbonado/spi/BelatedStorageCreator.java | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/main/java/com/amazon/carbonado/spi/BelatedRepositoryCreator.java b/src/main/java/com/amazon/carbonado/spi/BelatedRepositoryCreator.java index e004340..30fff0c 100644 --- a/src/main/java/com/amazon/carbonado/spi/BelatedRepositoryCreator.java +++ b/src/main/java/com/amazon/carbonado/spi/BelatedRepositoryCreator.java @@ -33,6 +33,7 @@ import com.amazon.carbonado.Transaction; import com.amazon.carbonado.capability.Capability;
+import com.amazon.carbonado.util.BelatedCreationException;
import com.amazon.carbonado.util.BelatedCreator;
/**
@@ -158,8 +159,8 @@ public class BelatedRepositoryCreator extends BelatedCreator<Repository, Support return false;
}
- private IllegalStateException error() {
- return new IllegalStateException
+ private BelatedCreationException error() {
+ return new BelatedCreationException
("Creation of Repository \"" + mBuilder.getName() + "\" is delayed");
}
}
diff --git a/src/main/java/com/amazon/carbonado/spi/BelatedStorageCreator.java b/src/main/java/com/amazon/carbonado/spi/BelatedStorageCreator.java index 9a66b29..5f5b716 100644 --- a/src/main/java/com/amazon/carbonado/spi/BelatedStorageCreator.java +++ b/src/main/java/com/amazon/carbonado/spi/BelatedStorageCreator.java @@ -29,6 +29,7 @@ import com.amazon.carbonado.SupportException; import com.amazon.carbonado.Trigger;
import com.amazon.carbonado.filter.Filter;
+import com.amazon.carbonado.util.BelatedCreationException;
import com.amazon.carbonado.util.BelatedCreator;
/**
@@ -135,8 +136,8 @@ public class BelatedStorageCreator<S extends Storable> throw error();
}
- private IllegalStateException error() {
- return new IllegalStateException
+ private BelatedCreationException error() {
+ return new BelatedCreationException
("Creation of Storage for type \"" + mStorableType.getName() + "\" is delayed");
}
}
|