Package net.ontopia.topicmaps.impl.rdbms
Class RDBMSTopicMapReference
- java.lang.Object
-
- net.ontopia.topicmaps.entry.AbstractTopicMapReference
-
- net.ontopia.topicmaps.impl.rdbms.RDBMSTopicMapReference
-
- All Implemented Interfaces:
AutoCloseable,TopicMapReferenceIF
public class RDBMSTopicMapReference extends AbstractTopicMapReference
INTERNAL: RDBMS database topic map reference.
-
-
Field Summary
Fields Modifier and Type Field Description protected LocatorIFbase_addressstatic StringEXHAUSED_BLOCKstatic StringEXHAUSED_FAILstatic StringEXHAUSED_GROWprotected StorePoolableObjectFactoryofactoryprotected org.apache.commons.pool2.impl.GenericObjectPoolpoolprotected RDBMSTopicMapStorerostoreprotected StorageIFstorageprotected longtopicmap_id-
Fields inherited from class net.ontopia.topicmaps.entry.AbstractTopicMapReference
deleted, id, isopen, listeners, source, title, topic_listeners
-
-
Constructor Summary
Constructors Constructor Description RDBMSTopicMapReference(String _id, String _title, StorageIF _storage, long _topicmap_id, LocatorIF _base_address)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected RDBMSTopicMapStore_createStore(boolean readonly)voidclear()EXPERIMENTAL: Closes all open stores and clears the topic map by removing all data.voidclose()PUBLIC: Closes all open stores and the reference itself.TopicMapStoreIFcreateStore(boolean readonly)PUBLIC: Creates a topic map store that lets you access the referenced topic map.voiddelete()PUBLIC: Closes all open stores and deletes the topic map.LocatorIFgetBaseAddress()INTERNAL: Returns the base address locator to be used when loading the topic map.longgetTopicMapId()protected voidinit()voidopen()PUBLIC: Opens the reference.voidsetBaseAddress(LocatorIF base_address)INTERNAL: Sets the base address locator to be used when loading the topic map and persists it in the database.voidsetTitle(String title)PUBLIC: Sets the title of the reference.voidstoreClosed(TopicMapStoreIF store)INTERNAL: Callback from the specified TopicMapStoreIF after it has been closed.StringtoString()voidwriteReport(Writer out, boolean dumpCaches)-
Methods inherited from class net.ontopia.topicmaps.entry.AbstractTopicMapReference
addTopicListener, getId, getSource, getTitle, getTopicListeners, isDeleted, isOpen, makeListenerArray, registerTopicListeners, removeTopicListener, setId, setSource, setTopicListeners
-
-
-
-
Field Detail
-
EXHAUSED_BLOCK
public static final String EXHAUSED_BLOCK
- See Also:
- Constant Field Values
-
EXHAUSED_GROW
public static final String EXHAUSED_GROW
- See Also:
- Constant Field Values
-
EXHAUSED_FAIL
public static final String EXHAUSED_FAIL
- See Also:
- Constant Field Values
-
storage
protected StorageIF storage
-
topicmap_id
protected long topicmap_id
-
base_address
protected LocatorIF base_address
-
ofactory
protected StorePoolableObjectFactory ofactory
-
pool
protected org.apache.commons.pool2.impl.GenericObjectPool pool
-
rostore
protected RDBMSTopicMapStore rostore
-
-
Method Detail
-
_createStore
protected RDBMSTopicMapStore _createStore(boolean readonly)
-
init
protected void init()
-
open
public void open()
Description copied from interface:TopicMapReferenceIFPUBLIC: Opens the reference.- Specified by:
openin interfaceTopicMapReferenceIF- Overrides:
openin classAbstractTopicMapReference
-
createStore
public TopicMapStoreIF createStore(boolean readonly)
Description copied from interface:TopicMapReferenceIFPUBLIC: Creates a topic map store that lets you access the referenced topic map.- Specified by:
createStorein interfaceTopicMapReferenceIF- Specified by:
createStorein classAbstractTopicMapReference
-
setTitle
public void setTitle(String title)
Description copied from interface:TopicMapReferenceIFPUBLIC: Sets the title of the reference.- Specified by:
setTitlein interfaceTopicMapReferenceIF- Overrides:
setTitlein classAbstractTopicMapReference
-
getBaseAddress
public LocatorIF getBaseAddress()
INTERNAL: Returns the base address locator to be used when loading the topic map.
-
setBaseAddress
public void setBaseAddress(LocatorIF base_address)
INTERNAL: Sets the base address locator to be used when loading the topic map and persists it in the database.
-
close
public void close()
Description copied from interface:TopicMapReferenceIFPUBLIC: Closes all open stores and the reference itself. Note that topic map stores created through this reference are closed and dereferenced when the reference is closed. The reference can be reopened after it has been closed.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceTopicMapReferenceIF- Overrides:
closein classAbstractTopicMapReference
-
clear
public void clear()
Description copied from interface:TopicMapReferenceIFEXPERIMENTAL: Closes all open stores and clears the topic map by removing all data. The reference is closed before the topic map is deleted. The reference can be reopened after the topic map has been deleted.- Specified by:
clearin interfaceTopicMapReferenceIF- Overrides:
clearin classAbstractTopicMapReference
-
delete
public void delete()
Description copied from interface:TopicMapReferenceIFPUBLIC: Closes all open stores and deletes the topic map. The reference is closed before the topic map is deleted. The reference cannot be reopened after the topic map has been deleted.- Specified by:
deletein interfaceTopicMapReferenceIF- Overrides:
deletein classAbstractTopicMapReference
-
getTopicMapId
public long getTopicMapId()
-
storeClosed
public void storeClosed(TopicMapStoreIF store)
Description copied from interface:TopicMapReferenceIFINTERNAL: Callback from the specified TopicMapStoreIF after it has been closed. Warning: Intended for internal use only.- Specified by:
storeClosedin interfaceTopicMapReferenceIF- Overrides:
storeClosedin classAbstractTopicMapReference
-
writeReport
public void writeReport(Writer out, boolean dumpCaches) throws IOException
- Throws:
IOException
-
-