org.apache.avalon.cornerstone.blocks.masterstore
Class File_Persistent_Object_Repository

java.lang.Object
  extended by org.apache.avalon.cornerstone.blocks.masterstore.AbstractFileRepository
      extended by org.apache.avalon.cornerstone.blocks.masterstore.AbstractFilePersistentObjectRepository
          extended by org.apache.avalon.cornerstone.blocks.masterstore.File_Persistent_Object_Repository
All Implemented Interfaces:
org.apache.avalon.cornerstone.services.store.ObjectRepository, org.apache.avalon.cornerstone.services.store.Repository, org.apache.avalon.framework.activity.Initializable, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.context.Contextualizable, org.apache.avalon.framework.logger.LogEnabled

public class File_Persistent_Object_Repository
extends AbstractFilePersistentObjectRepository
implements org.apache.avalon.cornerstone.services.store.ObjectRepository, org.apache.avalon.framework.context.Contextualizable, org.apache.avalon.framework.activity.Initializable, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.logger.LogEnabled

This is a simple implementation of persistent object store using object serialization on the file system.

Author:
Stefano Mazzocchi, Federico Barbieri, Paul Hammant

Field Summary
 
Fields inherited from class org.apache.avalon.cornerstone.blocks.masterstore.AbstractFileRepository
BYTE_MASK, DEBUG, HANDLED_URL, HEX_DIGITS, m_baseDirectory, m_destination, m_extension, m_filter, m_name, m_path, monitor
 
Constructor Summary
File_Persistent_Object_Repository()
           
 
Method Summary
 void configure(org.apache.avalon.framework.configuration.Configuration configuration)
          Configuration of the component by the container.
 void contextualize(org.apache.avalon.framework.context.Context context)
          Contextualization of the component by the container during which the working home directory will be provided.
 void enableLogging(org.apache.avalon.framework.logger.Logger logger)
           
 void initialize()
          Initialization of the component by the container.
protected  void initializeChild(AbstractFileRepository child)
           
 
Methods inherited from class org.apache.avalon.cornerstone.blocks.masterstore.AbstractFilePersistentObjectRepository
get, get, getExtensionDecorator, put
 
Methods inherited from class org.apache.avalon.cornerstone.blocks.masterstore.AbstractFileRepository
containsKey, createChildRepository, decode, encode, getChildRepository, getFile, getInputStream, getOutputStream, list, remove, setDestination
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.avalon.cornerstone.services.store.ObjectRepository
containsKey, get, get, list, put, remove
 
Methods inherited from interface org.apache.avalon.cornerstone.services.store.Repository
getChildRepository
 

Constructor Detail

File_Persistent_Object_Repository

public File_Persistent_Object_Repository()
Method Detail

enableLogging

public void enableLogging(org.apache.avalon.framework.logger.Logger logger)
Specified by:
enableLogging in interface org.apache.avalon.framework.logger.LogEnabled

initializeChild

protected void initializeChild(AbstractFileRepository child)
                        throws java.lang.Exception
Specified by:
initializeChild in class AbstractFileRepository
Throws:
java.lang.Exception

contextualize

public void contextualize(org.apache.avalon.framework.context.Context context)
                   throws org.apache.avalon.framework.context.ContextException
Contextualization of the component by the container during which the working home directory will be provided.

Specified by:
contextualize in interface org.apache.avalon.framework.context.Contextualizable
Parameters:
context - the supplied context object
Throws:
org.apache.avalon.framework.context.ContextException

initialize

public void initialize()
                throws java.lang.Exception
Initialization of the component by the container.

Specified by:
initialize in interface org.apache.avalon.framework.activity.Initializable
Throws:
java.lang.Exception - if a initialization stage error occurs

configure

public void configure(org.apache.avalon.framework.configuration.Configuration configuration)
               throws org.apache.avalon.framework.configuration.ConfigurationException
Configuration of the component by the container.

Specified by:
configure in interface org.apache.avalon.framework.configuration.Configurable
Parameters:
configuration - the configuration
Throws:
org.apache.avalon.framework.configuration.ConfigurationException - if a configuration error occurs