org.wso2.carbon.registry.core.jdbc.dao
Class JDBCPathCache

java.lang.Object
  extended by org.wso2.carbon.registry.core.caching.PathCache
      extended by 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.


Field Summary
 
Fields inherited from class org.wso2.carbon.registry.core.caching.PathCache
pathCache
 
Method Summary
 int addEntry(String path, int parentPathId)
          Method to add resource path entry to the database.
static JDBCPathCache getPathCache()
           
 int getPathID(Connection conn, 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
 

Method Detail

getPathCache

public static JDBCPathCache getPathCache()

addEntry

public int addEntry(String path,
                    int parentPathId)
             throws 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.
SQLException - if an error occurs while adding the entry.

getPathID

public int getPathID(Connection conn,
                     String path)
              throws 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:
SQLException - if an error occurs while obtaining the path id.


Copyright © 2011 WSO2 Inc. All Rights Reserved.