public class RDBMSTopicMapStore extends AbstractTopicMapStore
Modifier and Type | Field and Description |
---|---|
protected Map<String,String> |
properties |
protected String |
propfile |
protected RDBMSStorage |
storage |
protected boolean |
storage_local |
protected long |
topicmap_id |
protected RDBMSTopicMapTransaction |
transaction |
protected static Class[] |
types |
base_address, closed, deleted, open, readonly, readonlySet, reference, topic_listeners
IN_MEMORY_IMPLEMENTATION, RDBMS_IMPLEMENTATION
Constructor and Description |
---|
RDBMSTopicMapStore()
PUBLIC: Creates a new topic map store without a specified
database property file.
|
RDBMSTopicMapStore(long topicmap_id)
PUBLIC: Creates a new topic map store without a specified
database property file.
|
RDBMSTopicMapStore(Map<String,String> properties)
PUBLIC: Creates a new topic map store with the specified database
properties.
|
RDBMSTopicMapStore(Map<String,String> properties,
long topicmap_id)
PUBLIC: Creates a new topic map store with the specified database
properties.
|
RDBMSTopicMapStore(StorageIF storage)
INTERNAL:
|
RDBMSTopicMapStore(StorageIF storage,
long topicmap_id)
INTERNAL:
|
RDBMSTopicMapStore(String propfile)
PUBLIC: Creates a new topic map store with the database property
file set.
|
RDBMSTopicMapStore(String propfile,
long topicmap_id)
PUBLIC: Creates a new topic map store with the database property
file set.
|
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 |
clear() |
void |
clearCache()
INTERNAL: Empties the shared RDBMS caches.
|
void |
close()
PUBLIC: Closes the store and aborts the transaction if active.
|
void |
close(boolean returnStore) |
void |
commit()
PUBLIC: Commits and deactivates the top-level transaction.
|
void |
delete(boolean force)
PUBLIC: Deletes the TopicMapIF from the data store.
|
protected boolean |
delete(RDBMSTopicMapReference ref) |
void |
evictObject(String object_id)
INTERNAL: Evicts the given object from the shared RDBMS caches.
|
protected void |
finalize() |
void |
flush() |
LocatorIF |
getBaseAddress()
PUBLIC: Gets a locator of the topic map in the store.
|
Connection |
getConnection() |
ConnectionFactoryIF |
getConnectionFactory(boolean readonly) |
EventManagerIF |
getEventManager() |
protected IdentityIF |
getIdentityForObjectId(TransactionIF txn,
String object_id) |
int |
getImplementation()
PUBLIC: Returns the topic map implementation identifier.
|
long |
getLongId() |
long |
getLongId(TMObjectIF o) |
String |
getProperty(String name)
INTERNAL: Gets the value of the specified store property.
|
String |
getQueryString(String name) |
RDBMSStorage |
getStorage()
INTERNAL: Returns the proxy storage implementation used by the
topic map store.
|
TopicMapIF |
getTopicMap()
PUBLIC: Gets the topic map that is accessible through the
root transaction of the store.
|
TopicMapTransactionIF |
getTransaction() |
TransactionIF |
getTransactionIF() |
boolean |
isTransactional()
PUBLIC: Returns true if the store supports transactions.
|
void |
merged(TMObjectIF source,
TMObjectIF target)
INTERNAL: Called by MergeUtils to notify transaction of a performed merge.
|
boolean |
prefetch(int type,
int[] fields,
boolean[] traverse,
Collection objects) |
boolean |
prefetch(int type,
int field,
boolean traverse,
Collection objects) |
boolean |
prefetchFieldsById(Collection<String> object_ids,
int field) |
boolean |
prefetchObjectsById(Collection<String> object_ids) |
void |
prefetchRolesByType(Collection players,
TopicIF rtype,
TopicIF atype) |
void |
setBaseAddress(LocatorIF base_address)
EXPERIMENTAL: Sets the persistent base address of the store.
|
void |
setBaseAddressOverride(LocatorIF base_address)
INTERNAL: Sets the apparent base address of the store.
|
boolean |
validate() |
void |
writeIdentityMap(Writer out,
boolean dump)
EXPERIMENTAL: Dumps the identity map to the given writer.
|
void |
writeReport(String filename,
boolean dumpCaches)
EXPERIMENTAL: Writes a cache statistics report to the given
file.
|
void |
writeReport(Writer out,
boolean dumpCaches)
EXPERIMENTAL: Writes a cache statistics report to the given writer.
|
getReference, isOpen, isReadOnly, open, setReadOnly, setReference, setTopicListeners
protected static final Class[] types
protected long topicmap_id
protected RDBMSStorage storage
protected String propfile
protected RDBMSTopicMapTransaction transaction
protected boolean storage_local
public RDBMSTopicMapStore() throws IOException
IOException
public RDBMSTopicMapStore(long topicmap_id) throws IOException
IOException
public RDBMSTopicMapStore(String propfile) throws IOException
propfile
- Path reference to a Java properties file.IOException
public RDBMSTopicMapStore(String propfile, long topicmap_id) throws IOException
propfile
- Path reference to a Java properties file.topicmap_id
- The ID of the topic map in the database.IOException
public RDBMSTopicMapStore(Map<String,String> properties) throws IOException
IOException
public RDBMSTopicMapStore(Map<String,String> properties, long topicmap_id) throws IOException
IOException
public RDBMSTopicMapStore(StorageIF storage)
public RDBMSTopicMapStore(StorageIF storage, long topicmap_id)
public RDBMSStorage getStorage()
public int getImplementation()
TopicMapStoreIF
TopicMapStoreIF.IN_MEMORY_IMPLEMENTATION
or TopicMapStoreIF.RDBMS_IMPLEMENTATION
flags.public boolean isTransactional()
TopicMapStoreIF
public LocatorIF getBaseAddress()
TopicMapStoreIF
getBaseAddress
in interface TopicMapStoreIF
getBaseAddress
in class AbstractTopicMapStore
public void setBaseAddress(LocatorIF base_address)
TopicMapStoreIF
public void setBaseAddressOverride(LocatorIF base_address)
public TransactionIF getTransactionIF()
public TopicMapTransactionIF getTransaction()
getTransaction
in class AbstractTopicMapStore
public TopicMapIF getTopicMap()
TopicMapStoreIF
getTopicMap
in interface TopicMapStoreIF
getTopicMap
in class AbstractTopicMapStore
public void commit()
TopicMapStoreIF
commit
in interface TopicMapStoreIF
commit
in class AbstractTopicMapStore
public void abort()
TopicMapStoreIF
abort
in interface TopicMapStoreIF
abort
in class AbstractTopicMapStore
public void clear()
protected boolean delete(RDBMSTopicMapReference ref)
public void delete(boolean force) throws NotRemovableException
TopicMapStoreIF
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.
delete
in interface TopicMapStoreIF
delete
in class AbstractTopicMapStore
NotRemovableException
public String getProperty(String name)
public void close()
TopicMapStoreIF
public void close(boolean returnStore)
close
in class AbstractTopicMapStore
public boolean validate()
validate
in class AbstractTopicMapStore
public void evictObject(String object_id)
public void clearCache()
public void writeReport(String filename, boolean dumpCaches) throws IOException
filename
- the name of the file to write the report todumpCaches
- whether to include detailed cache dumpsIOException
public void writeReport(Writer out, boolean dumpCaches) throws IOException
out
- the writer to write the report todumpCaches
- whether to include detailed cache dumpsIOException
public void writeIdentityMap(Writer out, boolean dump) throws IOException
out
- the writer to write the report toIOException
public boolean prefetchObjectsById(Collection<String> object_ids)
public boolean prefetchFieldsById(Collection<String> object_ids, int field)
protected IdentityIF getIdentityForObjectId(TransactionIF txn, String object_id)
public boolean prefetch(int type, int field, boolean traverse, Collection objects)
public boolean prefetch(int type, int[] fields, boolean[] traverse, Collection objects)
public void prefetchRolesByType(Collection players, TopicIF rtype, TopicIF atype)
public long getLongId()
public long getLongId(TMObjectIF o)
public void flush()
public Connection getConnection()
public ConnectionFactoryIF getConnectionFactory(boolean readonly)
public void merged(TMObjectIF source, TMObjectIF target)
source
- target
- public EventManagerIF getEventManager()
getEventManager
in class AbstractTopicMapStore