diff options
Diffstat (limited to 'src/main/java/com/amazon/carbonado/spi')
-rw-r--r-- | src/main/java/com/amazon/carbonado/spi/AbstractRepository.java | 6 | ||||
-rw-r--r-- | src/main/java/com/amazon/carbonado/spi/BelatedRepositoryCreator.java | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/com/amazon/carbonado/spi/AbstractRepository.java b/src/main/java/com/amazon/carbonado/spi/AbstractRepository.java index 688134b..03a6b75 100644 --- a/src/main/java/com/amazon/carbonado/spi/AbstractRepository.java +++ b/src/main/java/com/amazon/carbonado/spi/AbstractRepository.java @@ -139,10 +139,16 @@ public abstract class AbstractRepository<Txn> return null;
}
+ @Override
public void close() {
shutdown(false);
}
+ @Override
+ public boolean isClosed() {
+ return transactionManager().isClosed();
+ }
+
// Required by ShutdownCapability.
public synchronized boolean isAutoShutdownEnabled() {
return mShutdownHook != null;
diff --git a/src/main/java/com/amazon/carbonado/spi/BelatedRepositoryCreator.java b/src/main/java/com/amazon/carbonado/spi/BelatedRepositoryCreator.java index b5676a4..6a7bad6 100644 --- a/src/main/java/com/amazon/carbonado/spi/BelatedRepositoryCreator.java +++ b/src/main/java/com/amazon/carbonado/spi/BelatedRepositoryCreator.java @@ -145,6 +145,10 @@ public class BelatedRepositoryCreator extends BelatedCreator<Repository, Support public void close() {
}
+ public boolean isClosed() {
+ return false;
+ }
+
private IllegalStateException error() {
return new IllegalStateException
("Creation of Repository \"" + mBuilder.getName() + "\" is delayed");
|