Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## scone.netobjects
Class HtmlNodeCache

    java.lang.Object
      java.util.Observable
          scone.netobjects.HtmlNodeCache

All Implemented Interfaces:
  TableRecordCacheInterface

    public class HtmlNodeCache

extends java.util.Observable
implements TableRecordCacheInterface

caches all HtmlNode objects.
use the static methods provided by this class to obtain HtmlNode objects.

Author:
  Harald Weinreich, Volkert Buchmann

Field Summary
`protected static CacheTable` | `cache`
`protected java.util.Vector` | `items`
`protected static java.lang.Object` | `lock`
`protected static HtmlNodeCache` | `observable`
`protected static int` | `observePeriod`

Constructor Summary
`HtmlNodeCache()`

Method Summary
`protected void` | `addItem(java.lang.Object o)`
`static HtmlNode` | `check(NetNode node)` This method will return the required HtmlNode if it exists in the database, and `null` otherwise.
`static HtmlNode` | `check(NetNode node, boolean persistent)` This method will return the required HtmlNode if it exists in the database, and `null` otherwise.
`static void` | `clean()` Store objects to DB
`static HtmlNode` | `get(NetNode node)` This methid will return and potentially create the required HtmlNode.
`static HtmlNode` | `get(NetNode node, boolean persistent)` This method will return and potentially create the required HtmlNode.
`static int` | `getHtmlNodeCount(java.lang.String sqlClause)` This method returns a number of HtmoNodes to a given query string.
`static int` | `getObservePeriod()`
`static void` | `init(int timeTillCleanUp, int gcType)`
`void` | `notifyObservers()`
`static void` | `putObserver(java.util.Observer o)`
`static void` | `removeObserver(java.util.Observer o)`
`static void` | `setObservePeriod(int period)`

Methods inherited from class java.util.Observable
`addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, setChanged`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### observable

    protected static HtmlNodeCache observable

### observePeriod

    protected static int observePeriod

### cache

    protected static CacheTable cache

### lock

    protected static java.lang.Object lock

### items

    protected java.util.Vector items

Constructor Detail

### HtmlNodeCache

    public HtmlNodeCache()

Method Detail

### init

    public static void init(int timeTillCleanUp,
                            int gcType)

### setObservePeriod

    public static void setObservePeriod(int period)

### getObservePeriod

    public static int getObservePeriod()

### putObserver

    public static void putObserver(java.util.Observer o)

### removeObserver

    public static void removeObserver(java.util.Observer o)

### check

    public static HtmlNode check(NetNode node)

  This method will return the required HtmlNode if it exists in the database, and `null` otherwise.

  Parameters:
    `node` - the NetNode
  Returns:
    the HtmlNode corresponding to node or `null`

### check

    public static HtmlNode check(NetNode node,
                                 boolean persistent)

  This method will return the required HtmlNode if it exists in the database, and `null` otherwise.

  Parameters:
    `netNode` - the NetNode
    `persistent` - shall the NetNode be made persistent?
    true: yes, now,
    false: no never.
    For deferred DB persistency call get-method without boolean parameter.

### get

    public static HtmlNode get(NetNode node)

  This methid will return and potentially create the required HtmlNode.
  If it exists in the database it will return the stored data. If not, it will create a new set in the database

  Parameters:
    `node` - the NetNode
  Returns:
    the HtmlNode corresponding to node

### get

    public static HtmlNode get(NetNode node,
                               boolean persistent)

  This method will return and potentially create the required HtmlNode.

  Parameters:
    `netNode` - the NetNode
    `persistent` - shall the NetNode be made persistent?
    true: yes, now,
    false: no never.
    For deferred DB persistency call get-method without boolean parameter.

### getHtmlNodeCount

    public static int getHtmlNodeCount(java.lang.String sqlClause)

  This method returns a number of HtmoNodes to a given query string.

  Parameters:
    `sqlClause` - The where clause for the query string.
  Returns:
    The number of HtmlNodes.

### clean

    public static void clean()

  Store objects to DB

### addItem

    protected void addItem(java.lang.Object o)

### notifyObservers

    public void notifyObservers()

  Overrides:
    `notifyObservers` in class `java.util.Observable`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD