|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.Observable scone.netobjects.AccessCache
public class AccessCache
caches the access table from the database and provides means to update the database
Field Summary | |
---|---|
protected static CacheTable |
cache
|
static java.lang.Object |
lock
|
protected static AccessCache |
observable
|
Constructor Summary | |
---|---|
AccessCache()
|
Method Summary | |
---|---|
static void |
broadcastEvent(AccessEvent event)
|
static void |
clean()
|
static java.lang.String |
createKey(java.lang.String userId,
java.lang.String nodeId,
java.lang.String timeString,
java.lang.String frameName)
|
static Access |
get(java.lang.String userId,
java.lang.String nodeId,
long time,
java.lang.String frameName)
returns an Access object to a specific key |
static int |
getAccessCount(java.lang.String sqlClause)
This method returns a number of Accesses to a given query string. |
static int |
getAccessCount(java.lang.String tables,
java.lang.String sqlClause)
This method returns a number of Accesses to a given query string. |
static java.util.Vector |
getAccesses(java.lang.String sqlClause)
This method returns a Vector of Access-Objects to a given query string |
static void |
init(int timeTillCleanUp,
int gcType)
creates a new CacheTable, generates a new Connection and a lock object |
static void |
putObserver(java.util.Observer o)
adds an Observer to the AccessCache class. |
static void |
removeObserver(java.util.Observer o)
removes an Observer from the AccessCache class. |
Methods inherited from class java.util.Observable |
---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static CacheTable cache
public static java.lang.Object lock
protected static AccessCache observable
Constructor Detail |
---|
public AccessCache()
Method Detail |
---|
public static void init(int timeTillCleanUp, int gcType)
timeTillCleanUp
- how long between runs of clean()gcType
- how soon are the objects removed from the memorypublic static Access get(java.lang.String userId, java.lang.String nodeId, long time, java.lang.String frameName)
userId:
- The id of the user (from cookie)nodeId:
- The current Nodetime:
- The (start) time of the accessframeName:
- Name of the frame or window (given or generated by Scone)public static java.util.Vector getAccesses(java.lang.String sqlClause)
sqlClause
- The where clause for the query string.public static int getAccessCount(java.lang.String tables, java.lang.String sqlClause)
tables
- The table names.sqlClause
- The where clause for the query string.
public static int getAccessCount(java.lang.String sqlClause)
sqlClause
- The where clause for the query string.
public static java.lang.String createKey(java.lang.String userId, java.lang.String nodeId, java.lang.String timeString, java.lang.String frameName)
public static void clean()
public static void putObserver(java.util.Observer o)
o
- the Observerpublic static void removeObserver(java.util.Observer o)
o
- the Observerpublic static void broadcastEvent(AccessEvent event)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |