public interface TopicMapStoreIF extends AutoCloseable
A topic map store is opened either explicitly through the open() method or implicitly via the getTopicMap() method. If the store is transactional, a new transaction is created when the store is opened.
To make persistent changes in the topic map, use the commit method. To roll back any changes since the last commit (or open), call the abort method. (Note that this only works with transactional stores).
Make sure that you close the store when you are done in order to release resources held by the store. A closed store can be reopened. Closing a transactional store aborts the current transaction, so commit before you close.
Modifier and Type | Field and Description |
---|---|
static int |
IN_MEMORY_IMPLEMENTATION
PUBLIC: Constant that identifies the in-memory topic map
implementation.
|
static int |
RDBMS_IMPLEMENTATION
PUBLIC: Constant that identifies the rdbms topic map implementation.
|
Modifier and Type | Method and Description |
---|---|
void |
abort()
PUBLIC: Aborts and deactivates the top-level transaction; all
changes made inside the root transaction are lost.
|
void |
close()
PUBLIC: Closes the store and aborts the transaction if active.
|
void |
commit()
PUBLIC: Commits and deactivates the top-level transaction.
|
void |
delete(boolean force)
PUBLIC: Deletes the TopicMapIF from the data store.
|
LocatorIF |
getBaseAddress()
PUBLIC: Gets a locator of the topic map in the store.
|
int |
getImplementation()
PUBLIC: Returns the topic map implementation identifier.
|
String |
getProperty(String propertyName)
PUBLIC: Returns the value of the specified topic map store
property.
|
TopicMapReferenceIF |
getReference()
INTERNAL: Returns a topic map reference for this store.
|
TopicMapIF |
getTopicMap()
PUBLIC: Gets the topic map that is accessible through the
root transaction of the store.
|
boolean |
isOpen()
PUBLIC: Returns true if the store is open (because opening a
transactional store starts a transaction, "true" also means a
transaction is in progress).
|
boolean |
isReadOnly()
PUBLIC: Returns true if the store is usable for read-only
purposes only.
|
boolean |
isTransactional()
PUBLIC: Returns true if the store supports transactions.
|
void |
open()
PUBLIC: Opens the store, and starts a new transaction on a transactional store.
|
void |
setBaseAddress(LocatorIF base_address)
EXPERIMENTAL: Sets the persistent base address of the store.
|
void |
setReference(TopicMapReferenceIF reference)
INTERNAL: Sets the topic map reference for this store.
|
static final int IN_MEMORY_IMPLEMENTATION
static final int RDBMS_IMPLEMENTATION
int getImplementation()
IN_MEMORY_IMPLEMENTATION
or RDBMS_IMPLEMENTATION
flags.boolean isTransactional()
boolean isOpen()
void open()
void close()
close
in interface AutoCloseable
LocatorIF getBaseAddress()
void setBaseAddress(LocatorIF base_address)
TopicMapIF getTopicMap()
void commit()
void abort()
void delete(boolean force) throws NotRemovableException
If the force flag is false and the topic map contains any objects, i.e. topics and associations, a NotRemovableException will be thrown. The topic map will not be modified or closed if this is so.
If the force flag is true, the topic map will be deleted even if it contains any objects.
Note: if you're retrieved the store via a TopicMapReferenceIF then call delete(boolean) on the reference instead.
NotRemovableException
boolean isReadOnly()
String getProperty(String propertyName)
TopicMapReferenceIF getReference()
void setReference(TopicMapReferenceIF reference)