org.planx.xmlstore.koala.storage
Class StorageManager

java.lang.Object
  extended by org.planx.xmlstore.koala.storage.StorageManager
All Implemented Interfaces:
Loader<RelativeDualReference<Locator,LocalLocator>,SystemNode>
Direct Known Subclasses:
SegmentManager

public abstract class StorageManager
extends Object
implements Loader<RelativeDualReference<Locator,LocalLocator>,SystemNode>

Author:
Thomas Ambus

Constructor Summary
StorageManager()
           
 
Method Summary
abstract  void addRootListener(LocatorListener l)
           
abstract  LocalLocator asMemoryRoot(LocalLocator loc)
          Returns a weak, in-memory root for a strong root.
abstract  void close()
           
abstract  void flush()
           
static StorageManager instance(String name)
           
static StorageManager instance(String name, StorageConfiguration config)
           
abstract  SystemNode load(LocalLocator loc)
          Loads a node with the specified LocalLocator.
abstract  SystemNode load(RelativeDualReference<Locator,LocalLocator> ref)
           
abstract  void release(LocalLocator loc)
          Releases a root that was previously retained.
abstract  void removeRootListener(LocatorListener l)
           
abstract  void retain(LocalLocator loc)
          Requests that a root be kept permanently alive.
abstract  LocalLocator save(SystemNode node)
          Saves a node and returns a LocalLocator to it.
abstract  long size()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StorageManager

public StorageManager()
Method Detail

instance

public static StorageManager instance(String name)
                               throws IOException
Throws:
IOException

instance

public static StorageManager instance(String name,
                                      StorageConfiguration config)
                               throws IOException
Throws:
IOException

load

public abstract SystemNode load(LocalLocator loc)
                         throws IOException
Loads a node with the specified LocalLocator.

Throws:
IOException

load

public abstract SystemNode load(RelativeDualReference<Locator,LocalLocator> ref)
                         throws IOException
Specified by:
load in interface Loader<RelativeDualReference<Locator,LocalLocator>,SystemNode>
Throws:
IOException

save

public abstract LocalLocator save(SystemNode node)
                           throws IOException
Saves a node and returns a LocalLocator to it.

Throws:
IOException

flush

public abstract void flush()
                    throws IOException
Throws:
IOException

close

public abstract void close()
                    throws IOException
Throws:
IOException

size

public abstract long size()
                   throws IOException
Throws:
IOException

retain

public abstract void retain(LocalLocator loc)
Requests that a root be kept permanently alive.


release

public abstract void release(LocalLocator loc)
                      throws UnknownReferenceException
Releases a root that was previously retained.

Throws:
UnknownReferenceException

asMemoryRoot

public abstract LocalLocator asMemoryRoot(LocalLocator loc)
Returns a weak, in-memory root for a strong root. TODO: Perhaps strong roots should have a different type?


addRootListener

public abstract void addRootListener(LocatorListener l)

removeRootListener

public abstract void removeRootListener(LocatorListener l)


Copyright © 2004-2005 Plan-X. All Rights Reserved.