|
iiitAccessServer 1.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.iiit.access.server.plugins.cache.DbCache
This cache can be loaded into the AccessServer as a plug-in to accelerate the evaluation of expressions. It uses one or more MySQL databases as 2nd-level caches.
Constructor Summary | |
DbCache()
Creates a new instance of DbCachePlugin |
Method Summary | |
void |
addUserRight(String user,
String expression,
boolean isAllowed)
Adds the result of one expression to the cache of the user. |
boolean |
getUserRight(String user,
String expression)
Retrieves the result of an expression from the cache. |
void |
initialize(Configuration config)
Initializes the cache |
void |
shutdown()
This method is called by the AccessServer when the background threads should stop because of a shutdown of the AccessServer itself. |
void |
start()
Starts the cleaner thread. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DbCache()
Method Detail |
public void initialize(Configuration config)
initialize
in interface AccessServerPluginIf
config
- the configuration of the cache.public void start()
start
in interface ThreadPluginIf
public void shutdown()
shutdown
in interface ThreadPluginIf
public void addUserRight(String user, String expression, boolean isAllowed)
addUserRight
in interface CachePluginIf
user
- The name of the userexpression
- The expressionisAllowed
- The result of the expressionpublic boolean getUserRight(String user, String expression) throws CacheFaultException
getUserRight
in interface CachePluginIf
user
- The name of the userexpression
- The expression
CacheFaultException
- if the result is not found in the cache
|
iiitAccessServer 1.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |