Package org.dizitart.no2.store
Class AbstractNitriteStore<Config extends StoreConfig>
java.lang.Object
org.dizitart.no2.store.AbstractNitriteStore<Config>
- Type Parameters:
Config- the type of the store configuration object
- All Implemented Interfaces:
AutoCloseable,NitritePlugin,NitriteStore<Config>
public abstract class AbstractNitriteStore<Config extends StoreConfig>
extends Object
implements NitriteStore<Config>
An abstract implementation of the
NitriteStore interface
that provides common functionality for Nitrite data stores.- Since:
- 4.0
- Author:
- Anindya Chatterjee
-
Method Summary
Modifier and TypeMethodDescriptionvoidThis method is called before closing the store.Gets the store catalog.Returns a set of all collection names in the store.org.dizitart.no2.common.event.NitriteEventBus<EventInfo,StoreEventListener> The event bus used to publish and subscribe to store events.Returns a set of all the keyed-repository names registered in the Nitrite store.The NitriteConfig object that holds the configuration for the Nitrite database.Returns a set of all the repository names registered in the Nitrite store.The catalog of all the collections and repositories in the Nitrite database.The configuration object for the Nitrite store.voidinitialize(NitriteConfig nitriteConfig) Initializes the plugin instance.voidsetStoreConfig(Config storeConfig) The configuration object for the Nitrite store.subscribe(StoreEventListener listener) Subscribes aStoreEventListenerto this store.voidunsubscribe(String subscription) Unsubscribes aStoreEventListenerfrom this store.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.dizitart.no2.common.module.NitritePlugin
closeMethods inherited from interface org.dizitart.no2.store.NitriteStore
closeMap, closeRTree, commit, getStoreVersion, hasMap, hasUnsavedChanges, isClosed, isReadOnly, openMap, openOrCreate, openRTree, removeMap, removeRTree
-
Method Details
-
getCollectionNames
Description copied from interface:NitriteStoreReturns a set of all collection names in the store.- Specified by:
getCollectionNamesin interfaceNitriteStore<Config extends StoreConfig>- Returns:
- a set of all collection names in the store
-
getRepositoryRegistry
Description copied from interface:NitriteStoreReturns a set of all the repository names registered in the Nitrite store.- Specified by:
getRepositoryRegistryin interfaceNitriteStore<Config extends StoreConfig>- Returns:
- a set of all the repository names registered in the Nitrite store
-
getKeyedRepositoryRegistry
Description copied from interface:NitriteStoreReturns a set of all the keyed-repository names registered in the Nitrite store.- Specified by:
getKeyedRepositoryRegistryin interfaceNitriteStore<Config extends StoreConfig>- Returns:
- a set of all the keyed-repository names registered in the Nitrite store
-
beforeClose
public void beforeClose()Description copied from interface:NitriteStoreThis method is called before closing the store. Any cleanup or finalization tasks should be performed in this method.- Specified by:
beforeClosein interfaceNitriteStore<Config extends StoreConfig>
-
subscribe
Description copied from interface:NitriteStoreSubscribes aStoreEventListenerto this store. The listener will be notified of any changes made to the store.- Specified by:
subscribein interfaceNitriteStore<Config extends StoreConfig>- Parameters:
listener- the listener to subscribe
-
unsubscribe
Description copied from interface:NitriteStoreUnsubscribes aStoreEventListenerfrom this store.- Specified by:
unsubscribein interfaceNitriteStore<Config extends StoreConfig>- Parameters:
subscription- the subscription to unsubscribe
-
initialize
Description copied from interface:NitritePluginInitializes the plugin instance.- Specified by:
initializein interfaceNitritePlugin- Parameters:
nitriteConfig- the nitrite config
-
getCatalog
Description copied from interface:NitriteStoreGets the store catalog.- Specified by:
getCatalogin interfaceNitriteStore<Config extends StoreConfig>- Returns:
- the catalog
-
getStoreConfig
The configuration object for the Nitrite store.- Specified by:
getStoreConfigin interfaceNitriteStore<Config extends StoreConfig>- Returns:
- the store config
-
getEventBus
The event bus used to publish and subscribe to store events. -
getNitriteConfig
The NitriteConfig object that holds the configuration for the Nitrite database. -
getStoreCatalog
The catalog of all the collections and repositories in the Nitrite database. -
setStoreConfig
The configuration object for the Nitrite store.
-