public class LockTemplate extends Template
Only one lock may be held at a time. The current lock (if any) is automatically released at the end of the template. Care should be taken not to acquire a lock then invoke a blocking operation (such as with the QueueTemplate) or deadlock may occur.
Example:
<lock name="server"> <set namespace="server" name=.....> ... <set namespace="server" name=.....> </lock>This insures that no other session may access the code protected by the "server" lock, either from this or any other template.
Constructor and Description |
---|
LockTemplate() |
Modifier and Type | Method and Description |
---|---|
boolean |
done(RewriteContext hr)
Called after all tags have been processed, one final chance.
|
void |
tag_lock(RewriteContext hr)
Acquire a lock, preventing any other session from accessing
the same locked section of markup.
|
void |
tag_slash_lock(RewriteContext hr)
Release the previosly named lock.
|
public void tag_lock(RewriteContext hr)
public void tag_slash_lock(RewriteContext hr)
public boolean done(RewriteContext hr)
Template
done
in interface TemplateInterface
done
in class Template