net.ontopia.topicmaps.impl.rdbms
Class RDBMSTopicMapReference

java.lang.Object
  extended by net.ontopia.topicmaps.entry.AbstractTopicMapReference
      extended by net.ontopia.topicmaps.impl.rdbms.RDBMSTopicMapReference
All Implemented Interfaces:
TopicMapReferenceIF

public class RDBMSTopicMapReference
extends AbstractTopicMapReference

INTERNAL: RDBMS database topic map reference.


Field Summary
protected  LocatorIF base_address
           
static java.lang.String EXHAUSED_BLOCK
           
static java.lang.String EXHAUSED_FAIL
           
static java.lang.String EXHAUSED_GROW
           
protected  StorePoolableObjectFactory ofactory
           
protected  org.apache.commons.pool.impl.GenericObjectPool pool
           
protected  RDBMSTopicMapStore rostore
           
protected  StorageIF storage
           
protected  long topicmap_id
           
 
Fields inherited from class net.ontopia.topicmaps.entry.AbstractTopicMapReference
deleted, id, isopen, listeners, source, title, topic_listeners
 
Constructor Summary
RDBMSTopicMapReference(java.lang.String _id, java.lang.String _title, StorageIF _storage, long _topicmap_id, LocatorIF _base_address)
           
 
Method Summary
protected  RDBMSTopicMapStore _createStore(boolean readonly)
           
 void clear()
          EXPERIMENTAL: Closes all open stores and clears the topic map by removing all data.
 void close()
          PUBLIC: Closes all open stores and the reference itself.
 TopicMapStoreIF createStore(boolean readonly)
          PUBLIC: Creates a topic map store that lets you access the referenced topic map.
 void delete()
          PUBLIC: Closes all open stores and deletes the topic map.
 long getTopicMapId()
           
protected  void init()
           
 void open()
          PUBLIC: Opens the reference.
 void storeClosed(TopicMapStoreIF store)
          INTERNAL: Callback from the specified TopicMapStoreIF after it has been closed.
 java.lang.String toString()
           
 void writeReport(java.io.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, setTitle, setTopicListeners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EXHAUSED_BLOCK

public static final java.lang.String EXHAUSED_BLOCK
See Also:
Constant Field Values

EXHAUSED_GROW

public static final java.lang.String EXHAUSED_GROW
See Also:
Constant Field Values

EXHAUSED_FAIL

public static final java.lang.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.pool.impl.GenericObjectPool pool

rostore

protected RDBMSTopicMapStore rostore
Constructor Detail

RDBMSTopicMapReference

public RDBMSTopicMapReference(java.lang.String _id,
                              java.lang.String _title,
                              StorageIF _storage,
                              long _topicmap_id,
                              LocatorIF _base_address)
Method Detail

_createStore

protected RDBMSTopicMapStore _createStore(boolean readonly)

init

protected void init()

open

public void open()
Description copied from interface: TopicMapReferenceIF
PUBLIC: Opens the reference.

Specified by:
open in interface TopicMapReferenceIF
Overrides:
open in class AbstractTopicMapReference

createStore

public TopicMapStoreIF createStore(boolean readonly)
Description copied from interface: TopicMapReferenceIF
PUBLIC: Creates a topic map store that lets you access the referenced topic map.

Specified by:
createStore in interface TopicMapReferenceIF
Specified by:
createStore in class AbstractTopicMapReference

close

public void close()
Description copied from interface: TopicMapReferenceIF
PUBLIC: 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:
close in interface TopicMapReferenceIF
Overrides:
close in class AbstractTopicMapReference

clear

public void clear()
Description copied from interface: TopicMapReferenceIF
EXPERIMENTAL: 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:
clear in interface TopicMapReferenceIF
Overrides:
clear in class AbstractTopicMapReference

delete

public void delete()
Description copied from interface: TopicMapReferenceIF
PUBLIC: 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:
delete in interface TopicMapReferenceIF
Overrides:
delete in class AbstractTopicMapReference

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getTopicMapId

public long getTopicMapId()

storeClosed

public void storeClosed(TopicMapStoreIF store)
Description copied from interface: TopicMapReferenceIF
INTERNAL: Callback from the specified TopicMapStoreIF after it has been closed. Warning: Intended for internal use only.

Specified by:
storeClosed in interface TopicMapReferenceIF
Overrides:
storeClosed in class AbstractTopicMapReference

writeReport

public void writeReport(java.io.Writer out,
                        boolean dumpCaches)
                 throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2000-2012 Ontopia.