org.wso2.carbon.registry.core.jdbc.dao
Class JDBCPathCache
java.lang.Object
org.wso2.carbon.registry.core.caching.PathCache
org.wso2.carbon.registry.core.jdbc.dao.JDBCPathCache
public class JDBCPathCache
- extends PathCache
An extension of the PathCache
to store paths of registry resources on a JDBC-based
database.
Method Summary |
int |
addEntry(java.lang.String path,
int parentPathId)
Method to add resource path entry to the database. |
static JDBCPathCache |
getPathCache()
|
int |
getPathID(java.sql.Connection conn,
java.lang.String path)
Method to get the path id of a given path. |
Methods inherited from class org.wso2.carbon.registry.core.caching.PathCache |
hitRate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JDBCPathCache
public JDBCPathCache()
getPathCache
public static JDBCPathCache getPathCache()
addEntry
public int addEntry(java.lang.String path,
int parentPathId)
throws java.sql.SQLException,
RegistryException
- Method to add resource path entry to the database.
- Parameters:
path
- the path to add.parentPathId
- the parent path's id.
- Returns:
- the path's id.
- Throws:
RegistryException
- if the data access manager was invalid.
java.sql.SQLException
- if an error occurs while adding the entry.
getPathID
public int getPathID(java.sql.Connection conn,
java.lang.String path)
throws java.sql.SQLException
- Method to get the path id of a given path.
- Parameters:
conn
- the database connection to use.path
- the path.
- Returns:
- the path id corresponding to the given path.
- Throws:
java.sql.SQLException
- if an error occurs while obtaining the path id.
Copyright © 2011 WSO2 Inc. All Rights Reserved.