|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
JMX Interface of the C-JDBC Controller.
Method Summary | |
void |
addDriver(byte[] bytes)
Reads a driver binary data |
java.lang.String |
addDriver(java.lang.String filename)
Reads a driver JAR file. |
void |
addVirtualDatabases(java.lang.String xml)
Registers one or several virtual databases in the controller. |
void |
addVirtualDatabases(java.lang.String xml,
java.lang.String virtualName,
int autoEnable,
java.lang.String checkPoint)
Registers one or several virtual databases in the controller. |
java.lang.String |
generateLogReport()
Generate a log report on the controller now |
java.lang.String |
generateReport()
Generate a report on the controller now |
int |
getBacklogSize()
Get the controller socket backlog size. |
boolean |
getIsShuttingDown()
Is the controller shutting down ? |
java.lang.String |
getJmxName()
Gets the jmx name of the controller. |
java.lang.String |
getName()
Gets the controller name. |
int |
getPortNumber()
Return this controller port number |
java.lang.String |
getVersionNumber()
Gets the controller version. |
boolean |
hasVirtualDatabase(java.lang.String name)
Tests if a VirtualDatabase of a given name exists in this
controller. |
boolean |
isCacheEnableForDatabase(java.lang.String virtualDbNAme)
Tell whether the database has some cache enabled |
boolean |
isDistributedVirtualDatabase(java.lang.String databaseName)
|
java.io.File[] |
listAvailableDumpFiles()
List all the available dump files on this controller |
java.util.ArrayList |
listBackends(java.lang.String virtualDbName)
Returns the list of backends for a given database name |
java.util.ArrayList |
listDatabaseClients(java.lang.String virtualDbName)
Get the VirtualDatabaseWorkerThread clients of the given
database |
java.util.ArrayList |
listVirtualDatabases()
Gets the name of the available virtual databases. |
java.lang.String |
loadXML(java.lang.String filename)
Reads a XML configuration file. |
java.lang.String |
loadXmlConfiguration(java.lang.String filename,
java.lang.String virtualName,
int autoEnable,
java.lang.String checkPoint)
Reads an xml configuration file and search information to load the specified database |
void |
refreshLogConfiguration()
Refreshs the logging system configuration by re-reading the log4j.properties file. |
boolean |
removeDumpFile(java.io.File dumpFile)
Delete a dump file from the controller repository |
java.lang.String |
removeVirtualDatabase(java.lang.String virtualname)
Prevent the controller from accessing a virtual database thereafter |
java.lang.String |
saveConfiguration()
Save current configuration of the controller to a default file location. |
void |
setBacklogSize(int size)
Set the controller socket backlog size. |
void |
shutdown(int level)
Turns the controller down by using default shutdown level |
void |
shutdownDatabase(java.lang.String databaseName,
int level)
Shutdown a database in the given mode. |
void |
updateLogConfigurationFile(java.lang.String newConfiguration)
Update the log4j configuration file with the given content Also call refreshLogConfiguration method |
java.lang.String |
viewConfiguration()
Retrieve the configuration about this controller in text format. |
java.lang.String |
viewDatabases()
Make a separation between the configuration of the controller and the virtual databases |
java.lang.String |
viewDatabasesXml()
View xml configuration of the databases without transformation |
java.lang.String |
viewDatabaseXml(java.lang.String databaseName)
View the xml configuration of the given database |
java.lang.String |
viewInfo()
Retrieve the information about this controller in xml format. |
java.lang.String |
viewLogConfigurationFile()
Retrieve the content of the log4j configuration file |
Method Detail |
public java.lang.String getName()
String
value containing the controller name.public java.lang.String getJmxName()
String
value containing the jmx name of the
controllerpublic int getPortNumber()
int
containing the port code numberpublic int getBacklogSize()
public void setBacklogSize(int size)
size
- backlog sizepublic boolean getIsShuttingDown()
public boolean hasVirtualDatabase(java.lang.String name)
VirtualDatabase
of a given name exists in this
controller.
name
- the virtual database name
true
if the virtual database existspublic java.lang.String getVersionNumber() throws java.rmi.RemoteException
String
value containing the version number
java.rmi.RemoteException
- if an error occurspublic java.util.ArrayList listVirtualDatabases() throws java.lang.Exception
ArrayList
containing String
object
representing the virtual database names
java.lang.Exception
- if an error occurspublic java.util.ArrayList listBackends(java.lang.String virtualDbName) throws java.lang.Exception
virtualDbName
- name of the virtual database
ArrayList
of String
of the names of
the backends
java.lang.Exception
- if fails to access the backendspublic java.util.ArrayList listDatabaseClients(java.lang.String virtualDbName) throws java.lang.Exception
VirtualDatabaseWorkerThread
clients of the given
database
virtualDbName
- the name of the virtual database
ArrayList
of
java.lang.Exception
- if failspublic boolean isCacheEnableForDatabase(java.lang.String virtualDbNAme) throws java.lang.Exception
virtualDbNAme
- name of the VirtualDatabase
java.lang.Exception
- if database does not existspublic void addVirtualDatabases(java.lang.String xml) throws ControllerException
This function expects the content of an XML file conforming to the C-JDBC
DTD to be given as a single String
object.
xml
- XML code to parse
ControllerException
- if an error occurs while interpreting XMLpublic void addVirtualDatabases(java.lang.String xml, java.lang.String virtualName, int autoEnable, java.lang.String checkPoint) throws ControllerException
This function expects the content of an XML file conforming to the C-JDBC
DTD to be given as a single String
object.
xml
- XML code to parsevirtualName
- name of the virtual databaseautoEnable
- specify if should be enabled as soon as it is addedcheckPoint
- the checkpoint to use to enable the database
ControllerException
- if an error occurs while interpreting XMLpublic void refreshLogConfiguration() throws ControllerException
log4j.properties
file.
ControllerException
- if the log4j.properties
file
cannot be found in classpathpublic java.lang.String loadXML(java.lang.String filename) throws java.lang.Exception
filename
- XML configuration file name
java.lang.Exception
- if an error occurspublic java.lang.String loadXmlConfiguration(java.lang.String filename, java.lang.String virtualName, int autoEnable, java.lang.String checkPoint) throws java.lang.Exception
filename
- the path to the xml filevirtualName
- the virtual database we want to loadautoEnable
- Specifiy whether the backends should be enabledcheckPoint
- Recover from specified checkpoint if needed
java.lang.Exception
- if an error occurspublic void shutdown(int level) throws ControllerException
level
- Smart,Fast or Immediate.
ControllerException
- if unknown level or other error occurs.public java.lang.String addDriver(java.lang.String filename) throws java.lang.Exception
filename
- name of the file
java.lang.Exception
- if an error occurspublic void addDriver(byte[] bytes) throws java.lang.Exception
bytes
- the data in a byte array
java.lang.Exception
- if failspublic java.lang.String removeVirtualDatabase(java.lang.String virtualname) throws java.lang.Exception
virtualname
- the virtual database name to remove
java.lang.Exception
- if failspublic java.lang.String viewInfo() throws java.lang.Exception
java.lang.Exception
- if failspublic java.lang.String viewConfiguration() throws java.lang.Exception
java.lang.Exception
- if failspublic java.lang.String viewDatabases() throws java.lang.Exception
java.lang.Exception
- if failspublic java.lang.String saveConfiguration() throws java.lang.Exception
java.lang.Exception
- if failspublic java.lang.String viewDatabasesXml() throws java.lang.Exception
java.lang.Exception
- if an error occurspublic java.lang.String viewDatabaseXml(java.lang.String databaseName) throws java.lang.Exception
databaseName
- name of the database
java.lang.Exception
- if failspublic java.lang.String generateReport() throws java.lang.Exception
java.lang.Exception
- if failspublic java.lang.String generateLogReport() throws java.lang.Exception
java.lang.Exception
- if failspublic void shutdownDatabase(java.lang.String databaseName, int level) throws ControllerException
databaseName
- the database to shut downlevel
- the level of shutdown define in ControllerConstants
ControllerException
- if failspublic java.io.File[] listAvailableDumpFiles()
File
denoting the available files.
Cannot be null but can be empty.public boolean removeDumpFile(java.io.File dumpFile)
dumpFile
- the file reference of the dumpFile
public java.lang.String viewLogConfigurationFile() throws java.io.IOException
String
java.io.IOException
- if IO problemspublic void updateLogConfigurationFile(java.lang.String newConfiguration) throws java.io.IOException, ControllerException
refreshLogConfiguration
method
newConfiguration
- the content of the new log4j configuration
java.io.IOException
- if cannot access the log4j file
ControllerException
- if could not refresh the logspublic boolean isDistributedVirtualDatabase(java.lang.String databaseName)
VirtualDatabaseMBean.isDistributed()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |