| com.db4o.ext.ExtClient
All known Subclasses: com.db4o.internal.cs.ClientObjectContainer,
ExtClient | public interface ExtClient extends ExtObjectContainer(Code) | | extended client functionality for the
ExtObjectContainer ExtObjectContainer interface.
Both
com.db4o.Db4o.openClient Db4o.openClient() methods always
return an ExtClient object so a cast is possible.
The ObjectContainer functionality is split into multiple interfaces to allow newcomers to
focus on the essential methods.
|
Method Summary | |
public boolean | isAlive() checks if the client is currently connected to a server. | public void | switchToFile(String fileName) requests opening a different server database file for this client session.
This method can be used to switch between database files from the client
side while not having to open a new socket connection or closing the
current one.
If the database file does not exist on the server, it will be created.
A typical usecase:
The main database file is used for login, user and rights management only.
Only one single db4o server session needs to be run. | public void | switchToMainFile() requests switching back to the main database file after a previous call
to switchToFile(String fileName) . |
isAlive | public boolean isAlive()(Code) | | checks if the client is currently connected to a server.
true if the client is alive. |
switchToFile | public void switchToFile(String fileName)(Code) | | requests opening a different server database file for this client session.
This method can be used to switch between database files from the client
side while not having to open a new socket connection or closing the
current one.
If the database file does not exist on the server, it will be created.
A typical usecase:
The main database file is used for login, user and rights management only.
Only one single db4o server session needs to be run. Multiple satellite
database files are used for different applications or multiple user circles.
Storing the data to multiple database files has the following advantages:
- easier rights management
- easier backup
- possible later load balancing to multiple servers
- better performance of smaller individual database files
- special debugging database files can be used
User authorization to the alternative database file will not be checked.
All persistent references to objects that are currently in memory
are discarded during the switching process.
Parameters: fileName - the fully qualified path of the requested database file. |
switchToMainFile | public void switchToMainFile()(Code) | | requests switching back to the main database file after a previous call
to switchToFile(String fileName) .
All persistent references to objects that are currently in memory
are discarded during the switching process.
|
|
|