|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.wso2.carbon.registry.core.jdbc.dao.PathCache
public class PathCache
Implementation of caching for resource paths. This is based on Cache
.
Method Summary | |
---|---|
int |
addEntry(String path,
int parentPathId)
Method to add resource path entry to the database. |
static PathCache |
createPathCache(int maxElementsInMemory,
boolean eternal,
long timeToLiveSeconds)
Creates a object storing a set of cached paths. |
static PathCache |
getPathCache()
Method to obtain the created path cache instance. |
int |
getPathID(Connection conn,
String path)
Method to get the path id of a given path. |
double |
hitRate()
Method to get the cache hit rate. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static PathCache createPathCache(int maxElementsInMemory, boolean eternal, long timeToLiveSeconds)
maxElementsInMemory
- maximum number of cached elements in memory.eternal
- whether the elements in the cache are eternal, i.e. never expiretimeToLiveSeconds
- the default amount of time to live for an element from its
creation date
Cache
public static PathCache getPathCache()
public double hitRate()
public int addEntry(String path, int parentPathId) throws SQLException
path
- the path to add.parentPathId
- the parent path's id.
SQLException
- if an error occurs while adding the entry.public int getPathID(Connection conn, String path) throws SQLException
conn
- the database connection to use.path
- the path.
SQLException
- if an error occurs while obtaining the path id.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |