public interface Database extends Database, LocaleFinder
At the present moment, this file defines methods which will at some point be moved to to the external database interface. There are a bunch of the unimplemninted interface that used to be in this file. They have been moved to old_Database.java. old_Database.java is checked into the codeline but is not built, it is there for reference
LUCENE_DIR
Modifier and Type | Method and Description |
---|---|
void |
failover(java.lang.String dbname)
Start failover for the given database.
|
AuthenticationService |
getAuthenticationService()
This method returns the authentication service handle for the
database.
|
DataDictionary |
getDataDictionary()
Return the DataDictionary for this database, set up at boot time.
|
int |
getEngineType() |
java.lang.Object |
getResourceAdapter()
Get a Resource Adapter - only used by XA system.
|
boolean |
isActive()
Is the database active (open).
|
boolean |
isInSlaveMode()
Used to indicated whether the database is in the replication
slave mode.
|
void |
pushDbContext(ContextManager cm)
Push a DbContext onto the provided context stack.
|
void |
setLocale(java.util.Locale locale)
Set the Locale that is returned by this LocaleFinder
|
LanguageConnectionContext |
setupConnection(ContextManager cm,
java.lang.String user,
java.lang.String drdaID,
java.lang.String dbname)
Sets up a connection to the Database, owned by the given user.
|
void |
startReplicationMaster(java.lang.String dbmaster,
java.lang.String host,
int port,
java.lang.String replicationMode)
Start the replication master role for this database
|
void |
stopReplicationMaster()
Stop the replication master role for the given database.
|
void |
stopReplicationSlave()
Stop the replication slave role for the given database.
|
backup, backupAndEnableLogArchiveMode, checkpoint, disableLogArchiveMode, freeze, getId, getLocale, isReadOnly, unfreeze
getCurrentLocale, getDateFormat, getTimeFormat, getTimestampFormat
LanguageConnectionContext setupConnection(ContextManager cm, java.lang.String user, java.lang.String drdaID, java.lang.String dbname) throws StandardException
user
- The UserID of the user getting the connectiondrdaID
- The drda id of the connection (from network server)dbname
- The database nameStandardException
- thrown if unable to create the connection.void pushDbContext(ContextManager cm)
boolean isActive()
int getEngineType()
AuthenticationService getAuthenticationService() throws StandardException
StandardException
- standard Derby exception policyjava.lang.Object getResourceAdapter()
void setLocale(java.util.Locale locale)
DataDictionary getDataDictionary()
void failover(java.lang.String dbname) throws StandardException
dbname
- the replication database that is being failed over.StandardException
- 1) If the failover succeeds, an exception
is thrown to indicate that the master
database was shutdown after a successful
failover
2) If a failure occurs during network
communication with slave.boolean isInSlaveMode()
void stopReplicationSlave() throws java.sql.SQLException
java.sql.SQLException
- Thrown on errorvoid startReplicationMaster(java.lang.String dbmaster, java.lang.String host, int port, java.lang.String replicationMode) throws java.sql.SQLException
dbmaster
- The master database that is being replicated.host
- The hostname for the slaveport
- The port the slave is listening onreplicationMode
- The type of replication contract.
Currently only asynchronous replication is supported, but
1-safe/2-safe/very-safe modes may be added later.java.sql.SQLException
- Thrown on errorvoid stopReplicationMaster() throws java.sql.SQLException
java.sql.SQLException
- Thrown on errorApache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.