Package org.glassfish.ha.store.api
Interface BackingStoreFactory
-
- All Known Implementing Classes:
NoOpBackingStoreFactory
@Contract public interface BackingStoreFactoryA factory for creating BackingStore(s). Every provider must provide an implementation of this interface.The
createBackingStore(env)method is called typically during container creation time. A store instance is typically used to store state for a single container.Any runtime exception thrown from createBackingStore and createBatchBackingStore method will cause the container to use a default persistence-type (typically no replication) and a log message will be logged at WARNING level.
- Author:
- Mahesh Kannan
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <K extends Serializable,V extends Serializable>
BackingStore<K,V>createBackingStore(BackingStoreConfiguration<K,V> conf)This method is called to create a BackingStore.BackingStoreTransactioncreateBackingStoreTransaction()
-
-
-
Method Detail
-
createBackingStore
<K extends Serializable,V extends Serializable> BackingStore<K,V> createBackingStore(BackingStoreConfiguration<K,V> conf) throws BackingStoreException
This method is called to create a BackingStore. This class must be thread safe.If the factory can produce a BackingStore that can handle the factors specified in the conf, then it must return a fully initialized and operational BackingStore. Else it must return null.
- Parameters:
conf- The BackingStoreConfiguration- Returns:
- a BackingStore. The returned BackingStore must be thread safe.
- Throws:
BackingStoreException- If the store could not be created
-
createBackingStoreTransaction
BackingStoreTransaction createBackingStoreTransaction()
- Returns:
-
-