Classes | |
class | Filter |
Public Member Functions | |
void | loadFactory () |
void | recoverClients () |
String | getRecordPath (String curl) |
void | parseNode (DALNode node, XMLHandler xmlSolver, String path) throws SAXException, IOException, AcsJCDBXMLErrorEx |
XMLHandler | loadRecords (String curl, boolean toString) throws AcsJCDBRecordDoesNotExistEx, AcsJCDBXMLErrorEx |
boolean | wasCacheLimitReached () |
String | get_DAO (String curl) throws CDBRecordDoesNotExistEx, CDBXMLErrorEx |
synchronized String | internal_get_DAO (String curl, boolean precacheStage) throws CDBRecordDoesNotExistEx, CDBXMLErrorEx |
synchronized DAO | get_DAO_Servant (String curl) throws CDBRecordDoesNotExistEx, CDBXMLErrorEx |
void | shutdown () |
void | shutdownEmbeddedDALImpl () |
void | loadListeners () |
boolean | saveListeners () |
int | add_change_listener (DALChangeListener listener) |
void | listen_for_changes (String curl, int listenerID) |
void | remove_change_listener (int listenerID) |
void | clear_cache (String curl) |
void | clear_cache_all () |
String | list_nodes (String name) |
String | list_daos (String name) |
String | configuration_name () |
SAXParser | getSaxParser () |
boolean | isShutdown () |
Static Public Member Functions | |
static String | getSchemas (String root, Logger logger) |
static void | getFiles (String filePath, LinkedHashMap< String, String > map) |
Public Attributes | |
final boolean | useXsdCache |
Static Public Attributes | |
static final String | SCHEMA_VALIDATION_FEATURE_ID = "http://apache.org/xml/features/validation/schema" |
static final String | EXTERNAL_SCHEMA_LOCATION_PROPERTY_ID = "http://apache.org/xml/properties/schema/external-schemaLocation" |
static final String | USE_XSD_CACHE_PROPERTYNAME = "cdb.useXsdCache" |
Protected Member Functions | |
void | object_changed (String curl) |
File | getStorageFile () |
void | cleanListenedCurls () |
Protected Attributes | |
final AtomicLong | totalDALInvocationCounter |
Package Functions | |
DALImpl (String args[], ORB orb_val, POA poa_val, Logger logger) |
A note about the inheritance structure used in this module: The writable variant of the DAL interface delegates to an instance of DALImpl for all JDALOperations, see WDALBaseImpl. It only adds the implementation of the WDALOperations methods.
com.cosylab.cdb.jdal.DALImpl.DALImpl | ( | String | args[], | |
ORB | orb_val, | |||
POA | poa_val, | |||
Logger | logger | |||
) | [package] |
C'tor
args | ||
orb_val | ||
poa_val |
IllegalArgumentException | if the computed CDB root directory does not exist. |
References com.cosylab.cdb.jdal.DALImpl.loadFactory(), com.cosylab.cdb.jdal.DALImpl.shutdown(), com.cosylab.cdb.jdal.DALImpl.totalDALInvocationCounter, com.cosylab.cdb.jdal.DALImpl.USE_XSD_CACHE_PROPERTYNAME, and com.cosylab.cdb.jdal.DALImpl.useXsdCache.
int com.cosylab.cdb.jdal.DALImpl.add_change_listener | ( | DALChangeListener | listener | ) |
References com.cosylab.cdb.jdal.DALImpl.totalDALInvocationCounter.
Referenced by com.cosylab.cdb.jdal.WDALBaseImpl.add_change_listener().
void com.cosylab.cdb.jdal.DALImpl.cleanListenedCurls | ( | ) | [protected] |
Cleans listened curls from invalid listeners to avoid repeatedly calling invalid listeners
Referenced by com.cosylab.cdb.jdal.DALImpl.clear_cache().
void com.cosylab.cdb.jdal.DALImpl.clear_cache | ( | String | curl | ) |
References com.cosylab.cdb.jdal.DALImpl.cleanListenedCurls(), com.cosylab.cdb.jdal.DALImpl.object_changed(), com.cosylab.cdb.jdal.DALImpl.saveListeners(), and com.cosylab.cdb.jdal.DALImpl.totalDALInvocationCounter.
Referenced by com.cosylab.cdb.jdal.WDALBaseImpl.clear_cache(), and com.cosylab.cdb.jdal.DALImpl.clear_cache_all().
void com.cosylab.cdb.jdal.DALImpl.clear_cache_all | ( | ) |
References com.cosylab.cdb.jdal.DALImpl.clear_cache(), com.cosylab.cdb.jdal.DALNode.getRoot(), com.cosylab.cdb.jdal.DALImpl.loadFactory(), and com.cosylab.cdb.jdal.DALImpl.totalDALInvocationCounter.
Referenced by com.cosylab.cdb.jdal.WDALBaseImpl.clear_cache_all(), and com.cosylab.cdb.jdal.DALImpl.recoverClients().
String com.cosylab.cdb.jdal.DALImpl.configuration_name | ( | ) |
References com.cosylab.cdb.jdal.DALImpl.totalDALInvocationCounter.
Referenced by com.cosylab.cdb.jdal.WDALBaseImpl.configuration_name().
String com.cosylab.cdb.jdal.DALImpl.get_DAO | ( | String | curl | ) | throws CDBRecordDoesNotExistEx, CDBXMLErrorEx |
returns full expanded XML string
References com.cosylab.cdb.jdal.DALImpl.internal_get_DAO().
Referenced by com.cosylab.cdb.jdal.WDALBaseImpl.get_DAO(), and com.cosylab.cdb.jdal.WDALImpl.set_DAO().
synchronized DAO com.cosylab.cdb.jdal.DALImpl.get_DAO_Servant | ( | String | curl | ) | throws CDBRecordDoesNotExistEx, CDBXMLErrorEx |
create DAO servant with requested XML
References com.cosylab.cdb.jdal.DALImpl.loadRecords(), com.cosylab.cdb.jdal.XMLHandler.m_rootNode, and com.cosylab.cdb.jdal.DALImpl.totalDALInvocationCounter.
Referenced by com.cosylab.cdb.jdal.WDALBaseImpl.get_DAO_Servant(), and com.cosylab.cdb.jdal.WDALImpl.get_WDAO_Servant().
static void com.cosylab.cdb.jdal.DALImpl.getFiles | ( | String | filePath, | |
LinkedHashMap< String, String > | map | |||
) | [static] |
Adds all *.xsd files from filePath directory if file already exists in map it is skipped
Referenced by com.cosylab.cdb.jdal.DALImpl.getSchemas().
String com.cosylab.cdb.jdal.DALImpl.getRecordPath | ( | String | curl | ) |
Referenced by com.cosylab.cdb.jdal.WDALImpl.getNodeFile(), and com.cosylab.cdb.jdal.DALImpl.parseNode().
SAXParser com.cosylab.cdb.jdal.DALImpl.getSaxParser | ( | ) |
Referenced by com.cosylab.cdb.jdal.WDALImpl.validateXML().
static String com.cosylab.cdb.jdal.DALImpl.getSchemas | ( | String | root, | |
Logger | logger | |||
) | [static] |
returns string of URIs separated by ' ' for all schema files in root/schemas and directories list given by ACS.cdbpath environment variable
This method is public static to be used more easily in the HibernateDAL (com.cosylab.cdb.jdal.XSDElementTypeResolver.initializeParser())
References com.cosylab.cdb.jdal.DALImpl.getFiles().
File com.cosylab.cdb.jdal.DALImpl.getStorageFile | ( | ) | [protected] |
: For the TMCDB XML import it does not make sense to create a recovery file. Shouldn't we support a mode that skips this?
Referenced by com.cosylab.cdb.jdal.DALImpl.loadListeners(), and com.cosylab.cdb.jdal.DALImpl.saveListeners().
synchronized String com.cosylab.cdb.jdal.DALImpl.internal_get_DAO | ( | String | curl, | |
boolean | precacheStage | |||
) | throws CDBRecordDoesNotExistEx, CDBXMLErrorEx |
returns full expanded XML string
References com.cosylab.cdb.jdal.DALImpl.loadRecords(), com.cosylab.cdb.jdal.DALImpl.shutdown(), com.cosylab.cdb.jdal.XMLHandler.toString(), and com.cosylab.cdb.jdal.DALImpl.totalDALInvocationCounter.
Referenced by com.cosylab.cdb.jdal.DALImpl.get_DAO().
boolean com.cosylab.cdb.jdal.DALImpl.isShutdown | ( | ) |
String com.cosylab.cdb.jdal.DALImpl.list_daos | ( | String | name | ) |
References com.cosylab.cdb.jdal.XMLTreeNode.getNodesMap(), com.cosylab.cdb.jdal.DALNode.getRoot(), com.cosylab.cdb.jdal.DALNode.list(), com.cosylab.cdb.jdal.XMLHandler.m_rootNode, and com.cosylab.cdb.jdal.DALImpl.totalDALInvocationCounter.
Referenced by com.cosylab.cdb.jdal.WDALBaseImpl.list_daos().
String com.cosylab.cdb.jdal.DALImpl.list_nodes | ( | String | name | ) |
void com.cosylab.cdb.jdal.DALImpl.listen_for_changes | ( | String | curl, | |
int | listenerID | |||
) |
void com.cosylab.cdb.jdal.DALImpl.loadFactory | ( | ) |
void com.cosylab.cdb.jdal.DALImpl.loadListeners | ( | ) |
References com.cosylab.cdb.jdal.DALImpl.getStorageFile().
Referenced by com.cosylab.cdb.jdal.DALImpl.recoverClients().
XMLHandler com.cosylab.cdb.jdal.DALImpl.loadRecords | ( | String | curl, | |
boolean | toString | |||
) | throws AcsJCDBRecordDoesNotExistEx, AcsJCDBXMLErrorEx |
Returns a xml constructed of all records below given curl
curl | ||
toString |
AcsJCDBRecordDoesNotExistEx | ||
AcsJCDBXMLErrorEx |
References com.cosylab.cdb.jdal.DALNode.findNode(), com.cosylab.cdb.jdal.XMLHandler.getChild(), alma.acs.util.StopWatch.getLapTimeMillis(), com.cosylab.cdb.jdal.DALNode.getRoot(), com.cosylab.cdb.jdal.DALNode.hasXmlChild(), com.cosylab.cdb.jdal.DALNode.isSimple(), com.cosylab.cdb.jdal.DALNode.name, com.cosylab.cdb.jdal.DALImpl.parseNode(), com.cosylab.cdb.jdal.XMLHandler.setAutoCloseStartingElement(), and com.cosylab.cdb.jdal.XMLHandler.setMarkArrays().
Referenced by com.cosylab.cdb.jdal.DALImpl.get_DAO_Servant(), and com.cosylab.cdb.jdal.DALImpl.internal_get_DAO().
void com.cosylab.cdb.jdal.DALImpl.object_changed | ( | String | curl | ) | [protected] |
curl |
Referenced by com.cosylab.cdb.jdal.DALImpl.clear_cache().
void com.cosylab.cdb.jdal.DALImpl.parseNode | ( | DALNode | node, | |
XMLHandler | xmlSolver, | |||
String | path | |||
) | throws SAXException, IOException, AcsJCDBXMLErrorEx |
References com.cosylab.cdb.jdal.DALImpl.getRecordPath(), and com.cosylab.cdb.jdal.DALNode.name.
Referenced by com.cosylab.cdb.jdal.DALImpl.loadRecords().
void com.cosylab.cdb.jdal.DALImpl.recoverClients | ( | ) |
Recovery related implementation. Load list of listeners from the recovery file and notifies them to clear cache. NOTICE: This method should be called when DAL POA is alrady initialized and active. NOTE: Method execution depends on recoveryRead
variable.
Implements com.cosylab.cdb.jdal.Recoverer.
References com.cosylab.cdb.jdal.DALImpl.clear_cache_all(), and com.cosylab.cdb.jdal.DALImpl.loadListeners().
Referenced by com.cosylab.cdb.jdal.WDALBaseImpl.recoverClients().
void com.cosylab.cdb.jdal.DALImpl.remove_change_listener | ( | int | listenerID | ) |
boolean com.cosylab.cdb.jdal.DALImpl.saveListeners | ( | ) |
References com.cosylab.cdb.jdal.DALImpl.getStorageFile().
Referenced by com.cosylab.cdb.jdal.DALImpl.clear_cache(), com.cosylab.cdb.jdal.DALImpl.listen_for_changes(), and com.cosylab.cdb.jdal.DALImpl.remove_change_listener().
void com.cosylab.cdb.jdal.DALImpl.shutdown | ( | ) |
void com.cosylab.cdb.jdal.DALImpl.shutdownEmbeddedDALImpl | ( | ) |
boolean com.cosylab.cdb.jdal.DALImpl.wasCacheLimitReached | ( | ) |
final String com.cosylab.cdb.jdal.DALImpl.EXTERNAL_SCHEMA_LOCATION_PROPERTY_ID = "http://apache.org/xml/properties/schema/external-schemaLocation" [static] |
Property for setting the mapping of URIs to XML schemas. See http://xerces.apache.org/xerces2-j/properties.html
Referenced by com.cosylab.cdb.jdal.DALImpl.loadFactory().
final String com.cosylab.cdb.jdal.DALImpl.SCHEMA_VALIDATION_FEATURE_ID = "http://apache.org/xml/features/validation/schema" [static] |
Schema validation feature id (http://apache.org/xml/features/validation/schema). See http://xerces.apache.org/xerces2-j/features.html
Referenced by com.cosylab.cdb.jdal.DALImpl.loadFactory().
final AtomicLong com.cosylab.cdb.jdal.DALImpl.totalDALInvocationCounter [protected] |
Referenced by com.cosylab.cdb.jdal.DALImpl.add_change_listener(), com.cosylab.cdb.jdal.WDALImpl.add_node(), com.cosylab.cdb.jdal.DALImpl.clear_cache(), com.cosylab.cdb.jdal.DALImpl.clear_cache_all(), com.cosylab.cdb.jdal.DALImpl.configuration_name(), com.cosylab.cdb.jdal.DALImpl.DALImpl(), com.cosylab.cdb.jdal.DALImpl.get_DAO_Servant(), com.cosylab.cdb.jdal.WDALImpl.get_WDAO_Servant(), com.cosylab.cdb.jdal.DALImpl.internal_get_DAO(), com.cosylab.cdb.jdal.DALImpl.list_daos(), com.cosylab.cdb.jdal.DALImpl.list_nodes(), com.cosylab.cdb.jdal.DALImpl.listen_for_changes(), com.cosylab.cdb.jdal.DALImpl.remove_change_listener(), com.cosylab.cdb.jdal.WDALImpl.remove_node(), com.cosylab.cdb.jdal.WDALImpl.set_DAO(), and com.cosylab.cdb.jdal.DALImpl.shutdown().
final String com.cosylab.cdb.jdal.DALImpl.USE_XSD_CACHE_PROPERTYNAME = "cdb.useXsdCache" [static] |
The XSD cache may have additional bad side effects (one was a failure with xinclude which has been fixed), so we only use it if this property is set to true to switch it off easily in case of problems.
Referenced by com.cosylab.cdb.jdal.DALImpl.DALImpl().
final boolean com.cosylab.cdb.jdal.DALImpl.useXsdCache |
Referenced by com.cosylab.cdb.jdal.DALImpl.DALImpl(), and com.cosylab.cdb.jdal.DALImpl.loadFactory().