|
Oracle Fusion Middleware Invalidation Java API Reference for Oracle Web Cache 11g Release 1 (11.1.1) E10665-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.webcache.invalidation.invalidators.InvalidatorElement
oracle.webcache.invalidation.invalidators.Invalidator
public class Invalidator
This class represents the INVALIDATION
element of the WCSInvalidation.dtd. It encapsulates an Oracle Fusion Middleware Web Cache invalidation message.
An invalidation message contains one or more invalidation items Each item defines an object (or range of objects) in the cache that are to be marked as invalid. An invalidation request takes place when an invalidation message is sent to the Web Cache.
At constructor time the invalidation message (buffer) is empty; it contains no invalidation items. An invalidation item is represented by the ObjectInvalidator
class. Sub-classes of ObjectInvalidator
further define the invalidation item, see Class Hierarchy below.
With this API an invalidation message is built piecemeal by adding invalidation items to it.
Class Hierarchy:
Invalidator | ObjectInvalidator | ---------------------------------------------------- | | | BasicSelectorInvalidator AdvancedSelectorInvalidator ActionInvalidator | ------------------- | | CookieInvalidator HeaderInvalidator
Example 1: Invalidating One Documemt
Invalidator inv = new Invalidator (); ObjectInvalidator objInv = new ObjectInvalidator (); objInv.add ( new BasicSelectorInvalidator("/images/logo.gif") ); inv.add (objInv); InvalidationConnection invConn = new InvalidationConnection (); invConn.send (inv);
Example 2: Invalidating a Subtree of Documemts
Invalidator inv = new Invalidator (); ObjectInvalidator objInv = new ObjectInvalidator (); objInv.add ( new AdvancedSelectorInvalidator("/images/") ); objInv.add ( new ActionInvalidator("1800") ); inv.add (objInv); InvalidationConnection invConn = new InvalidationConnection ( "localhost", "4001", "invalidator", "invalidator"); invConn.send (inv);
ObjectInvalidator
, BasicSelectorInvalidator
, AdvancedSelectorInvalidator
, ActionInvalidator
, CookieInvalidator
, HeaderInvalidator
Constructor Summary | |
---|---|
Invalidator(boolean useSOAP) Constructs an empty invalidation message. |
|
Invalidator(boolean useSOAP, boolean doPreview) Constructs an empty invalidation preview message. |
Method Summary | |
---|---|
java.lang.String |
toString() Returns the current contents of the invalidation message buffer (in the form of an XML document). |
Methods inherited from class oracle.webcache.invalidation.invalidators.InvalidatorElement |
---|
add, addAttribute |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Invalidator(boolean useSOAP)
useSOAP
- reserved for future use, must be false
public Invalidator(boolean useSOAP, boolean doPreview)
useSOAP
- reserved for future use, must be false
doPreview
- must be true
Method Detail |
---|
public java.lang.String toString()
toString
in class InvalidatorElement
|
Oracle Fusion Middleware Invalidation Java API Reference for Oracle Web Cache 11g Release 1 (11.1.1) E10665-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |