Skip navigation links

Oracle Fusion Middleware Invalidation Java API Reference for Oracle Web Cache
11g Release 1 (11.1.1)

E10665-01


oracle.webcache.invalidation.invalidators
Class Invalidator

java.lang.Object
  extended by oracle.webcache.invalidation.invalidators.InvalidatorElement
      extended by oracle.webcache.invalidation.invalidators.Invalidator


public class Invalidator
extends InvalidatorElement

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);
 
See Also:
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

Invalidator

public Invalidator(boolean useSOAP)
Constructs an empty invalidation message.
Parameters:
useSOAP - reserved for future use, must be false

Invalidator

public Invalidator(boolean useSOAP,
                   boolean doPreview)
Constructs an empty invalidation preview message.
Parameters:
useSOAP - reserved for future use, must be false
doPreview - must be true

Method Detail

toString

public java.lang.String toString()
Returns the current contents of the invalidation message buffer (in the form of an XML document).
Overrides:
toString in class InvalidatorElement

Skip navigation links

Oracle Fusion Middleware Invalidation Java API Reference for Oracle Web Cache
11g Release 1 (11.1.1)

E10665-01


Copyright © 2009 Oracle. All Rights Reserved.