org.apache.lucene.gdata.storage
Interface StorageController

All Superinterfaces:
ServerComponent
All Known Implementing Classes:
DB4oController, StorageCoreController

public interface StorageController
extends ServerComponent

An interface to define a central storage controller acting as a Stroage Factory. The StroageController manages the storage logic. Subclasses of StorageController can be registered as Component in the GDataServerRegistry. A single instance of the contorller will be loaded and passed to clients via the lookup service.

This instances, registered in the registry must be thread save as they are shared between several clients

Each StroageController implementation must provide a super user GDataAccount with all GDataAccount.AccountRole set. This account must have the defined name administrator and a default password password. The password has to be updated by the server administrator before production use. To get the predefinded GDataAccount use GDataAccount.createAdminAccount()

Author:
Simon Willnauer

Method Summary
 void destroy()
          Destroys the controller - this method is called by the registry when the context will be destroyed
 Storage getStorage()
          Creates Storage instances to access the underlaying storage component
 String releaseId()
          Releases a new unique ID
 
Methods inherited from interface org.apache.lucene.gdata.server.registry.ServerComponent
initialize
 

Method Detail

destroy

void destroy()
Destroys the controller - this method is called by the registry when the context will be destroyed

Specified by:
destroy in interface ServerComponent

getStorage

Storage getStorage()
                   throws StorageException
Creates Storage instances to access the underlaying storage component

Returns:
a storage instance
Throws:
StorageException - - if the storage instance can not be created

releaseId

String releaseId()
Releases a new unique ID

Returns:
- unique ID


Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.