From 4684549782accd0ffba1aefd15d42918effeddfd Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Tue, 22 Dec 2009 01:15:07 +0000 Subject: Added isClosed method to Repository. --- src/main/java/com/amazon/carbonado/spi/AbstractRepository.java | 6 ++++++ .../java/com/amazon/carbonado/spi/BelatedRepositoryCreator.java | 4 ++++ 2 files changed, 10 insertions(+) (limited to 'src/main/java/com/amazon/carbonado/spi') 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 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