|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.lucene.gdata.storage.db4o.DB4oController
public class DB4oController
The DB4o StorageContorller can be used as a persitence component for the gdata-server. To use DB4o a third party jar needs to added to the lib directory of the project. If the jar is not available in the lib directory all db4o dependent class won't be included in the build.
If the jar is present in the lib directory this class can be configured as a
ComponentType.STORAGECONTROLLER
via the gdata-config.xml file. For detailed config documentation see
the wiki page.
The DB4oController can run as a client or as a server to serve other running db4o clients in the network. To achive the best performance out of the db4o caching layer connections to the server will be reused in a connection pool. A connection will not be shared withing more than one thread. The controller release one connection per request and returns the connection when the request has been destroyed.
Pool
Constructor Summary | |
---|---|
DB4oController()
|
Method Summary | |
---|---|
void |
destroy()
will be called when the registry is going down e.g. |
int |
getContainerPoolSize()
|
String |
getFilePath()
|
String |
getHost()
|
String |
getPassword()
|
int |
getPort()
|
Storage |
getStorage()
Creates Storage instances to access the underlaying storage component |
String |
getUser()
|
void |
initialize()
will be call when the component is registered. |
boolean |
isRunAsServer()
|
boolean |
isUseWeakReferences()
|
String |
releaseId()
Releases a new unique ID |
void |
setContainerPoolSize(int containerPoolSize)
|
void |
setFilePath(String filePath)
|
void |
setHost(String host)
|
void |
setPassword(String password)
|
void |
setPort(int port)
|
void |
setRunAsServer(boolean runAsServer)
|
void |
setUser(String user)
|
void |
setUseWeakReferences(boolean weakReferences)
|
String |
toString()
|
void |
visiteDestroy()
Visites the destory of the scope |
void |
visiteInitialize()
Visites the initialization of the scope |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DB4oController() throws NoSuchAlgorithmException
NoSuchAlgorithmException
Method Detail |
---|
public void destroy()
ServerComponent
GDataServerRegistry.destroy()
method is called.
destroy
in interface ServerComponent
destroy
in interface StorageController
StorageController.destroy()
public Storage getStorage() throws StorageException
StorageController
getStorage
in interface StorageController
StorageException
- -
if the storage instance can not be createdStorageController.getStorage()
public void initialize()
ServerComponent
initialize
in interface ServerComponent
ServerComponent.initialize()
public String releaseId()
StorageController
releaseId
in interface StorageController
StorageController.releaseId()
public void visiteInitialize()
ScopeVisitor
visiteInitialize
in interface ScopeVisitor
ScopeVisitor.visiteInitialize()
public void visiteDestroy()
ScopeVisitor
visiteDestroy
in interface ScopeVisitor
ScopeVisitor.visiteDestroy()
public String getFilePath()
public void setFilePath(String filePath)
filePath
- The filePath to set.public String getHost()
public void setHost(String host)
host
- The host to set.public String getPassword()
public void setPassword(String password)
password
- The password to set.public int getPort()
public void setPort(int port)
port
- The port to set.public boolean isRunAsServer()
public void setRunAsServer(boolean runAsServer)
runAsServer
- The runAsServer to set.public String getUser()
public void setUser(String user)
user
- The user to set.public boolean isUseWeakReferences()
public void setUseWeakReferences(boolean weakReferences)
weakReferences
- The weakReferences to set.public int getContainerPoolSize()
public void setContainerPoolSize(int containerPoolSize)
containerPoolSize
- The containerPoolSize to set.public String toString()
toString
in class Object
Object.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |